ContractManifest

Interface
Represents the manifest of a smart contract. Every deployed smart contract must explicitly declare the features and permissions it will use in its manifest.
export interface ContractManifest { 
  readonly name: string; 
  readonly groups: readonly ContractGroup[]; 
  readonly supportedStandards: readonly string[]; 
  readonly abi: ContractABI; 
  readonly permissions: readonly ContractPermission[]; 
  readonly trusts?: readonly Address[]; 
  readonly extra: string; 
  readonly [OpaqueTagSymbol0]: unique symbol; 
} 

Properties

name
string
The name of the contract.
groups
readonly ContractGroup[]
A group represents a set of mutually trusted contracts. A contract will trust and allow any contract in the same group to invoke it, and the user interface will not give any warnings.
supportedStandards
readonly string[]
The Neo Enhancement Proposals (NEPs) and other standards that this smart contract supports.
abi
Full specification of the functions and events of a smart contract. Used by the Client APIs to generate the smart contract interface.
permissions
readonly ContractPermission[]
The permissions field is an array containing a set of ContractPermission objects. It describes which contracts may be invoked and which methods are called.
trusts
readonly Address[]
The trusts field is an array containing a set of contract hashes. It can also be undefined. If it is undefined, then it means that it trusts any contract. If a contract is trusted, the user interface will not give any warnings when called by the contract.
extra
string
Custom user-defined JSON object, which is represented as a stringified JSON string. If it's not defined on deploy it will default to "{}".

Example

const contractAddress = Address.from('0xcef0c0fdcfe7838eff6ff104f9cdec2922297537'); 
const contract = Contract.for(contractAddress); 
const manifest: ContractManifest = contract.manifest; 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE