0
0
Blockchain / Solidityprogramming~10 mins

Contract verification on Etherscan in Blockchain / Solidity - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the contract address for verification.

Blockchain / Solidity
const contractAddress = '[1]';
Drag options to blanks, or click blank then click option'
A0x1234567890abcdef1234567890abcdef12345678
BcontractABI
CetherscanAPIKey
D0xabcdef
Attempts:
3 left
💡 Hint
Common Mistakes
Using the ABI or API key instead of the contract address.
2fill in blank
medium

Complete the code to set the Etherscan API key for contract verification.

Blockchain / Solidity
const apiKey = '[1]';
Drag options to blanks, or click blank then click option'
AYOUR_ETHERSCAN_API_KEY
BverificationStatus
C0x1234567890abcdef1234567890abcdef12345678
DcontractAddress
Attempts:
3 left
💡 Hint
Common Mistakes
Using the contract address or other variables instead of the API key.
3fill in blank
hard

Fix the error in the verification function call by completing the method name.

Blockchain / Solidity
await etherscan.[1](contractAddress, sourceCode, apiKey);
Drag options to blanks, or click blank then click option'
AdeployContract
BgetContract
CcompileSource
DverifyContract
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated method names like deployContract or compileSource.
4fill in blank
hard

Fill both blanks to create a dictionary with contract address and API key for verification.

Blockchain / Solidity
const verificationData = { address: '[1]', key: '[2]' };
Drag options to blanks, or click blank then click option'
A0xabcdefabcdefabcdefabcdefabcdefabcdefabcd
BcontractABI
CYOUR_ETHERSCAN_API_KEY
DsourceCode
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up the API key and contract address values.
5fill in blank
hard

Fill all three blanks to complete the verification function call with address, source, and API key.

Blockchain / Solidity
await etherscan.verifyContract('[1]', '[2]', '[3]');
Drag options to blanks, or click blank then click option'
AcompileSource
BsourceCode.sol
CYOUR_ETHERSCAN_API_KEY
D0xabcdefabcdefabcdefabcdefabcdefabcdefabcd
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the order of arguments or using incorrect values.