This package has been deprecated

Author message:

WARNING: This package has been renamed to @truffle/decoder.

truffle-decoder
TypeScript icon, indicating that this package has built-in type declarations

3.0.11 • Public • Published

Truffle Contract Decoder

This module provides interfaces for decoding contract state and events.

Usage

import decoder from 'truffle-contract-decoder';

const contractDecoder = await decoder.for(instance: TruffleContract);

Types

BlockNumber

number | "latest"

ContractDecoder

An instance of this class represents a decoder for a TruffleContract deployed instance.

Methods

state

contractDecoder.state(block: BlockNumber = "latest"): Promise<Interface ContractState>

variable

contractDecoder.variable(variable: string, block: BlockNumber = "latest"): Promise<Interface DecodedVariable>

events

contractDecoder.events(name: string | null = null, block: BlockNumber = "latest"): Promise<Interface ContractEvent[]>

onEvent

contractDecoder.onEvent(name: string, callback: Function(event: ContractEvent, callback: Function(err: Error | falsy = null)))

ContractState

DecodedVariable

ContractEvent

Package Sidebar

Install

npm i truffle-decoder

Weekly Downloads

5

Version

3.0.11

License

MIT

Unpacked Size

355 kB

Total Files

92

Last publish

Collaborators

  • rizedr
  • jeff.smale
  • kevinbluer
  • davidmurdoch
  • fainashalts
  • cds-amal
  • gnidan
  • seesemichaelj