envio 3.6.0 → 3.6.1-subgraph

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/package.json +6 -6
  2. package/src/ChainState.res +10 -4
  3. package/src/ChainState.res.mjs +5 -1
  4. package/src/Config.res +12 -0
  5. package/src/Config.res.mjs +8 -2
  6. package/src/Core.res +15 -0
  7. package/src/Core.res.mjs +11 -0
  8. package/src/EventProcessing.res +6 -6
  9. package/src/EventProcessing.res.mjs +8 -6
  10. package/src/HandlerLoader.res +20 -8
  11. package/src/HandlerLoader.res.mjs +11 -2
  12. package/src/Metrics.res +5 -5
  13. package/src/Metrics.res.mjs +5 -1
  14. package/src/UserContext.res +358 -51
  15. package/src/UserContext.res.mjs +271 -35
  16. package/src/sources/SourceManager.res +6 -12
  17. package/src/sources/SourceManager.res.mjs +8 -5
  18. package/src/subgraph/blocks.ts +176 -0
  19. package/src/subgraph/calls.ts +213 -0
  20. package/src/subgraph/conformance.ts +99 -0
  21. package/src/subgraph/division.ts +100 -0
  22. package/src/subgraph/errors.ts +90 -0
  23. package/src/subgraph/graph-ts-types/VERSION +2 -0
  24. package/src/subgraph/graph-ts-types/chain/arweave.d.ts +70 -0
  25. package/src/subgraph/graph-ts-types/chain/cosmos.d.ts +327 -0
  26. package/src/subgraph/graph-ts-types/chain/ethereum.d.ts +233 -0
  27. package/src/subgraph/graph-ts-types/chain/near.d.ts +253 -0
  28. package/src/subgraph/graph-ts-types/chain/starknet.d.ts +32 -0
  29. package/src/subgraph/graph-ts-types/common/collections.d.ts +136 -0
  30. package/src/subgraph/graph-ts-types/common/conversion.d.ts +11 -0
  31. package/src/subgraph/graph-ts-types/common/datasource.d.ts +30 -0
  32. package/src/subgraph/graph-ts-types/common/eager-offset.d.ts +0 -0
  33. package/src/subgraph/graph-ts-types/common/json.d.ts +17 -0
  34. package/src/subgraph/graph-ts-types/common/numbers.d.ts +120 -0
  35. package/src/subgraph/graph-ts-types/common/value.d.ts +120 -0
  36. package/src/subgraph/graph-ts-types/common/yaml.d.ts +90 -0
  37. package/src/subgraph/graph-ts-types/global/global.d.ts +194 -0
  38. package/src/subgraph/graph-ts-types/helper-functions.d.ts +22 -0
  39. package/src/subgraph/graph-ts-types/index.d.ts +102 -0
  40. package/src/subgraph/graph-ts.ts +1695 -0
  41. package/src/subgraph/hosts.ts +148 -0
  42. package/src/subgraph/runtime.ts +827 -0
  43. package/src/subgraph/scope.ts +63 -0
