SmartContract

Interface
An object representing a smart contract defined by the definition property, in particular, the ABI of the definition.
export interface SmartContract<TClient extends Client = Client, TEvent extends Event<string, any> = Event> { 
  readonly definition: SmartContractDefinition; 
  readonly client: TClient; 
  readonly iterEvents: (options?: SmartContractIterOptions) => AsyncIterable<TEvent>; 
  readonly iterLogs: (options?: SmartContractIterOptions) => AsyncIterable<Log>; 
  readonly iterActions: (options?: SmartContractIterOptions) => AsyncIterable<TEvent | Log>; 
  readonly convertAction: (action: RawAction) => TEvent | Log | undefined; 
} 

Properties

definition
SmartContractDefinition
The SmartContractDefinition that generated this SmartContract object.
client
TClient
The underlying Client used by this SmartContract.

Methods

iterEvents

Iterate over the events emitted by the smart contract.
(options?: SmartContractIterOptions) => AsyncIterable<TEvent> 

iterLogs

Iterate over the logs emitted by the smart contract.
(options?: SmartContractIterOptions) => AsyncIterable<Log> 

iterActions

Iterate over the events and logs emitted by the smart contract.
(options?: SmartContractIterOptions) => AsyncIterable<TEvent | Log> 

convertAction

Converts a RawAction, typically from the raw results found in a Block to a processed Action or undefined if the action is not recognized by the ABI.
(action: RawAction) => TEvent | Log | undefined 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE