Skip to main content

Minting Mock Tokens

Once you've obtained some AVAX, you are now ready to connect your wallet to our dashboard so that you can mint yourself some mock test tokens needed to execute multiswaps.

To connect your wallet to the dashboard, simply navigate to the "Account" tab and click the "Connect Wallet" button as shown below:

Connect Wallet.

You should see a MataMask prompt with a signature request. When your wallet connects, it will pull down any token balances from the blockchain and the dashboard displays balance and allowance information. Since this a new account, it should be blank as shown above below:

Connected Wallet.

Mint Test Tokens

With your wallet connected, click the setting gear icon in the top right of the page and you should see the following settings pop up:


Click "Mint Tokens" and you should be prompted by MetaMask five times to confirm minting of five different ERC20 tokens to your account. Each prompt will look like the following:

Confirm Mint.

It can take a few seconds for the minting to complete because it is happening on the blockchain. You can check the status by looking at the "Acitivity" section of MetaMask. When all tokens are minted, it should look like the following:

Mint Confirmed./>

If you click one of the transactions in MetaMask, you can see the details:

Mint Details./>

If you click "View on block explorer", you can find this transaction on the Snowtrace block explorer.

Congratulations! You've performed a transaction on the blockchain. If this is your first time interacting the blockchain, we'd love to hear from you in our Discord or on Twiiter. Welcome to the CavalRe!

Updated Balances

The dashboard does not yet have real-time data updates (stay tuned!) so you will need to refresh the page to see your balances updated once all the mint transactions are completed. Navigating back to the "Account" tab after refreshing the page, you should see something like the following:

Updated Balances.

Note that all the allowances are zero.

Increase Allowances

With a decentralized exchange like ours, when you execute a swap, you are not sending tokens to the exchange and having it return tokens back to you. Rather, you are sending an instruction to the exchange telling it to pull a certain number of tokens from your account and then having it send other tokens back to you, i.e. it is not a "request / response" type of transaction from your perspective. Rather, it is a "pull / push" type of transaction from the perspective of the exchange.

Before any smart contract, including our exchange, can pull tokens from your account, you must approve an allowance telling the contract how many tokens they are allowed to pull. As you can see from thr "Account" tab shown above, we have not yet approved any allowances.

To approve an allowance, switch on the "Edit allowances" switch and you will see the following:

Edit Allowances.

Here, you can either approve allowances for individual tokens or simply hit the "Max" button and it will automatically fill in the maximum allowance for each token in your account.

Maximum Allowances.

Finally, click "Approve Allowances". Again, you will be prompted by MetaMask once for each token. Once all allowance transactions are complete, you can refesh the page and navigate to the "Account" tab:

Maximum Allowances.

You are now ready to start executing some multiswaps!