1 | # Schema Description: Truffle Contract Network Instance Object
|
2 |
|
3 | | type | _object_ |
|
4 | | ---: | ---- |
|
5 | | JSON Schema | [network-object.spec.json](spec/network-object.spec.json) |
|
6 |
|
7 | Contract instances encoded within the contract object schema follow the format
|
8 | described herein. Each instance ("network object") must include the address for
|
9 | the contract on the network, as well as may include additional information as
|
10 | appropriate. This may include a listing of event descriptions according to the
|
11 | ABI, and links to dependent instances of other contracts (within the same
|
12 | network).
|
13 |
|
14 |
|
15 | ## Properties
|
16 |
|
17 | ### `address`
|
18 |
|
19 | | type | _string_ matching pattern `^0x[a-fA-F0-9]{40}$` |
|
20 | | ---: | ---- |
|
21 | | ref | [Address](#network-object--address) |
|
22 | | **required** |
|
23 |
|
24 | The contract instance's primary identifier on the network. 40 character long
|
25 | hexadecimal string, prefixed by `0x`.
|
26 |
|
27 |
|
28 | ### `events`
|
29 |
|
30 | | type | _object_ |
|
31 | | ---: | ---- |
|
32 | | default | `{}` |
|
33 |
|
34 | Listing of events the contract instance may produce, either directly or
|
35 | indirectly, via dependent, linked instances. Object mapping event hash
|
36 | identifiers (`0x`-prefixed 64-character hexadecimal strings) to semantically
|
37 | meaningful descriptions of the event.
|
38 |
|
39 | #### `events` Properties (key matching `^0x[a-fA-F0-9]{64}$`)
|
40 |
|
41 | | type | _object_ |
|
42 | | ---: | ---- |
|
43 | | ref | [abi.spec.json](spec/abi.spec.json) |
|
44 |
|
45 | Ethereum Contract JSON ABI item representing an EVM output log event for a
|
46 | contract. Matches objects with `"type": "event"` in the JSON ABI.
|
47 |
|
48 |
|
49 |
|
50 | ### `links`
|
51 |
|
52 | | type | _object_ |
|
53 | | ---: | ---- |
|
54 | | default | `{}` |
|
55 |
|
56 | Listing of dependent contract instances and their events. Facilitates the
|
57 | resolution of link references for a particular contract to instances of other
|
58 | contracts. Object mapping linked contract names to objects representing an
|
59 | individual link.
|
60 |
|
61 | #### `links` Properties (key matching `^[a-zA-Z_][a-zA-Z0-9_]*$`)
|
62 |
|
63 | | type | _object_ |
|
64 | | ---: | ---- |
|
65 |
|
66 | Object representing linked contract instance.
|
67 |
|
68 | ##### Link Object Properties
|
69 |
|
70 | ###### `address`
|
71 |
|
72 | | type | _string_ matching pattern `^0x[a-fA-F0-9]{40}$` |
|
73 | | ---: | ---- |
|
74 | | ref | [Address](#network-object--address) |
|
75 |
|
76 | The primary locator for the linked contract.
|
77 |
|
78 | ###### `events`
|
79 |
|
80 | | type | _object_ |
|
81 | | ---: | ---- |
|
82 |
|
83 | Listing of events the _linked_ contract instance may produce, either directly or
|
84 | indirectly, via its own dependent, linked instances. Object mapping event hash
|
85 | identifiers (`0x`-prefixed 64-character hexadecimal strings) to semantically
|
86 | meaningful descriptions of the event.
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 | ## Definitions
|
93 |
|
94 | ### <a name="network-object--address">Address</a>
|
95 |
|
96 | | type | _string_ matching pattern `^0x[a-fA-F0-9]{40}$` |
|
97 | | ---: | ---- |
|
98 |
|
99 | Primary identifier for an account on an EVM blockchain network. 40 character
|
100 | long hexadecimal string, prefixed by `0x`.
|