1/5
# Interacting with a Contract - Minting Tokens We have not yet minted any tokens, which means currently the total available supply of our token is `0` - no tokens currently exist! To increase the supply of tokens, we have to call the function `mint` from our contract: - Go to the **Deploy & Run Transactions** tab. - Find your token and expand the tab to see the contract's functions. ::image{src='/chainlink-fundamentals/2-smart-contract-and-solidity-fundamentals/assets/functions-on-contract.png' style='width: 100%; height: auto;' alt='functions-on-contract'} - Find the function `mint` and expand it to check the parameters. - `to`: The address receiving the minted tokens. We will create `100` tokens by setting the amount value as `100000000000000000000`. This is because our Token has `18` decimals. - `amount`: The amount to mint. ::image{src='/chainlink-fundamentals/2-smart-contract-and-solidity-fundamentals/assets/transact.png' style='width: 100%; height: auto;' alt='transact'} - To send the transaction, click on the **transact** button and confirm the transaction in your Metamask wallet. - Now, you can check to see if your balance has increased by calling `balanceOf` and passing the address you minted the tokens to. - You can also check your balance in MetaMask by heading to the **Tokens** tab since we added our token in the previous lesson. ## Allowance and Token Approvals Token approvals enable another address to spend another address's tokens. This feature is commonly used in DeFi applications that need to transfer ERC20 tokens from your wallet to another wallet or contract via another intermediary smart contract. To use this feature, you can call the `approve` function, specifying the address that will spend your tokens and the amount they are allowed to spend. ::image{src='/chainlink-fundamentals/2-smart-contract-and-solidity-fundamentals/assets/approve.png' style='width: 100%; height: auto;' alt='approve'} You can always verify if a contract has permission to spend your tokens by calling the `allowance` function. ::image{src='/chainlink-fundamentals/2-smart-contract-and-solidity-fundamentals/assets/allowance.png' style='width: 100%; height: auto;' alt='allowance'}
A hands-on walkthrough to Interacting with a Contract - Minting Tokens - Learn to mint new tokens by calling the `mint` function on your deployed contract and confirming via Metamask. Discover how to manage token spending permissions using the `approve` and `allowance` functions.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Smart contract and Solidity fundamentals
Chainlink’s decentralized oracle network (DON)
Chainlink Data Feeds
Chainlink Data Streams
Chainlink Automation
Chainlink CCIP
Chainlink Functions
Verifiable Random Function (VRF)
Chainlink Proof of Reserve
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
Last updated on May 19, 2025
Solidity Developer
Chainlink FundamentalsDuration: 9min
Duration: 1h 16min
Duration: 41min
Duration: 30min
Duration: 1h 02min
Duration: 48min
Duration: 30min
Duration: 19min
Duration: 36min
Duration: 30min
Certification: Chainlink Fundamentals
The Chainlink Fundamentals proficiency exam covers is designed to confirm your grasp of all key concepts and learnings presented in the course material. Exam takers will have 75 minutes to complete 50 questions and must score 30/50 to pass and earn a Certificate of Completion. Because course material is continually updated, The Chainlink Fundamentals Certificate of Completions expires after 1 year. To remain current, holders must re-take the exam and pass to confirm their current knowledge.
Course Overview
About the course
Smart contract and Solidity fundamentals
Chainlink’s decentralized oracle network (DON)
Chainlink Data Feeds
Chainlink Data Streams
Chainlink Automation
Chainlink CCIP
Chainlink Functions
Verifiable Random Function (VRF)
Chainlink Proof of Reserve
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
Last updated on May 19, 2025