Back to Truffle

Schema Description: Truffle Contract Network Instance Object

packages/contract-schema/network-object.spec.md

5.11.52.7 KB
Original Source

Schema Description: Truffle Contract Network Instance Object

typeobject
JSON Schemanetwork-object.spec.json

Contract instances encoded within the contract object schema follow the format described herein. Each instance ("network object") must include the address for the contract on the network, as well as may include additional information as appropriate. This may include a listing of event descriptions according to the ABI, and links to dependent instances of other contracts (within the same network).

Properties

address

typestring matching pattern ^0x[a-fA-F0-9]{40}$
refAddress
required

The contract instance's primary identifier on the network. 40 character long hexadecimal string, prefixed by 0x.

events

typeobject
default{}

Listing of events the contract instance may produce, either directly or indirectly, via dependent, linked instances. Object mapping event hash identifiers (0x-prefixed 64-character hexadecimal strings) to semantically meaningful descriptions of the event.

events Properties (key matching ^0x[a-fA-F0-9]{64}$)

typeobject
refabi.spec.json

Ethereum Contract JSON ABI item representing an EVM output log event for a contract. Matches objects with "type": "event" in the JSON ABI.

typeobject
default{}

Listing of dependent contract instances and their events. Facilitates the resolution of link references for a particular contract to instances of other contracts. Object mapping linked contract names to objects representing an individual link.

links Properties (key matching ^[a-zA-Z_][a-zA-Z0-9_]*$)

typeobject

Object representing linked contract instance.

Link Object Properties
address
typestring matching pattern ^0x[a-fA-F0-9]{40}$
refAddress

The primary locator for the linked contract.

events
typeobject

Listing of events the linked contract instance may produce, either directly or indirectly, via its own dependent, linked instances. Object mapping event hash identifiers (0x-prefixed 64-character hexadecimal strings) to semantically meaningful descriptions of the event.

Definitions

<a name="network-object--address">Address</a>

typestring matching pattern ^0x[a-fA-F0-9]{40}$

Primary identifier for an account on an EVM blockchain network. 40 character long hexadecimal string, prefixed by 0x.