@@ -0,0 +1,327 @@
1
+ import '../common/eager-offset';
2
+ import { Bytes } from '../common/collections';
3
+ export declare namespace cosmos {
4
+ class Block {
5
+ header: Header;
6
+ evidence: EvidenceList;
7
+ lastCommit: Commit;
8
+ resultBeginBlock: ResponseBeginBlock;
9
+ resultEndBlock: ResponseEndBlock;
10
+ transactions: Array<TxResult>;
11
+ validatorUpdates: Array<Validator>;
12
+ constructor(header: Header, evidence: EvidenceList, lastCommit: Commit, resultBeginBlock: ResponseBeginBlock, resultEndBlock: ResponseEndBlock, transactions: Array<TxResult>, validatorUpdates: Array<Validator>);
13
+ }
14
+ class HeaderOnlyBlock {
15
+ header: Header;
16
+ constructor(header: Header);
17
+ }
18
+ class EventData {
19
+ event: Event;
20
+ block: HeaderOnlyBlock;
21
+ tx: TransactionContext;
22
+ constructor(event: Event, block: HeaderOnlyBlock, tx: TransactionContext);
23
+ }
24
+ class TransactionData {
25
+ tx: TxResult;
26
+ block: HeaderOnlyBlock;
27
+ constructor(tx: TxResult, block: HeaderOnlyBlock);
28
+ }
29
+ class MessageData {
30
+ message: Any;
31
+ block: HeaderOnlyBlock;
32
+ tx: TransactionContext;
33
+ constructor(message: Any, block: HeaderOnlyBlock, tx: TransactionContext);
34
+ }
35
+ class TransactionContext {
36
+ hash: Bytes;
37
+ index: number;
38
+ code: number;
39
+ gasWanted: bigint;
40
+ gasUsed: bigint;
41
+ constructor(hash: Bytes, index: number, code: number, gasWanted: bigint, gasUsed: bigint);
42
+ }
43
+ class Header {
44
+ version: Consensus;
45
+ chainId: string;
46
+ height: bigint;
47
+ time: Timestamp;
48
+ lastBlockId: BlockID;
49
+ lastCommitHash: Bytes;
50
+ dataHash: Bytes;
51
+ validatorsHash: Bytes;
52
+ nextValidatorsHash: Bytes;
53
+ consensusHash: Bytes;
54
+ appHash: Bytes;
55
+ lastResultsHash: Bytes;
56
+ evidenceHash: Bytes;
57
+ proposerAddress: Bytes;
58
+ hash: Bytes;
59
+ constructor(version: Consensus, chainId: string, height: bigint, time: Timestamp, lastBlockId: BlockID, lastCommitHash: Bytes, dataHash: Bytes, validatorsHash: Bytes, nextValidatorsHash: Bytes, consensusHash: Bytes, appHash: Bytes, lastResultsHash: Bytes, evidenceHash: Bytes, proposerAddress: Bytes, hash: Bytes);
60
+ }
61
+ class Consensus {
62
+ block: bigint;
63
+ app: bigint;
64
+ constructor(block: bigint, app: bigint);
65
+ }
66
+ class Timestamp {
67
+ seconds: bigint;
68
+ nanos: number;
69
+ constructor(seconds: bigint, nanos: number);
70
+ }
71
+ class BlockID {
72
+ hash: Bytes;
73
+ partSetHeader: PartSetHeader;
74
+ constructor(hash: Bytes, partSetHeader: PartSetHeader);
75
+ }
76
+ class PartSetHeader {
77
+ total: number;
78
+ hash: Bytes;
79
+ constructor(total: number, hash: Bytes);
80
+ }
81
+ class EvidenceList {
82
+ evidence: Array<Evidence>;
83
+ constructor(evidence: Array<Evidence>);
84
+ }
85
+ class Evidence {
86
+ duplicateVoteEvidence: DuplicateVoteEvidence;
87
+ lightClientAttackEvidence: LightClientAttackEvidence;
88
+ constructor(duplicateVoteEvidence: DuplicateVoteEvidence, lightClientAttackEvidence: LightClientAttackEvidence);
89
+ }
90
+ class DuplicateVoteEvidence {
91
+ voteA: EventVote;
92
+ voteB: EventVote;
93
+ totalVotingPower: bigint;
94
+ validatorPower: bigint;
95
+ timestamp: Timestamp;
96
+ constructor(voteA: EventVote, voteB: EventVote, totalVotingPower: bigint, validatorPower: bigint, timestamp: Timestamp);
97
+ }
98
+ class EventVote {
99
+ eventVoteType: SignedMsgType;
100
+ height: bigint;
101
+ round: number;
102
+ blockId: BlockID;
103
+ timestamp: Timestamp;
104
+ validatorAddress: Bytes;
105
+ validatorIndex: number;
106
+ signature: Bytes;
107
+ constructor(eventVoteType: SignedMsgType, height: bigint, round: number, blockId: BlockID, timestamp: Timestamp, validatorAddress: Bytes, validatorIndex: number, signature: Bytes);
108
+ }
109
+ enum SignedMsgType {
110
+ SIGNED_MSG_TYPE_UNKNOWN = 0,
111
+ SIGNED_MSG_TYPE_PREVOTE = 1,
112
+ SIGNED_MSG_TYPE_PRECOMMIT = 2,
113
+ SIGNED_MSG_TYPE_PROPOSAL = 32
114
+ }
115
+ class LightClientAttackEvidence {
116
+ conflictingBlock: LightBlock;
117
+ commonHeight: bigint;
118
+ byzantineValidators: Array<Validator>;
119
+ totalVotingPower: bigint;
120
+ timestamp: Timestamp;
121
+ constructor(conflictingBlock: LightBlock, commonHeight: bigint, byzantineValidators: Array<Validator>, totalVotingPower: bigint, timestamp: Timestamp);
122
+ }
123
+ class LightBlock {
124
+ signedHeader: SignedHeader;
125
+ validatorSet: ValidatorSet;
126
+ constructor(signedHeader: SignedHeader, validatorSet: ValidatorSet);
127
+ }
128
+ class SignedHeader {
129
+ header: Header;
130
+ commit: Commit;
131
+ constructor(header: Header, commit: Commit);
132
+ }
133
+ class Commit {
134
+ height: bigint;
135
+ round: number;
136
+ blockId: BlockID;
137
+ signatures: Array<CommitSig>;
138
+ constructor(height: bigint, round: number, blockId: BlockID, signatures: Array<CommitSig>);
139
+ }
140
+ class CommitSig {
141
+ blockIdFlag: BlockIDFlag;
142
+ validatorAddress: Bytes;
143
+ timestamp: Timestamp;
144
+ signature: Bytes;
145
+ constructor(blockIdFlag: BlockIDFlag, validatorAddress: Bytes, timestamp: Timestamp, signature: Bytes);
146
+ }
147
+ enum BlockIDFlag {
148
+ BLOCK_ID_FLAG_UNKNOWN = 0,
149
+ BLOCK_ID_FLAG_ABSENT = 1,
150
+ BLOCK_ID_FLAG_COMMIT = 2,
151
+ BLOCK_ID_FLAG_NIL = 3
152
+ }
153
+ class ValidatorSet {
154
+ validators: Array<Validator>;
155
+ proposer: Validator;
156
+ totalVotingPower: bigint;
157
+ constructor(validators: Array<Validator>, proposer: Validator, totalVotingPower: bigint);
158
+ }
159
+ class Validator {
160
+ address: Bytes;
161
+ pubKey: PublicKey;
162
+ votingPower: bigint;
163
+ proposerPriority: bigint;
164
+ constructor(address: Bytes, pubKey: PublicKey, votingPower: bigint, proposerPriority: bigint);
165
+ }
166
+ class PublicKey {
167
+ ed25519: Bytes;
168
+ secp256k1: Bytes;
169
+ constructor(ed25519: Bytes, secp256k1: Bytes);
170
+ }
171
+ class ResponseBeginBlock {
172
+ events: Array<Event>;
173
+ constructor(events: Array<Event>);
174
+ }
175
+ class Event {
176
+ eventType: string;
177
+ attributes: Array<EventAttribute>;
178
+ constructor(eventType: string, attributes: Array<EventAttribute>);
179
+ getAttribute(key: string): EventAttribute | null;
180
+ getAttributeValue(key: string): string;
181
+ }
182
+ class EventAttribute {
183
+ key: string;
184
+ value: string;
185
+ index: boolean;
186
+ constructor(key: string, value: string, index: boolean);
187
+ }
188
+ class ResponseEndBlock {
189
+ validatorUpdates: Array<ValidatorUpdate>;
190
+ consensusParamUpdates: ConsensusParams;
191
+ events: Array<Event>;
192
+ constructor(validatorUpdates: Array<ValidatorUpdate>, consensusParamUpdates: ConsensusParams, events: Array<Event>);
193
+ }
194
+ class ValidatorUpdate {
195
+ address: Bytes;
196
+ pubKey: PublicKey;
197
+ power: bigint;
198
+ constructor(address: Bytes, pubKey: PublicKey, power: bigint);
199
+ }
200
+ class ConsensusParams {
201
+ block: BlockParams;
202
+ evidence: EvidenceParams;
203
+ validator: ValidatorParams;
204
+ version: VersionParams;
205
+ constructor(block: BlockParams, evidence: EvidenceParams, validator: ValidatorParams, version: VersionParams);
206
+ }
207
+ class BlockParams {
208
+ maxBytes: bigint;
209
+ maxGas: bigint;
210
+ constructor(maxBytes: bigint, maxGas: bigint);
211
+ }
212
+ class EvidenceParams {
213
+ maxAgeNumBlocks: bigint;
214
+ maxAgeDuration: Duration;
215
+ maxBytes: bigint;
216
+ constructor(maxAgeNumBlocks: bigint, maxAgeDuration: Duration, maxBytes: bigint);
217
+ }
218
+ class Duration {
219
+ seconds: bigint;
220
+ nanos: number;
221
+ constructor(seconds: bigint, nanos: number);
222
+ }
223
+ class ValidatorParams {
224
+ pubKeyTypes: Array<string>;
225
+ constructor(pubKeyTypes: Array<string>);
226
+ }
227
+ class VersionParams {
228
+ appVersion: bigint;
229
+ constructor(appVersion: bigint);
230
+ }
231
+ class TxResult {
232
+ height: bigint;
233
+ index: number;
234
+ tx: Tx;
235
+ result: ResponseDeliverTx;
236
+ hash: Bytes;
237
+ constructor(height: bigint, index: number, tx: Tx, result: ResponseDeliverTx, hash: Bytes);
238
+ }
239
+ class Tx {
240
+ body: TxBody;
241
+ authInfo: AuthInfo;
242
+ signatures: Array<Bytes>;
243
+ constructor(body: TxBody, authInfo: AuthInfo, signatures: Array<Bytes>);
244
+ }
245
+ class TxBody {
246
+ messages: Array<Any>;
247
+ memo: string;
248
+ timeoutHeight: bigint;
249
+ extensionOptions: Array<Any>;
250
+ nonCriticalExtensionOptions: Array<Any>;
251
+ constructor(messages: Array<Any>, memo: string, timeoutHeight: bigint, extensionOptions: Array<Any>, nonCriticalExtensionOptions: Array<Any>);
252
+ }
253
+ class Any {
254
+ typeUrl: string;
255
+ value: Bytes;
256
+ constructor(typeUrl: string, value: Bytes);
257
+ }
258
+ class AuthInfo {
259
+ signerInfos: Array<SignerInfo>;
260
+ fee: Fee;
261
+ tip: Tip;
262
+ constructor(signerInfos: Array<SignerInfo>, fee: Fee, tip: Tip);
263
+ }
264
+ class SignerInfo {
265
+ publicKey: Any;
266
+ modeInfo: ModeInfo;
267
+ sequence: bigint;
268
+ constructor(publicKey: Any, modeInfo: ModeInfo, sequence: bigint);
269
+ }
270
+ class ModeInfo {
271
+ single: ModeInfoSingle;
272
+ multi: ModeInfoMulti;
273
+ constructor(single: ModeInfoSingle, multi: ModeInfoMulti);
274
+ }
275
+ class ModeInfoSingle {
276
+ mode: SignMode;
277
+ constructor(mode: SignMode);
278
+ }
279
+ enum SignMode {
280
+ SIGN_MODE_UNSPECIFIED = 0,
281
+ SIGN_MODE_DIRECT = 1,
282
+ SIGN_MODE_TEXTUAL = 2,
283
+ SIGN_MODE_LEGACY_AMINO_JSON = 127
284
+ }
285
+ class ModeInfoMulti {
286
+ bitarray: CompactBitArray;
287
+ modeInfos: Array<ModeInfo>;
288
+ constructor(bitarray: CompactBitArray, modeInfos: Array<ModeInfo>);
289
+ }
290
+ class CompactBitArray {
291
+ extraBitsStored: number;
292
+ elems: Bytes;
293
+ constructor(extraBitsStored: number, elems: Bytes);
294
+ }
295
+ class Fee {
296
+ amount: Array<Coin>;
297
+ gasLimit: bigint;
298
+ payer: string;
299
+ granter: string;
300
+ constructor(amount: Array<Coin>, gasLimit: bigint, payer: string, granter: string);
301
+ }
302
+ class Coin {
303
+ denom: string;
304
+ amount: string;
305
+ constructor(denom: string, amount: string);
306
+ }
307
+ class Tip {
308
+ amount: Array<Coin>;
309
+ tipper: string;
310
+ constructor(amount: Array<Coin>, tipper: string);
311
+ }
312
+ class ResponseDeliverTx {
313
+ code: number;
314
+ data: Bytes;
315
+ log: string;
316
+ info: string;
317
+ gasWanted: bigint;
318
+ gasUsed: bigint;
319
+ events: Array<Event>;
320
+ codespace: string;
321
+ constructor(code: number, data: Bytes, log: string, info: string, gasWanted: bigint, gasUsed: bigint, events: Array<Event>, codespace: string);
322
+ }
323
+ class ValidatorSetUpdates {
324
+ validatorUpdates: Array<Validator>;
325
+ constructor(validatorUpdates: Array<Validator>);
326
+ }
327
+ }
@@ -0,0 +1,233 @@
1
+ import '../common/eager-offset';
2
+ import { Bytes, Wrapped } from '../common/collections';
3
+ import { Address, BigInt } from '../common/numbers';
4
+ /** Host Ethereum interface */
5
+ export declare namespace ethereum {
6
+ function call(call: SmartContractCall): Array<Value> | null;
7
+ function getBalance(address: Address): BigInt;
8
+ function hasCode(address: Address): Wrapped<boolean>;
9
+ function encode(token: Value): Bytes | null;
10
+ function decode(types: string, data: Bytes): Value | null;
11
+ }
12
+ export declare namespace ethereum {
13
+ /** Type hint for Ethereum values. */
14
+ enum ValueKind {
15
+ ADDRESS = 0,
16
+ FIXED_BYTES = 1,
17
+ BYTES = 2,
18
+ INT = 3,
19
+ UINT = 4,
20
+ BOOL = 5,
21
+ STRING = 6,
22
+ FIXED_ARRAY = 7,
23
+ ARRAY = 8,
24
+ TUPLE = 9
25
+ }
26
+ /**
27
+ * Pointer type for Ethereum value data.
28
+ *
29
+ * Big enough to fit any pointer or native `this.data`.
30
+ */
31
+ type ValuePayload = bigint;
32
+ /**
33
+ * A dynamically typed value used when accessing Ethereum data.
34
+ */
35
+ class Value {
36
+ kind: ValueKind;
37
+ data: ValuePayload;
38
+ constructor(kind: ValueKind, data: ValuePayload);
39
+ lt(_: Value): boolean;
40
+ gt(_: Value): boolean;
41
+ toAddress(): Address;
42
+ toBoolean(): boolean;
43
+ toBytes(): Bytes;
44
+ toI32(): number;
45
+ toBigInt(): BigInt;
46
+ toString(): string;
47
+ toArray(): Array<Value>;
48
+ toTuple(): Tuple;
49
+ toMatrix(): Array<Array<Value>>;
50
+ toTupleArray<T extends Tuple>(): Array<T>;
51
+ toTupleMatrix<T extends Tuple>(): Array<Array<T>>;
52
+ toBooleanArray(): Array<boolean>;
53
+ toBytesArray(): Array<Bytes>;
54
+ toAddressArray(): Array<Address>;
55
+ toStringArray(): Array<string>;
56
+ toI32Array(): Array<number>;
57
+ toBigIntArray(): Array<BigInt>;
58
+ toBooleanMatrix(): Array<Array<boolean>>;
59
+ toBytesMatrix(): Array<Array<Bytes>>;
60
+ toAddressMatrix(): Array<Array<Address>>;
61
+ toStringMatrix(): Array<Array<string>>;
62
+ toI32Matrix(): Array<Array<number>>;
63
+ toBigIntMatrix(): Array<Array<BigInt>>;
64
+ static fromAddress(address: Address): Value;
65
+ static fromBoolean(b: boolean): Value;
66
+ static fromBytes(bytes: Bytes): Value;
67
+ static fromFixedBytes(bytes: Bytes): Value;
68
+ static fromI32(i: number): Value;
69
+ static fromSignedBigInt(i: BigInt): Value;
70
+ static fromUnsignedBigInt(i: BigInt): Value;
71
+ static fromString(s: string): Value;
72
+ static fromArray(values: Array<Value>): Value;
73
+ static fromFixedSizedArray(values: Array<Value>): Value;
74
+ static fromTuple(values: Tuple): Value;
75
+ static fromMatrix(values: Array<Array<Value>>): Value;
76
+ static fromTupleArray(values: Array<Tuple>): Value;
77
+ static fromTupleMatrix(values: Array<Array<Tuple>>): Value;
78
+ static fromBooleanArray(values: Array<boolean>): Value;
79
+ static fromBytesArray(values: Array<Bytes>): Value;
80
+ static fromFixedBytesArray(values: Array<Bytes>): Value;
81
+ static fromAddressArray(values: Array<Address>): Value;
82
+ static fromStringArray(values: Array<string>): Value;
83
+ static fromI32Array(values: Array<number>): Value;
84
+ static fromSignedBigIntArray(values: Array<BigInt>): Value;
85
+ static fromUnsignedBigIntArray(values: Array<BigInt>): Value;
86
+ static fromBooleanMatrix(values: Array<Array<boolean>>): Value;
87
+ static fromBytesMatrix(values: Array<Array<Bytes>>): Value;
88
+ static fromFixedBytesMatrix(values: Array<Array<Bytes>>): Value;
89
+ static fromAddressMatrix(values: Array<Array<Address>>): Value;
90
+ static fromStringMatrix(values: Array<Array<string>>): Value;
91
+ static fromI32Matrix(values: Array<Array<number>>): Value;
92
+ static fromSignedBigIntMatrix(values: Array<Array<BigInt>>): Value;
93
+ static fromUnsignedBigIntMatrix(values: Array<Array<BigInt>>): Value;
94
+ }
95
+ /**
96
+ * Common representation for Ethereum tuples / Solidity structs.
97
+ *
98
+ * This base class stores the tuple/struct values in an array. The Graph CLI
99
+ * code generation then creates subclasses that provide named getters to
100
+ * access the members by name.
101
+ */
102
+ class Tuple extends Array<Value> {
103
+ }
104
+ /**
105
+ * An Ethereum block.
106
+ */
107
+ class Block {
108
+ hash: Bytes;
109
+ parentHash: Bytes;
110
+ unclesHash: Bytes;
111
+ author: Address;
112
+ stateRoot: Bytes;
113
+ transactionsRoot: Bytes;
114
+ receiptsRoot: Bytes;
115
+ number: BigInt;
116
+ gasUsed: BigInt;
117
+ gasLimit: BigInt;
118
+ timestamp: BigInt;
119
+ difficulty: BigInt;
120
+ totalDifficulty: BigInt;
121
+ size: BigInt | null;
122
+ baseFeePerGas: BigInt | null;
123
+ constructor(hash: Bytes, parentHash: Bytes, unclesHash: Bytes, author: Address, stateRoot: Bytes, transactionsRoot: Bytes, receiptsRoot: Bytes, number: BigInt, gasUsed: BigInt, gasLimit: BigInt, timestamp: BigInt, difficulty: BigInt, totalDifficulty: BigInt, size: BigInt | null, baseFeePerGas: BigInt | null);
124
+ }
125
+ /**
126
+ * An Ethereum transaction.
127
+ */
128
+ class Transaction {
129
+ hash: Bytes;
130
+ index: BigInt;
131
+ from: Address;
132
+ to: Address | null;
133
+ value: BigInt;
134
+ gasLimit: BigInt;
135
+ gasPrice: BigInt;
136
+ input: Bytes;
137
+ nonce: BigInt;
138
+ constructor(hash: Bytes, index: BigInt, from: Address, to: Address | null, value: BigInt, gasLimit: BigInt, gasPrice: BigInt, input: Bytes, nonce: BigInt);
139
+ }
140
+ /**
141
+ * An Ethereum transaction receipt.
142
+ */
143
+ class TransactionReceipt {
144
+ transactionHash: Bytes;
145
+ transactionIndex: BigInt;
146
+ blockHash: Bytes;
147
+ blockNumber: BigInt;
148
+ cumulativeGasUsed: BigInt;
149
+ gasUsed: BigInt;
150
+ contractAddress: Address;
151
+ logs: Array<Log>;
152
+ status: BigInt;
153
+ root: Bytes;
154
+ logsBloom: Bytes;
155
+ constructor(transactionHash: Bytes, transactionIndex: BigInt, blockHash: Bytes, blockNumber: BigInt, cumulativeGasUsed: BigInt, gasUsed: BigInt, contractAddress: Address, logs: Array<Log>, status: BigInt, root: Bytes, logsBloom: Bytes);
156
+ }
157
+ /**
158
+ * An Ethereum event log.
159
+ */
160
+ class Log {
161
+ address: Address;
162
+ topics: Array<Bytes>;
163
+ data: Bytes;
164
+ blockHash: Bytes;
165
+ blockNumber: Bytes;
166
+ transactionHash: Bytes;
167
+ transactionIndex: BigInt;
168
+ logIndex: BigInt;
169
+ transactionLogIndex: BigInt;
170
+ logType: string;
171
+ removed: Wrapped<boolean> | null;
172
+ constructor(address: Address, topics: Array<Bytes>, data: Bytes, blockHash: Bytes, blockNumber: Bytes, transactionHash: Bytes, transactionIndex: BigInt, logIndex: BigInt, transactionLogIndex: BigInt, logType: string, removed: Wrapped<boolean> | null);
173
+ }
174
+ /**
175
+ * Common representation for Ethereum smart contract calls.
176
+ */
177
+ class Call {
178
+ to: Address;
179
+ from: Address;
180
+ block: Block;
181
+ transaction: Transaction;
182
+ inputValues: Array<EventParam>;
183
+ outputValues: Array<EventParam>;
184
+ constructor(to: Address, from: Address, block: Block, transaction: Transaction, inputValues: Array<EventParam>, outputValues: Array<EventParam>);
185
+ }
186
+ /**
187
+ * Common representation for Ethereum smart contract events.
188
+ */
189
+ class Event {
190
+ address: Address;
191
+ logIndex: BigInt;
192
+ transactionLogIndex: BigInt;
193
+ logType: string | null;
194
+ block: Block;
195
+ transaction: Transaction;
196
+ parameters: Array<EventParam>;
197
+ receipt: TransactionReceipt | null;
198
+ constructor(address: Address, logIndex: BigInt, transactionLogIndex: BigInt, logType: string | null, block: Block, transaction: Transaction, parameters: Array<EventParam>, receipt: TransactionReceipt | null);
199
+ }
200
+ /**
201
+ * A dynamically-typed Ethereum event parameter.
202
+ */
203
+ class EventParam {
204
+ name: string;
205
+ value: Value;
206
+ constructor(name: string, value: Value);
207
+ }
208
+ class SmartContractCall {
209
+ contractName: string;
210
+ contractAddress: Address;
211
+ functionName: string;
212
+ functionSignature: string;
213
+ functionParams: Array<Value>;
214
+ constructor(contractName: string, contractAddress: Address, functionName: string, functionSignature: string, functionParams: Array<Value>);
215
+ }
216
+ /**
217
+ * Low-level interaction with Ethereum smart contracts
218
+ */
219
+ class SmartContract {
220
+ _name: string;
221
+ _address: Address;
222
+ protected constructor(name: string, address: Address);
223
+ call(name: string, signature: string, params: Array<Value>): Array<Value>;
224
+ tryCall(name: string, signature: string, params: Array<Value>): CallResult<Array<Value>>;
225
+ }
226
+ class CallResult<T> {
227
+ private _value;
228
+ constructor();
229
+ static fromValue<T>(value: T): CallResult<T>;
230
+ get reverted(): boolean;
231
+ get value(): T;
232
+ }
233
+ }