Remix
Last updated
Last updated
When deploying contracts, you need some coins. This a way how to get world land testnet coins! Plz follow these statements:
Remix-IDE: https://remix-project.org/
2.1 make file and input file name
any name is okay
2.2 write or Paste contract code
I use this code samples
2.2.1 fungible tokens
2.2.2 Non-fungible tokens
When you're done writing the code, go to the Compile tab.
Warning! Set the EVM version to Paris and compile.
Once you've changed the version, press the Compile button to run the compile.
After compiling, go to the Deployment tab.
Select "injected web3" in the environment.
The connected network number and account will then appear.
If there are parameters of the contract constructor, write them by clicking the button in the picture below.
Click the TRANSACT button to deploy the contract.
Finally, you can deploy contract to WorldLand
You can excute function of contract in Deployed Contracts
You can check your tokens in metamsk using "Import tokens"
Below is how to register NFT using pinata and ipfs in erc721.
If the above TEST721.sol contract is deployed, the following functions appear.
awarditem is a function that awards the NFT json file in tokenUrl to the player.
So, we need to store the JSON file in the URL.
Upload the NFS JSON file to IPFS using pinata.
First sign up for Pinata
{% embed url="https://www.pinata.cloud/" %}
2. upload image of nft and make json The format of the json file is as follows.
If you want to include an image, the image must also be stored in ipfs. So, I upload the image first.
You can see the file is saved.
Click the eye icon and copy the url of the image.
image ipfs example: https://gateway.pinata.cloud/ipfs/QmWUR3PYmorqqQ2mGwQAr3ujUNnpANS2xyKJYBxegwFeS8
Paste the url into the image item in json.
"image": "https://gateway.pinata.cloud/ipfs/QmWnNt8jdSxVX981abPHKTAsg5E31u2Zh8AfsVqzhyGzSk",
3. Upload the json to pinata and copy the url. The method is the same as the image.
json ipfs example:
https://gateway.pinata.cloud/ipfs/QmcpjQMRyBQ8qBZcVidyeD67EvxLSnmR81Fz15MtFrQUwW
Finally, copy the address of your wallet, put your wallet address in the player, and the json url in tokenURL and send the transaction.
You saved the NFT!