Ontology Developer Center
DISCOVERCOMMUNITYSUPPORT
  • Introduction
  • Discover Ontology
  • Getting Started
  • Glossary
  • Decentralized Identity and Data
    • ONT ID
      • Decentralized Identifiers
        • Method Specification for Ontology
        • Method Specification for Ethereum
        • Method Specification for BSC
      • Verifiable Credentials
        • Anonymous Credentials
      • ONT Login
        • Scenarios
        • Protocol Specification
        • Front-end JavaScript SDK
          • Integration and Usage
          • API Reference
        • Front-end UI SDK
          • Integration and Usage
          • API Reference
        • Back-end Go SDK
          • Integration and Usage
          • API Reference
        • Back-end Java SDK
          • Integration and Usage
          • API Reference
      • ONT TAG
        • Workflow
        • API Reference
      • Mercury
      • OScore
    • DDXF
      • Components and Interfaces
      • GREP
      • Overall Scheme
      • Solutions
        • Marketplace
          • Deployment
          • Scenarios
          • SaaS Tenant
          • Java SDK
        • Data Storage
          • Deployment
          • Java SDK
        • Resource Auditor
        • Offline Judge
      • Use Cases
        • E-Shops
  • ONTOLOGY ELEMENTS
    • Smart Contracts
      • Types of smart contracts
    • Token Protocols
    • Consensus Mechanism
    • Ontology Oracle
      • Oracle Process Flow
  • GUIDES & TUTORIALS
    • Development Guides
      • dApp Development
        • Using the dAPI
        • Data Synchronization
      • Smart Contract Development
        • EVM Contract
          • Development Environment and Tools
          • Wallet Setup
          • Contract Development
          • How to Deploy a Smart Contract with GetBlock
        • NeoVM Contract
          • Development tools and environment
          • Launching the IDE
          • Writing and editing program logic
          • Deploying and testing on private net
        • WASM Contract
          • Development Environment
          • Project Initiation - Hello World
          • Creating your own project
          • Development using SmartX
          • Runtime API
          • Contract Fundamentals
          • Inter-contract Interaction
          • Developing Contracts in C++
        • Publish Contract Source Code
    • Integration Guides
      • dApp Integration
        • dAPI Integration
          • Chrome Plugin
          • Mobile wallet dApp
          • QR code mechanism
          • Wake call mechanism
        • Cocos 2D-x
        • Unity 3D applications
      • Mobile Wallet Integration
        • SDK integration
        • dAPI Integration
          • In-wallet applications
          • QR code mechanism
          • Wake call mechanism
        • Stake
      • Using ONT ID
      • Exchange Integration
        • Exchange Docking Guide
        • Exchange API
      • Ontology for dApp Stores
    • EVM & Token Decimals Upgrade
  • ONTOLOGY NODE
    • Abstract
    • Node Deployment
      • Standard Node
      • Rosetta Node
    • Interacting with a Public Node
  • DEVELOPER TOOLS
    • dApp Development Framework
      • Punica CLI
      • Punica boxes
      • Solo Chain
    • IDE
    • APIs
      • HTTP API
        • Restful
        • WebSocket
        • Remote Procedure Call (RPC)
      • Explorer v2 API
        • Block
        • Address
        • Contract
        • Token
        • Transactions
        • ONT ID
        • Summary
        • Node
      • Native Token API
        • ONT Contract API
        • ONG Contract API
      • ONT ID Contract API
      • Web3 API
      • OScore Open API
      • Rosetta Node API
        • Data API
        • Construction API
      • DToken Contract API
      • DDXF
        • Marketplace Contract API
        • Storage API
      • Governance API
    • Digital Wallet
      • Chrome Plugin provider
      • Chrome Plugin dAPI
      • Mobile version provider
      • Mobile version dAPI
    • SDKs
    • Signing Server
      • Installation
      • API reference
  • COMMUNITY
    • Ecosystem Programs
    • Community Libraries
    • Community Events
    • Community Channels
    • Core Contributors
  • SUPPORT
    • FAQ
      • Basic blockchain concepts
      • Ontology Nodes
      • Ontology token protocols
      • Smart contracts
      • SDKs and APIs
    • Contact Us
Powered by GitBook
On this page
  • Virtual Machine
  • Contract Address
  • Contract Description (optional)
  • Compiler Type & Compiler Version
  • Optimization
  • Constructor Arguments ABI-encoded (Hex String, Optional)
  • Contract Library Address (Optional, up to 10)
  • Runs (Optimizer)
  • EVM Version
  • License Type Settings
  • Contract Source Code
  • Submit Information

Was this helpful?

  1. GUIDES & TUTORIALS
  2. Development Guides
  3. Smart Contract Development

Publish Contract Source Code

Publish your contract details on Ontology Explorer

PreviousDeveloping Contracts in C++NextIntegration Guides

Last updated 2 years ago

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:

Virtual Machine

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.

Contract Address

Fill in your contract address.

Contract Description (optional)

Introduce your contract with one sentence.

Compiler Type & Compiler Version

Choose the compiler information from the menu. Currently Solidity (single file) and Solidity (multi-part files) supported.

Optimization

Select the option used when compiling the contract.

Constructor Arguments ABI-encoded (Hex String, Optional)

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.

Contract Library Address (Optional, up to 10)

Enter names and contract addresses of the libraries used.

Runs (Optimizer)

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.

EVM Version

Select which version of EVM to compile your code for.

License Type Settings

Select a license type for your source code:

Contract Source Code

Select and upload Solidity (*.sol) files of the source code.

Submit Information

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.

Explorer
View Contracts
Submit Contract
online tool
online tool
No License (None)
The Unlicense (Unlicense)
MIT License (MIT)
GNU General Public License v2.0 (GNU GPLv2)
GNU General Public License v3.0 (GNU GPLv3)
GNU Lesser General Public License v2.1 (GNU LGPLv2.1)
GNU Lesser General Public License v3.0 (GNU LGPLv3)
BSD 2-clause "Simplified" license (BSD-2-Clause)
BSD 3-clause "New" Or "Revised" license* (BSD-3-Clause)
Mozilla Public License 2.0 (MPL-2.0)
Open Software License 3.0 (OSL-3.0)
Apache 2.0 (Apache-2.0)
GNU Affero General Public License (GNU AGPLv3)
Business Source License (BSL 1.1)