Skip to content

Commit

Permalink
chore: update subgraphs to use id on encoder
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed May 30, 2024
1 parent e3e7e49 commit adf48d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion crates/json-oracle-encoder/src/abi/submitConfigABI.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
{"name": "period", "type": "string"},
{"name": "gracePeriod", "type": "string"},
{"name": "supportedDataSourceKinds", "type": "string"},
{"name": "subgraph", "type": "string"},
{"name": "networkSubgraphId", "type": "string"},
{"name": "epochBlockOracleSubgraphId", "type": "string"},
{"name": "subgraphAvailabilityManagerContract", "type": "string"},
{"name": "oracleIndex", "type": "string"}
],
Expand Down
6 changes: 4 additions & 2 deletions crates/json-oracle-encoder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ struct Config {
period: String,
grace_period: String,
supported_data_source_kinds: String,
subgraph: String,
network_subgraph_id: String,
epoch_block_oracle_subgraph_id: String,
subgraph_availability_manager_contract: String,
oracle_index: String,
}
Expand All @@ -37,7 +38,8 @@ pub fn json_to_calldata(json: serde_json::Value) -> anyhow::Result<Vec<u8>> {
Token::String(data.config.period),
Token::String(data.config.grace_period),
Token::String(data.config.supported_data_source_kinds),
Token::String(data.config.subgraph),
Token::String(data.config.network_subgraph_id),
Token::String(data.config.epoch_block_oracle_subgraph_id),
Token::String(data.config.subgraph_availability_manager_contract),
Token::String(data.config.oracle_index),
]),
Expand Down
3 changes: 2 additions & 1 deletion json-encoder-web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const samplePayload = `{
"period": "300",
"grace_period": "0",
"supported_data_source_kinds": "ethereum,ethereum/contract,file/ipfs,substreams,file/arweave",
"subgraph": "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum",
"network_subgraph_id": "Fg36gCZE7pXEuZ3p8sxYzFE5UbgHtk7kcJiC5HBbfgmY",
"epoch_block_oracle_subgraph_id": "4KFYqUWRTZQ9gn7GPHC6YQ2q15chJfVrX43ezYcwkgxB",
"subgraph_availability_manager_contract": "CONTRACT_ADDRESS",
"oracle_index": "ORACLE_INDEX"
}
Expand Down

0 comments on commit adf48d3

Please sign in to comment.