nft-20

Read every word if you decide to explore.Use at your own risk.

You know what, Bitcoin NFTs are just like these inscriptions on the blockchain, and BREcoin 20 (BRC20) follows the same standards as Bitcoin NFT. I got some inspiration from BREcoin 20, so you can actually have NFT20s for ETH NFTs too. Next, I'm going to tell you what NFT20 is all about.

What's nft-20

Nft-20 is an extension of the fully on-chain nft,designed to achieve functionality similar to BCR20.

Copy the below base64 encoding into your browser to view the format.

data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHZpZXdCb3g9IjAgMCAzNTAgMzUwIj48c3R5bGU+LmJhc2UgeyBmaWxsOiB3aGl0ZTsgZm9udC1mYW1pbHk6IHNlcmlmOyBmb250LXNpemU6IDIwcHg7IH08L3N0eWxlPjxyZWN0IHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9ImJsYWNrIi8+PHRleHQgeD0iMjAiIHk9IjYwIiBjbGFzcz0iYmFzZSI+ezwvdGV4dD48dGV4dCB4PSI0MCIgeT0iMTEwIiBjbGFzcz0iYmFzZSI+JnF1b3Q7cCZxdW90OzogJnF1b3Q7bmZ0LTIwJnF1b3Q7LDwvdGV4dD48dGV4dCB4PSI0MCIgeT0iMTYwIiBjbGFzcz0iYmFzZSI+JnF1b3Q7aWQmcXVvdDs6ICZxdW90OzEmcXVvdDssPC90ZXh0PiAgPHRleHQgeD0iNDAiIHk9IjIxMCIgY2xhc3M9ImJhc2UiPiZxdW90O3RpY2tldCZxdW90OzogJnF1b3Q7d2VpJnF1b3Q7LDwvdGV4dD48dGV4dCB4PSI0MCIgeT0iMjYwIiBjbGFzcz0iYmFzZSI+JnF1b3Q7YW10JnF1b3Q7OiAmcXVvdDsxMDAwJnF1b3Q7PC90ZXh0Pjx0ZXh0IHg9IjIwIiB5PSIzMTAiIGNsYXNzPSJiYXNlIj59PC90ZXh0Pjwvc3ZnPg==

You will see svg that are similar to the format shown below.

{ 
  "p": "nft-20",
  "id": "1",
  "tick": "wei",
  "amt": "1000"
}
KeyVariable?Description

id

no

No.:Label of nft-20

tick

no

Ticker: Unrestricted letter identifier for NFT-20

amt

yes

Amount: States the amount of the nft-20.

We have marked a mapping in the contract for storing the quantity of Wei tokens in each NFT20.This means that after the casting is completed, the total amount of wei will be fixed.

Why nft-20?

The BRC20 and various derivative protocols, such as ORC20 and BRCC20, etc. have greatly increased our learning costs, so i want to create a new product based on a widely recognized protocol. Firstly, it will be an NFT, similar to the meaning of BRC20, and secondly, it will be a token.

And all NFTs will face the problem of liquidity shrinkage, but we will help enhance liquidity through mapping.

How to transfer

In the transfer method, the smart contract will check if the owner of the source address of the ERC20 token and the person who called the method are the same. If they are, the token cannot be transferred beyond the amount the owner owns.

function combineTransfer(uint from, uint to, uint value) public{
        require(combineTransferEnabled, "transfer not active");
        require(_exists(from) && _exists(to),"non-existent id");
        require(getValue(from) >= value,"no sufficient balance");
        require(ownerOf(from) == msg.sender, "must own token");
        transferOut[from] +=  1;
        amtValues[from] -= value;
        amtValues[to] += value;
        transferIn[to] +=  1;
    }

Fair

For public offering, the market price and total quantity are completely determined by the market.All operations are controlled by smart contracts, and cannot be increased after the mint is completed.

Last updated