Challenge - 5 Problems
Etherscan Verification Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2: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"; } }
Attempts:
2 left
💡 Hint
Think about what the function returns as a simulated response.
✗ Incorrect
The function getVerificationStatus() returns the string "Verified" as a simulated response, so the output is exactly that string.
🧠 Conceptual
intermediate1: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?
Attempts:
2 left
💡 Hint
Think about what Etherscan generates automatically after verification.
✗ Incorrect
Etherscan automatically generates the ABI after verifying the source code, so submitting the ABI manually is not required.
🔧 Debug
advanced2: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?
Attempts:
2 left
💡 Hint
Think about what happens if optimization settings differ between compilation and verification.
✗ Incorrect
If optimization was enabled during compilation but not selected during verification, the bytecode hashes won't match, causing verification to fail.
📝 Syntax
advanced1: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?
Attempts:
2 left
💡 Hint
Consider the range of versions allowed by the pragma and the exact compiler version used.
✗ Incorrect
The pragma '>=0.8.0 <0.9.0' includes 0.8.12, ensuring compatibility. '^0.8.12' requires at least 0.8.12 but may exclude some patch versions. '0.8.11' is too low and '^0.7.0' is incompatible.
🚀 Application
expert2: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?
Attempts:
2 left
💡 Hint
Count the parameters in the constructor function.
✗ Incorrect
The constructor has two parameters: a string and a uint256, so two arguments must be ABI-encoded and submitted for verification.