Contract

Interface
Attributes of a smart contract deployed to the blockchain.
export interface Contract { 
  readonly script: Buffer; 
  readonly manifest: string; 
  readonly hasStorage: boolean; 
  readonly payable: boolean; 
  readonly [OpaqueTagSymbol0]: unique symbol; 
} 

Properties

script
Buffer
Contract code.
manifest
string
A string representation of the contract's manifest
hasStorage
boolean
If true then contract uses blockchain storage.
payable
boolean
If true then contract is payable.

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 ChatTwitter
COPYRIGHT © 2021 NEO•ONE