Skip to content

Commit

Permalink
Prepare mainnets (#151)
Browse files Browse the repository at this point in the history
* update start block

* add logindex

* fix error
  • Loading branch information
fewensa authored Feb 20, 2024
1 parent 117aed0 commit 56a1eb4
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions thegraph/packages/ormpipe/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions thegraph/packages/ormpipe/src/ormp-oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down
1 change: 1 addition & 0 deletions thegraph/packages/ormpipe/src/ormp-protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions thegraph/packages/ormpipe/src/ormp-relayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down
2 changes: 1 addition & 1 deletion thegraph/packages/ormpipe/subgraph-arbitrum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion thegraph/packages/ormpipe/subgraph-crab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion thegraph/packages/ormpipe/subgraph-darwinia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion thegraph/packages/ormpipe/subgraph-ethereum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 56a1eb4

Please sign in to comment.