diff --git a/chain/ethereum.ts b/chain/ethereum.ts index 9effc73..3532382 100644 --- a/chain/ethereum.ts +++ b/chain/ethereum.ts @@ -360,6 +360,44 @@ export namespace ethereum { ) {} } + /** + * An Ethereum transaction receipt. + */ + export class TransactionReceipt { + constructor( + public transactionHash: Bytes, + public transactionIndex: BigInt, + public blockHash: Bytes, + public blockNumber: BigInt, + public cumulativeGasUsed: BigInt, + public gasUsed: BigInt, + public contractAddress: Address, + public logs: Array, + public status: BigInt, + public root: Bytes, + public logsBloom: Bytes, + ) {} + } + + /** + * An Ethereum event log. + */ + export class Log { + constructor( + public address: Address, + public topics: Array, + public data: Bytes, + public blockHash: Bytes, + public blockNumber: Bytes, + public transactionHash: Bytes, + public transactionIndex: BigInt, + public logIndex: BigInt, + public transactionLogIndex: BigInt, + public logType: string, + public removed: Wrapped | null, + ) {} + } + /** * Common representation for Ethereum smart contract calls. */ @@ -386,6 +424,7 @@ export namespace ethereum { public block: Block, public transaction: Transaction, public parameters: Array, + public receipt: TransactionReceipt | null, ) {} } diff --git a/global/global.ts b/global/global.ts index 2c92773..e0d29a6 100644 --- a/global/global.ts +++ b/global/global.ts @@ -65,6 +65,7 @@ export enum TypeId { ArrayF32 = 49, ArrayF64 = 50, ArrayBigDecimal = 51, + // Near types NearArrayDataReceiver = 52, NearArrayCryptoHash = 53, NearArrayActionValue = 54, @@ -100,6 +101,7 @@ export enum TypeId { NearChunkHeader = 84, NearBlock = 85, NearReceiptWithOutcome = 86, + // Tendermint types TendermintArrayEventTx = 87, TendermintArrayEvent = 88, TendermintArrayCommitSig = 89, @@ -147,6 +149,11 @@ export enum TypeId { TendermintDuration = 131, TendermintTimestamp = 132, TendermintEventData = 133, + // More ethereum types + TransactionReceipt = 134, + Log = 135, + ArrayH256 = 136, + ArrayLog = 137, } export function id_of_type(typeId: TypeId): usize { @@ -420,6 +427,14 @@ export function id_of_type(typeId: TypeId): usize { return idof() case TypeId.TendermintEventData: return idof() + case TypeId.TransactionReceipt: + return idof() + case TypeId.Log: + return idof() + case TypeId.ArrayH256: + return idof>() + case TypeId.ArrayLog: + return idof>() default: return 0 } diff --git a/package.json b/package.json index 913d7aa..cd83000 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@graphprotocol/graph-ts", "description": "TypeScript/AssemblyScript library for writing subgraph mappings for The Graph", - "version": "0.26.0", + "version": "0.27.0-alpha.0", "module": "index.ts", "types": "index.ts", "main": "index.ts",