Publish Contract Source Code
Publish your contract details on Ontology Explorer
Last updated
Was this helpful?
Publish your contract details on Ontology Explorer
Last updated
Was this helpful?
Once your contract is deployed, people can search for your contract in the Ontology and view related on-chain data on a dedicated page.
You can publish the source code along with more details about your contract on this page to unveil how things work under the hood. Contracts with extra details are listed on the "" page to encourage community members to use and improve these contracts.
To publish more details, click on "Contracts" - "" in the Explorer and specify below details:
Select the virtual machine (EVM, NeoVM or WASM) that executes your contract.
You are supposed to provide all the following information if you submit an EVM contract, and less is required for the other two types.
Fill in your contract address.
Introduce your contract with one sentence.
Choose the compiler information from the menu. Currently Solidity (single file) and Solidity (multi-part files) supported.
Select the option used when compiling the contract.
Fill in this field if your contract is created with constructor parameters. You need to provide constructor arguments in ABI hex encoded form so we can compare if what you provided is consistent with the existing bytecodes.
The constructor arguments are appended to the end of the contract source bytecode when the contract is compiled by Solidity. You can find them by comparing the compiled code and the input creation bytecode.
Step 1: Fill in parameters and deploy your contract.
Enter names and contract addresses of the libraries used.
Fill in this field if you choose "Yes" for "Optimization". The value represents how many times the code is likely to be run, and it will be optimized accordingly. Leave the value as "200" if you are unsure.
Select which version of EVM to compile your code for.
Select a license type for your source code:
Select and upload Solidity (*.sol) files of the source code.
After filled and checked everything, click on the arrow button to submit the content. The Ontology team will review the content and publish it.
You can also figure out the constructor arguments by using this .
Step 2: Fill in the parameters in the , you will get a hex string that represents the contractor arguments.