Skip to content

Commit

Permalink
update contract address and add sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed Nov 22, 2023
1 parent a2d3c40 commit 57ffcbf
Show file tree
Hide file tree
Showing 7 changed files with 342 additions and 247 deletions.
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": {
"Subapi": {
"address": "0x00000000007317c91F57D86A410934A490E62E1E"
"address": "0x00000000096c285629Fe3EAb3dd042c27b9dcBa6"
},
"OrmpOracle": {
"address": "0x0000000000ba03146Cc235509E802873D418a6bc"
Expand All @@ -15,7 +15,7 @@
},
"crab": {
"Subapi": {
"address": "0x00000000007317c91F57D86A410934A490E62E1E"
"address": "0x00000000096c285629Fe3EAb3dd042c27b9dcBa6"
},
"OrmpOracle": {
"address": "0x0000000000ba03146Cc235509E802873D418a6bc"
Expand All @@ -29,7 +29,7 @@
},
"darwinia": {
"Subapi": {
"address": "0x00000000007317c91F57D86A410934A490E62E1E"
"address": "0x00000000096c285629Fe3EAb3dd042c27b9dcBa6"
},
"OrmpOracle": {
"address": "0x0000000000ba03146Cc235509E802873D418a6bc"
Expand All @@ -43,7 +43,7 @@
},
"arbitrum": {
"Subapi": {
"address": "0x00000000007317c91F57D86A410934A490E62E1E"
"address": "0x00000000096c285629Fe3EAb3dd042c27b9dcBa6"
},
"OrmpOracle": {
"address": "0x0000000000ba03146Cc235509E802873D418a6bc"
Expand All @@ -55,4 +55,4 @@
"address": "0x00000000001523057a05d6293C1e5171eE33eE0A"
}
}
}
}
155 changes: 77 additions & 78 deletions thegraph/packages/ormpipe/schema.graphql
Original file line number Diff line number Diff line change
@@ -1,81 +1,3 @@
## === subapi

