Contract

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

Properties

script
Buffer
Contract code.
payable
boolean
Flag that indicates if the Contract supports receiving Assets.

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