0
0
Blockchain / Solidityprogramming~20 mins

Contract verification on Etherscan in Blockchain / Solidity - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Etherscan Verification Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
2:00remaining
What is the output of this Solidity contract verification status check?
Given the following Solidity code snippet that queries Etherscan API for contract verification status, what will be the output if the contract is verified?
Blockchain / Solidity
pragma solidity ^0.8.0;

// This is a pseudo-code example to illustrate the concept
// Assume getVerificationStatus() calls Etherscan API and returns a string
contract VerifyStatusChecker {
    function getVerificationStatus() public pure returns (string memory) {
        // Simulated response
        return "Verified";
    }
}
ACompilation Error
B"Pending"
C"Not Verified"
D"Verified"
Attempts:
2 left
💡 Hint
Think about what the function returns as a simulated response.
🧠 Conceptual
intermediate
1:30remaining
Which step is NOT required for contract verification on Etherscan?
When verifying a smart contract on Etherscan, which of the following steps is NOT required?
ASubmitting the contract's ABI manually
BProviding the compiler version used
CUploading the contract source code
DSelecting the correct optimization settings
Attempts:
2 left
💡 Hint
Think about what Etherscan generates automatically after verification.
🔧 Debug
advanced
2:30remaining
Why does this contract verification fail on Etherscan?
A developer tries to verify their contract but Etherscan returns a verification failed error. The contract uses Solidity 0.8.12 with optimization enabled. The developer submits the source code but forgets to select optimization in the verification form. What is the likely cause of failure?
AMismatch in optimization settings between compiled contract and verification form
BIncorrect Solidity version selected
CSource code has syntax errors
DContract address is incorrect
Attempts:
2 left
💡 Hint
Think about what happens if optimization settings differ between compilation and verification.
📝 Syntax
advanced
1:30remaining
Which Solidity pragma version is compatible with Etherscan verification for a contract compiled with 0.8.12?
You want to verify a contract compiled with Solidity 0.8.12 on Etherscan. Which pragma directive is correct to ensure compatibility?
Apragma solidity 0.8.11;
Bpragma solidity ^0.8.12;
Cpragma solidity >=0.8.0 <0.9.0;
Dpragma solidity ^0.7.0;
Attempts:
2 left
💡 Hint
Consider the range of versions allowed by the pragma and the exact compiler version used.
🚀 Application
expert
2:00remaining
How many constructor arguments must be ABI-encoded and submitted during Etherscan verification for this contract?
Consider this Solidity contract: contract Token { string public name; uint256 public supply; constructor(string memory _name, uint256 _supply) { name = _name; supply = _supply; } } When verifying this contract on Etherscan, how many constructor arguments must be ABI-encoded and submitted?
A1
B2
C0
D3
Attempts:
2 left
💡 Hint
Count the parameters in the constructor function.