Verify a Contract on Caduceus
Caduceus contracts may be verified through multiple methods.
To verify, you must first ensure that
- Your contract compiles correctly in Remix, Truffle or Hardhat.
- You have the version of the compiler specified in the smart contract's pragma directive, and you have chosen a license type.
- And that you have the Solidity compiler version matching your Solidity Pragma directive:
Navigate to your contract's unique URL on Caduceus Galaxy Scan Test Net. https://galaxy.scan.caduceus.foundation
Click on the Contract tab, and then click on Verify and Publish.
You need to flatten your files on the Caduceus IDE before you can attempt to verify them via Caduceus Galaxy.
A file flattener plugin converts all imports or dependencies into one large flat file that's well organized with relevant successive includes of interfaces and dependent contracts.
Once your files are flattened, you need to paste your files into Caduceus Scan.
If your verification is successful a message will appear like so:
In case a you are unable to flatten your Solidity files through a plugin, you should be able to do it manually. This technique is especially useful if you are using the Caduceus IDE.
Start by simply opening the first dependency as signified by the import directive. Open the file separately, then copy it all into a new document.
Go to the next file in the dependency order, and copy it immediately below.
Make sure that you keep the files in order of dependency. This may be a bit tricky at first, but you can keep it simple if you keep in mind that anything that depends on a previous file should come below it.
In the end, you will result in a chain of dependent contracts, one after the other. You can then simply choose the contract name you wish to compile, and it will compile correctly.
How to Verify a flat file
When verifying, be sure to paste the entire code with all dependencies.
Verify on Remix
Caduceus will introduce Remix plugins for verification soon.
API based verification will be introduced in the near future.