Skip to content

Commit

Permalink
update oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Feb 4, 2024
1 parent 15e1ec6 commit 9483e6c
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions thegraph/packages/ormpipe/abis/OrmpOracle.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
{
"indexed": true,
"internalType": "uint256",
"name": "messageIndex",
"name": "blockHeight",
"type": "uint256"
},
{
Expand Down Expand Up @@ -179,7 +179,7 @@
{
"inputs": [
{ "internalType": "uint256", "name": "chainId", "type": "uint256" },
{ "internalType": "uint256", "name": "messageIndex", "type": "uint256" },
{ "internalType": "uint256", "name": "blockNumber", "type": "uint256" },
{ "internalType": "bytes32", "name": "messageRoot", "type": "bytes32" }
],
"name": "importMessageRoot",
Expand All @@ -199,7 +199,7 @@
{
"inputs": [
{ "internalType": "uint256", "name": "chainId", "type": "uint256" },
{ "internalType": "uint256", "name": "messageIndex", "type": "uint256" }
{ "internalType": "uint256", "name": "blockNumber", "type": "uint256" }
],
"name": "merkleRoot",
"outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }],
Expand Down
10 changes: 5 additions & 5 deletions thegraph/packages/ormpipe/networks.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"arbitrum-sepolia": {
"OrmpOracle": {
"address": "0x0000000004A34ac73374b65a55C93CF9D4Bc3d17"
"address": "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
},
"OrmpRelayer": {
"address": "0x0000000000808fE9bDCc1d180EfbF5C53552a6b1"
Expand All @@ -12,7 +12,7 @@
},
"crab": {
"OrmpOracle": {
"address": "0x0000000004A34ac73374b65a55C93CF9D4Bc3d17"
"address": "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
},
"OrmpRelayer": {
"address": "0x0000000000808fE9bDCc1d180EfbF5C53552a6b1"
Expand All @@ -23,7 +23,7 @@
},
"darwinia": {
"OrmpOracle": {
"address": "0x0000000004A34ac73374b65a55C93CF9D4Bc3d17"
"address": "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
},
"OrmpRelayer": {
"address": "0x0000000000808fE9bDCc1d180EfbF5C53552a6b1"
Expand All @@ -34,7 +34,7 @@
},
"arbitrum": {
"OrmpOracle": {
"address": "0x0000000004A34ac73374b65a55C93CF9D4Bc3d17"
"address": "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
},
"OrmpRelayer": {
"address": "0x0000000000808fE9bDCc1d180EfbF5C53552a6b1"
Expand All @@ -45,7 +45,7 @@
},
"sepolia": {
"OrmpOracle": {
"address": "0x0000000004A34ac73374b65a55C93CF9D4Bc3d17"
"address": "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
},
"OrmpRelayer": {
"address": "0x0000000000808fE9bDCc1d180EfbF5C53552a6b1"
Expand Down
2 changes: 1 addition & 1 deletion thegraph/packages/ormpipe/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type OrmpOracleAssigned @entity(immutable: true) {
type OrmpOracleImportedMessageRoot @entity(immutable: true) {
id: Bytes!
chainId: BigInt! # uint256
messageIndex: BigInt! # uint256
blockHeight: BigInt! # uint256
messageRoot: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
Expand Down
6 changes: 3 additions & 3 deletions thegraph/packages/ormpipe/src/ormp-oracle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import {
} from "../generated/OrmpOracle/OrmpOracle"
import {
OrmpOracleAssigned,
OrmpOracleImportedMessageRoot, OrmpProtocolMessageAccepted,
OrmpOracleImportedMessageRoot,
OrmpOracleOwnershipTransferred,
OrmpOracleSetApproved,
OrmpOracleSetFee,
OrmpOracleWithdrawal
OrmpOracleWithdrawal, OrmpProtocolMessageAccepted
} from "../generated/schema"

export function handleAssigned(event: AssignedEvent): void {
Expand Down Expand Up @@ -43,7 +43,7 @@ export function handleImportedMessageRoot(
event.transaction.hash.concatI32(event.logIndex.toI32())
)
entity.chainId = event.params.chainId
entity.messageIndex = event.params.messageIndex
entity.blockHeight = event.params.blockHeight
entity.messageRoot = event.params.messageRoot

entity.blockNumber = event.block.number
Expand Down
4 changes: 2 additions & 2 deletions thegraph/packages/ormpipe/subgraph-arbitrum-sepolia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dataSources:
name: OrmpOracle
network: arbitrum-sepolia
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 11212606
startBlock: 11631553
mapping:
kind: ethereum/events
apiVersion: 0.0.7
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 @@ -6,7 +6,7 @@ dataSources:
name: OrmpOracle
network: arbitrum-one
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 0 # todo: update this
mapping:
Expand Down
4 changes: 2 additions & 2 deletions thegraph/packages/ormpipe/subgraph-crab.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dataSources:
name: OrmpOracle
network: crab
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 2205412
startBlock: 0 # todo: update this
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 @@ -6,7 +6,7 @@ dataSources:
name: OrmpOracle
network: darwinia
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 0 # todo: update this
mapping:
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 @@ -6,7 +6,7 @@ dataSources:
name: OrmpOracle
network: mainnet
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 0 # todo: update this
mapping:
Expand Down
4 changes: 2 additions & 2 deletions thegraph/packages/ormpipe/subgraph-pangolin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dataSources:
name: OrmpOracle
network: pangolin
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 2275722
startBlock: 2288092
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down
4 changes: 2 additions & 2 deletions thegraph/packages/ormpipe/subgraph-sepolia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ dataSources:
name: OrmpOracle
network: sepolia
source:
address: "0x000000000DA67291724858F7e759A43B2d23225e"
address: "0x0000000003ebeF32D8f0ED406a5CA8805c80AFba"
abi: OrmpOracle
startBlock: 5202852
startBlock: 5217030
mapping:
kind: ethereum/events
apiVersion: 0.0.7
Expand Down
6 changes: 3 additions & 3 deletions thegraph/packages/ormpipe/tests/ormp-oracle-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function createAssignedEvent(msgHash: Bytes, fee: BigInt): Assigned {

export function createImportedMessageRootEvent(
chainId: BigInt,
messageIndex: BigInt,
blockHeight: BigInt,
messageRoot: Bytes
): ImportedMessageRoot {
let importedMessageRootEvent = changetype<ImportedMessageRoot>(newMockEvent())
Expand All @@ -41,8 +41,8 @@ export function createImportedMessageRootEvent(
)
importedMessageRootEvent.parameters.push(
new ethereum.EventParam(
"messageIndex",
ethereum.Value.fromUnsignedBigInt(messageIndex)
"blockHeight",
ethereum.Value.fromUnsignedBigInt(blockHeight)
)
)
importedMessageRootEvent.parameters.push(
Expand Down

0 comments on commit 9483e6c

Please sign in to comment.