1/5
# Buying Tokens from TokenShop Let's use the `TokenShop` contract to buy some `MyERC20` tokens. This is the contract you deployed in Section 2. 1. Open your Metamask and click the **Send** button. Enter the `TokenShop` contract address as the **To** address and enter `0.001` as the amount to send `0.001 ETH` to your `TokenShop` address. ::image{src='/chainlink-fundamentals/3-oracles-and-chainlink-data-feeds/assets/mint-meta-mask.png' style='width: 100%; height: auto;' alt='mint-meta-mask'} Click **Continue** and the **Confirm** to send the transaction. This will send `0.001 ETH` to your `TokenShop` contract and trigger the `receive` function, which will mint tokens from the `MyERC20` contract to your wallet address. 2. Once MetaMask confirms the transaction on the blockchain, you can check whether your minted tokens show in your account in two ways: - You can check your MetaMask wallet, under Tokens, to see if the Token you’ve previously added to your MetaMask has an updated balance. ::image{src='/chainlink-fundamentals/3-oracles-and-chainlink-data-feeds/assets/balance.png' style='width: 100%; height: auto;' alt='balance'} You can also click on the `MyERC20` contract in Remix. Then, check how much of your token is held by your wallet address by calling `balanceOf` function and passing in your address. ::image{src='/chainlink-fundamentals/3-oracles-and-chainlink-data-feeds/assets/balance-of.png' style='width: 100%; height: auto;' alt='balance-of'} Congratulations! You just bought and minted tokens from the `MyERC20` contract using the `TokenShop` contract using Chainlink Price Feeds to convert an ETH amount to a USD amount to calculate how many tokens to mint!
A practical walkthrough to Buying Tokens from TokenShop - Learn how to purchase `MyERC20` tokens by sending ETH to your deployed `TokenShop` contract, triggering its receive function. Verify your newly minted token balance using both MetaMask and the `balanceOf` function in Remix.
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