Time to read: 1 min
Verify a Smart Contract using the Rootstock Explorer
Contract verification is essential in the Rootstock ecosystem. It allows Rootstock Explorer users to inspect and validate the source code of deployed smart contracts.
The Rootstock Explorer provides a transparent view of the Rootstock blockchain, showing transactions, blocks, and deployed contracts. This transparency, enabled by verification, builds trust and understanding in decentralized applications.
Key reasons for verifying a smart contract
- Builds trust:
- Verification allows anyone to see the source code of a deployed smart contract, which fosters trust with users and the community.
- Increases transparency:
- Users can audit the code to confirm it performs the actions it claims to, providing confidence in the contract's operations.
- Aids in security:
- By making the code public, it can be reviewed for vulnerabilities, though users should still conduct their own security assessments.
- Enables proper tooling:
- Many development and analysis tools, such as those from Tenderly, require the contract's source code to be verified to function correctly.
- Provides public interaction:
- Verification allows users to interact with the contract through block explorers like Etherscan, even if other user interfaces are unavailable.
- Confirms code integrity:
- The verification process proves that the bytecode on the blockchain was generated from a specific, known source code, ensuring the contract hasn't been tampered with.
- Helps with compliance:
- Verification is essential for meeting certain compliance and regulatory requirements.
What does verification do?:
- Adds a Verified badge to the contract page, confirming that the published source code matches the deployed bytecode.
- Enables human-readable interaction with the contract — allowing users to view and call its functions directly.
- Allows downloading the contract's Application Binary Interface (ABI).
Prerequisites
- Address of the deployed contract on Rootstock.
- Complete source code of the contract.
- Compiler details:
- Solc (Solidity Compiler) version.
- Number of optimization runs.
- Constructor parameters (if applicable).
- Library addresses (if used).
In summary, this guide will help you verify your smart contract, allowing you to leverage these benefits and contribute to a more transparent and trustworthy decentralized environment on Rootstock.