开发者社区> 镜像站> NPM> truffle-conflux-decoder
truffle-conflux-decoder
A library that provides both high and low level decoding of Ethereum contract variables
Last updated a year ago by liuis .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install truffle-conflux-decoder 
SYNC missed versions from official npm registry.

Truffle Contract Decoder

This module provides interfaces for decoding contract state and events.

Usage

import decoder from 'truffle-conflux-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

Current Tags

  • 0.0.2-alpha.0                                ...           latest (a year ago)

1 Versions

  • 0.0.2-alpha.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (10)
Dev Dependencies (11)
Dependents (1)