type SubapiAddBeacon @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
beacon_airnode: Bytes! # address
beacon_endpointId: Bytes! # bytes32
beacon_sponsor: Bytes! # address
beacon_sponsorWallet: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiAggregatedORMPData @entity(immutable: true) {
id: Bytes!
ormpData_count: BigInt! # uint256
ormpData_root: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiAirnodeRrpCompleted @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
requestId: Bytes! # bytes32
data: Bytes! # bytes
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiAirnodeRrpRequested @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
requestId: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiOwnershipTransferStarted @entity(immutable: true) {
id: Bytes!
previousOwner: Bytes! # address
newOwner: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiOwnershipTransferred @entity(immutable: true) {
id: Bytes!
previousOwner: Bytes! # address
newOwner: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiRemoveBeacon @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiSubAPIFeedUpdated @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
msgRoot_count: BigInt! # uint256
msgRoot_root: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

## ======= ormp oracle
type OrmpOracleAssigned @entity(immutable: true) {
id: Bytes!
Expand Down Expand Up @@ -201,3 +123,80 @@ type OrmpProtocolSetDefaultConfig @entity(immutable: true) {
blockTimestamp: BigInt!
transactionHash: Bytes!
}

# ==
type SubapiAddBeacon @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
beacon_airnode: Bytes! # address
beacon_endpointId: Bytes! # bytes32
beacon_sponsor: Bytes! # address
beacon_sponsorWallet: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiAggregatedORMPData @entity(immutable: true) {
id: Bytes!
ormpData_count: BigInt! # uint256
ormpData_root: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiAirnodeRrpCompleted @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
requestId: Bytes! # bytes32
data: Bytes! # bytes
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiAirnodeRrpRequested @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
requestId: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiOwnershipTransferStarted @entity(immutable: true) {
id: Bytes!
previousOwner: Bytes! # address
newOwner: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiOwnershipTransferred @entity(immutable: true) {
id: Bytes!
previousOwner: Bytes! # address
newOwner: Bytes! # address
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiRemoveBeacon @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}

type SubapiSubAPIFeedUpdated @entity(immutable: true) {
id: Bytes!
beaconId: Bytes! # bytes32
msgRoot_count: BigInt! # uint256
msgRoot_root: Bytes! # bytes32
blockNumber: BigInt!
blockTimestamp: BigInt!
transactionHash: Bytes!
}
41 changes: 0 additions & 41 deletions thegraph/packages/ormpipe/subgraph-arbitrum-sepolia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,6 @@ specVersion: 0.0.5
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: Subapi
network: arbitrum-sepolia
source:
address: "0x00000000007317c91F57D86A410934A490E62E1E"
abi: Subapi
startBlock: 860721
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- SubapiAddBeacon
- SubapiAggregatedORMPData
- SubapiAirnodeRrpCompleted
- SubapiAirnodeRrpRequested
- SubapiOwnershipTransferStarted
- SubapiOwnershipTransferred
- SubapiRemoveBeacon
- SubapiSubAPIFeedUpdated
abis:
- name: Subapi
file: ./abis/Subapi.json
eventHandlers:
- event: AddBeacon(indexed bytes32,(address,bytes32,address,address))
handler: handleAddBeacon
- event: AggregatedORMPData((uint256,bytes32))
handler: handleAggregatedORMPData
- event: AirnodeRrpCompleted(indexed bytes32,indexed bytes32,bytes)
handler: handleAirnodeRrpCompleted
- event: AirnodeRrpRequested(indexed bytes32,indexed bytes32)
handler: handleAirnodeRrpRequested
- event: OwnershipTransferStarted(indexed address,indexed address)
handler: handleOwnershipTransferStarted
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleOwnershipTransferred
- event: RemoveBeacon(indexed bytes32)
handler: handleRemoveBeacon
- event: SubAPIFeedUpdated(indexed bytes32,(uint256,bytes32))
handler: handleSubAPIFeedUpdated
file: ./src/subapi.ts
- kind: ethereum
name: OrmpOracle
network: arbitrum-sepolia
Expand Down
82 changes: 41 additions & 41 deletions thegraph/packages/ormpipe/subgraph-arbitrum.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,6 @@ specVersion: 0.0.5
schema:
file: ./schema.graphql
dataSources:
- kind: ethereum
name: Subapi
network: arbitrum
source:
address: "0x00000000007317c91F57D86A410934A490E62E1E"
abi: Subapi
startBlock: 148559805
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- SubapiAddBeacon
- SubapiAggregatedORMPData
- SubapiAirnodeRrpCompleted
- SubapiAirnodeRrpRequested
- SubapiOwnershipTransferStarted
- SubapiOwnershipTransferred
- SubapiRemoveBeacon
- SubapiSubAPIFeedUpdated
abis:
- name: Subapi
file: ./abis/Subapi.json
eventHandlers:
- event: AddBeacon(indexed bytes32,(address,bytes32,address,address))
handler: handleAddBeacon
- event: AggregatedORMPData((uint256,bytes32))
handler: handleAggregatedORMPData
- event: AirnodeRrpCompleted(indexed bytes32,indexed bytes32,bytes)
handler: handleAirnodeRrpCompleted
- event: AirnodeRrpRequested(indexed bytes32,indexed bytes32)
handler: handleAirnodeRrpRequested
- event: OwnershipTransferStarted(indexed address,indexed address)
handler: handleOwnershipTransferStarted
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleOwnershipTransferred
- event: RemoveBeacon(indexed bytes32)
handler: handleRemoveBeacon
- event: SubAPIFeedUpdated(indexed bytes32,(uint256,bytes32))
handler: handleSubAPIFeedUpdated
file: ./src/subapi.ts
- kind: ethereum
name: OrmpOracle
network: arbitrum
Expand Down Expand Up @@ -131,4 +90,45 @@ dataSources:
- event: SetDefaultConfig(address,address)
handler: handleSetDefaultConfig
file: ./src/ormp-protocol.ts
- kind: ethereum
name: Subapi
network: arbitrum
source:
address: "0x00000000096c285629Fe3EAb3dd042c27b9dcBa6"
abi: Subapi
startBlock: 0 # todo: update this.
mapping:
kind: ethereum/events
apiVersion: 0.0.7
language: wasm/assemblyscript
entities:
- SubapiAddBeacon
- SubapiAggregatedORMPData
- SubapiAirnodeRrpCompleted
- SubapiAirnodeRrpRequested
- SubapiOwnershipTransferStarted
- SubapiOwnershipTransferred
- SubapiRemoveBeacon
- SubapiSubAPIFeedUpdated
abis:
- name: Subapi
file: ./abis/Subapi.json
eventHandlers:
- event: AddBeacon(indexed bytes32,(address,bytes32,address,address))
handler: handleAddBeacon
- event: AggregatedORMPData((uint256,bytes32))
handler: handleAggregatedORMPData
- event: AirnodeRrpCompleted(indexed bytes32,indexed bytes32,bytes)
handler: handleAirnodeRrpCompleted
- event: AirnodeRrpRequested(indexed bytes32,indexed bytes32)
handler: handleAirnodeRrpRequested
- event: OwnershipTransferStarted(indexed address,indexed address)
handler: handleOwnershipTransferStarted
- event: OwnershipTransferred(indexed address,indexed address)
handler: handleOwnershipTransferred
- event: RemoveBeacon(indexed bytes32)
handler: handleRemoveBeacon
- event: SubAPIFeedUpdated(indexed bytes32,(uint256,bytes32))
handler: handleSubAPIFeedUpdated
file: ./src/subapi.ts

Loading

0 comments on commit 57ffcbf

Please sign in to comment.