Contract

Interface
Attributes of a smart contract deployed to the blockchain.
export interface Contract { 
  readonly id: number; 
  readonly updateCounter: number; 
  readonly hash: Address; 
  readonly nef: Buffer; 
  readonly manifest: ContractManifest; 
  readonly [OpaqueTagSymbol0]: unique symbol; 
} 

Properties

id
number
The ID of the Contract
updateCounter
number
The number of times the Contract has been updated.
hash
The Contract hash.
nef
Buffer
The NEO Executable Format 3 (NEF) of the Contract.

Static Methods

for

Returns undefined if a Contract does not exist at address.
(address: Address) => Contract | undefined 

Example

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