Skip to content
This repository was archived by the owner on Feb 23, 2023. It is now read-only.

Commit 697aa48

Browse files
committed
chain/ethereum: Add additional ethereum block structs
1 parent 73054c3 commit 697aa48

File tree

1 file changed

+60
-0
lines changed

1 file changed

+60
-0
lines changed

chain/ethereum.ts

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,48 @@ export namespace ethereum {
352352
size: BigInt | null
353353
}
354354

355+
/**
356+
* An Ethereum block with transactions.
357+
*/
358+
export class FullBlock {
359+
hash: Bytes
360+
parentHash: Bytes
361+
unclesHash: Bytes
362+
author: Address
363+
stateRoot: Bytes
364+
transactionsRoot: Bytes
365+
receiptsRoot: Bytes
366+
number: BigInt
367+
gasUsed: BigInt
368+
gasLimit: BigInt
369+
timestamp: BigInt
370+
difficulty: BigInt
371+
totalDifficulty: BigInt
372+
size: BigInt | null
373+
transactions: Array<Transaction>
374+
}
375+
376+
/**
377+
* An Ethereum block with transactions and their receipts.
378+
*/
379+
export class FullBlockWithReceipts {
380+
hash: Bytes
381+
parentHash: Bytes
382+
unclesHash: Bytes
383+
author: Address
384+
stateRoot: Bytes
385+
transactionsRoot: Bytes
386+
receiptsRoot: Bytes
387+
number: BigInt
388+
gasUsed: BigInt
389+
gasLimit: BigInt
390+
timestamp: BigInt
391+
difficulty: BigInt
392+
totalDifficulty: BigInt
393+
size: BigInt | null
394+
transactionsReceipts: Array<TransactionWithReceipt>
395+
}
396+
355397
/**
356398
* An Ethereum transaction.
357399
*/
@@ -366,6 +408,24 @@ export namespace ethereum {
366408
input: Bytes
367409
}
368410

411+
/**
412+
* An Ethereum transaction with receipt.
413+
*/
414+
export class TransactionWithReceipt {
415+
hash: Bytes
416+
index: BigInt
417+
from: Address
418+
to: Address | null
419+
value: BigInt
420+
status: BigInt
421+
root: Bytes
422+
contractAddress: Address
423+
cumulativeGasUsed: BigInt
424+
gasUsed: BigInt
425+
gasPrice: BigInt
426+
input: Bytes
427+
}
428+
369429
/**
370430
* Common representation for Ethereum smart contract calls.
371431
*/

0 commit comments

Comments
 (0)