Minting NFTs

Before Getting Started

  • You need to have a wallet capable of interacting with Etherscan’s Web3 interface (MetaMask will work just fine)

  • This is probably only doable on a desktop PC, and that is what this guide will be written for. You might be able to do this on mobile, but that seems like a UI nightmare.

  • With a few exceptions (which will be explicitly pointed out in this guide) any integers you are inputting into any functions on Etherscan must be converted to the uint256 format.

    • You can convert any number into the uint256 format by multiplying by 10^18. This means 1 becomes 1000000000000000000 (1 with eighteen 0’s).

    • For whole-numbers you can just add those eighteen 0’s, but for anything with a decimal you will need to do the multiplication.

  • To interact with a smartcontract (SC) on Etherscan, you will need to navigate to the interface that contains the functions of the contract itself. This can be found under the “Contract” tab, where you will then select the “Write Contract” or “Write as Proxy” tabs depending on the contract.

  • Whenever you interact with a SC on Etherscan, you will need to connect your wallet via Web3 via the “Connect to Web3” button to allow it to send transactions. You will need to do this each time you open a new SC page.

Step 1 - Currency Approval

Before purchasing your NFT, you must manually approve the NFT Minter to spend the tokens you are using from your wallet - this is identical to other approvals that are commonly used on Uniswap and other DEXes. You must do this for each currency that the Minter will use to create your NFT.

For example, if you are locking YFL and paying with USDC, you will need to do two approvals; one at the YFL contract, and one at the USDC contract.

To approve the Minter, the approvefunction must be called (i.e. executed) from the contract of the token that is being spent – you cannot use the approve function in the Minter contract

As an example, here is the YFL token contract (not the minter!). To approve the YFL you want to attach to your NFT, here’s what you’ll put in the fields of the approvefunction:

  • spender (address) – NFT Minter contract address: 0x2A5b27Ce8142F68901a008eBa08bb436251134bc

  • amount (uint256) – Amount of YFL you will be attaching and/or spending to the NFT converted to the uint256 format (e.g. 5 YFL would be written as 5000000000000000000)

Here are some links to some of the more common stablecoins for your convenience:

Step 2 - Buying the NFT

  1. Navigate to the NFT Minter Contract

  2. Find the buyfunction and enter the unique tokenIDyou were given in the input exactly as you were given it – no need to add extra 0’s at the end.

  3. Press “write” and approve the transaction – the funds will be taken from your wallet, and the NFT will be minted and placed in your wallet!

OPTIONAL - Step 3 - Staking YFL From Your NFT

  1. Navigate to the NFT Minter Contract

  2. Find the stake function and enter the unique tokenIDyou were given in the input exactly as you were given it – no need to add extra 0’s at the end.

  3. Press “write” and approve the transaction – the YFL will be sent from the NFT minter to the governance vault, and the yYFL will be placed in your wallet.

Last updated