Caduceus

⌘K
Quickstart
Blockchain Basics
What is a Blockchain?
Types of Blockchain
Consensus Mechanism
What is a Smart Contract?
The Ethereum Virtual Machine
Solidity
Caduceus Basics
What is Caduceus?
Consensus
Parallel Execution
Storage
Edge Rendering
Smart Contracts
Nodes
Tokenomics
GameFi
Introduction to GameFi
Introduction to Unity
ChainSafe SDK overview
Using ChainSafe with Unity
Users
Wallets
Exchanges
D'Apps
🦉Oracles
Redstone
Developers
To Api's
Caduceus RPC Endpoints
Getting Testnet Tokens
SDK's
Templates
Tutorials
EVM Tools
Explorers
XR Dev Kit
Node Operators
Node Architecture
Network Specs
Running a V1 Node
Staking
Feedback
Docs powered by archbee 

Verify a Contract on Caduceus

7min

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:
Text
|
//SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.3.2 (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;




Verify on Caduceus Galaxy Scan

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.



Caduceus Explorer
Caduceus Explorer




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.



Example of flattener on Remix

Document image


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:

Document image


Manually flattening a file before verification

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.



Import Directives can be opened one by one
Import Directives can be opened one by one


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

API based verification will be introduced in the near future.

Updated 03 Mar 2023
Did this page help you?
Yes
No
PREVIOUS
Deploy a D'App on Caduceus
NEXT
Contract Calling and Execution
Docs powered by archbee 
TABLE OF CONTENTS
Verify on Caduceus Galaxy Scan
Example of flattener on Remix
Manually flattening a file before verification
API based Verification