Contract Metadata

Defining contract

Creating contract metadata in Neo involves defining information about your smart contract that is stored on the blockchain.

In your smart contract code, you can define a metadata structure that contains the relevant information about your contract.

Store Metadata on the Blockchain

To store this metadata on the Neo blockchain, you typically encode the metadata as a JSON object and include it as a comment at the beginning of your smart contract code.

Accessing Metadata

To access the contract metadata from the blockchain, you can use the ContractManagement.getContract method within your Neo smart contract code.

The contract_metadata variable will contain the metadata you previously stored.

Smart ContractNeoMetadata