diff --git a/thegraph/packages/ormpipe/schema.graphql b/thegraph/packages/ormpipe/schema.graphql index a98078a..354d308 100644 --- a/thegraph/packages/ormpipe/schema.graphql +++ b/thegraph/packages/ormpipe/schema.graphql @@ -67,16 +67,19 @@ type OrmpProtocolMessageAccepted @entity(immutable: true) { blockNumber: BigInt! blockTimestamp: BigInt! transactionHash: Bytes! + logIndex: BigInt! # ---- oracle oracleAssigned: Boolean oracleAssignedFee: BigInt + oracleLogIndex: BigInt # ---- relayer relayerAssigned: Boolean relayerAssignedFee: BigInt # uint256 relayerAssignedParams: Bytes # bytes relayerAssignedProof: [Bytes!] # bytes32[32] + relayerLogIndex: BigInt } type OrmpProtocolMessageDispatched @entity(immutable: true) { diff --git a/thegraph/packages/ormpipe/src/ormp-oracle.ts b/thegraph/packages/ormpipe/src/ormp-oracle.ts index f0ed52b..5596d4f 100644 --- a/thegraph/packages/ormpipe/src/ormp-oracle.ts +++ b/thegraph/packages/ormpipe/src/ormp-oracle.ts @@ -32,6 +32,7 @@ export function handleAssigned(event: AssignedEvent): void { if (messageAccepted) { messageAccepted.oracleAssigned = true; messageAccepted.oracleAssignedFee = entity.fee; + messageAccepted.oracleLogIndex = event.logIndex; messageAccepted.save(); } } diff --git a/thegraph/packages/ormpipe/src/ormp-protocol.ts b/thegraph/packages/ormpipe/src/ormp-protocol.ts index 89ff809..139c56f 100644 --- a/thegraph/packages/ormpipe/src/ormp-protocol.ts +++ b/thegraph/packages/ormpipe/src/ormp-protocol.ts @@ -40,6 +40,7 @@ export function handleMessageAccepted(event: MessageAcceptedEvent): void { entity.message_to = event.params.message.to entity.message_gasLimit = event.params.message.gasLimit entity.message_encoded = event.params.message.encoded + entity.logIndex = event.logIndex entity.blockNumber = event.block.number entity.blockTimestamp = event.block.timestamp diff --git a/thegraph/packages/ormpipe/src/ormp-relayer.ts b/thegraph/packages/ormpipe/src/ormp-relayer.ts index f36f6fe..c9e2071 100644 --- a/thegraph/packages/ormpipe/src/ormp-relayer.ts +++ b/thegraph/packages/ormpipe/src/ormp-relayer.ts @@ -34,6 +34,7 @@ export function handleAssigned(event: AssignedEvent): void { messageAccepted.relayerAssignedFee = entity.fee messageAccepted.relayerAssignedParams = entity.params messageAccepted.relayerAssignedProof = entity.proof + messageAccepted.relayerLogIndex = event.logIndex; messageAccepted.save() } } diff --git a/thegraph/packages/ormpipe/subgraph-arbitrum.yaml b/thegraph/packages/ormpipe/subgraph-arbitrum.yaml index e39e777..9f48701 100644 --- a/thegraph/packages/ormpipe/subgraph-arbitrum.yaml +++ b/thegraph/packages/ormpipe/subgraph-arbitrum.yaml @@ -8,7 +8,7 @@ dataSources: source: address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba" abi: OrmpOracle - startBlock: 0 # todo: update this + startBlock: 178258595 mapping: kind: ethereum/events apiVersion: 0.0.7 diff --git a/thegraph/packages/ormpipe/subgraph-crab.yaml b/thegraph/packages/ormpipe/subgraph-crab.yaml index b06b053..e5a8e9a 100644 --- a/thegraph/packages/ormpipe/subgraph-crab.yaml +++ b/thegraph/packages/ormpipe/subgraph-crab.yaml @@ -8,7 +8,7 @@ dataSources: source: address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba" abi: OrmpOracle - startBlock: 0 # todo: update this + startBlock: 2234031 mapping: kind: ethereum/events apiVersion: 0.0.7 diff --git a/thegraph/packages/ormpipe/subgraph-darwinia.yaml b/thegraph/packages/ormpipe/subgraph-darwinia.yaml index 9aeef6e..2fe7dee 100644 --- a/thegraph/packages/ormpipe/subgraph-darwinia.yaml +++ b/thegraph/packages/ormpipe/subgraph-darwinia.yaml @@ -8,7 +8,7 @@ dataSources: source: address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba" abi: OrmpOracle - startBlock: 0 # todo: update this + startBlock: 2013339 mapping: kind: ethereum/events apiVersion: 0.0.7 diff --git a/thegraph/packages/ormpipe/subgraph-ethereum.yaml b/thegraph/packages/ormpipe/subgraph-ethereum.yaml index cecc468..99649ff 100644 --- a/thegraph/packages/ormpipe/subgraph-ethereum.yaml +++ b/thegraph/packages/ormpipe/subgraph-ethereum.yaml @@ -8,7 +8,7 @@ dataSources: source: address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba" abi: OrmpOracle - startBlock: 0 # todo: update this + startBlock: 19174438 mapping: kind: ethereum/events apiVersion: 0.0.7