diff --git a/crates/json-oracle-encoder/src/abi/submitConfigABI.json b/crates/json-oracle-encoder/src/abi/submitConfigABI.json index 19c3237..0c31657 100644 --- a/crates/json-oracle-encoder/src/abi/submitConfigABI.json +++ b/crates/json-oracle-encoder/src/abi/submitConfigABI.json @@ -3,7 +3,7 @@ "constant": false, "inputs": [ { - "name": "commitHash", + "name": "version", "type": "string" }, { @@ -14,8 +14,8 @@ {"name": "period", "type": "string"}, {"name": "gracePeriod", "type": "string"}, {"name": "supportedDataSourceKinds", "type": "string"}, - {"name": "networkSubgraphId", "type": "string"}, - {"name": "epochBlockOracleSubgraphId", "type": "string"}, + {"name": "networkSubgraphDeploymentId", "type": "string"}, + {"name": "epochBlockOracleSubgraphDeploymentId", "type": "string"}, {"name": "subgraphAvailabilityManagerContract", "type": "string"}, {"name": "oracleIndex", "type": "string"} ], diff --git a/crates/json-oracle-encoder/src/lib.rs b/crates/json-oracle-encoder/src/lib.rs index e158517..e5f1be6 100644 --- a/crates/json-oracle-encoder/src/lib.rs +++ b/crates/json-oracle-encoder/src/lib.rs @@ -11,15 +11,15 @@ struct Config { period: String, grace_period: String, supported_data_source_kinds: String, - network_subgraph_id: String, - epoch_block_oracle_subgraph_id: String, + network_subgraph_deloyment_id: String, + epoch_block_oracle_subgraph_deloyment_id: String, subgraph_availability_manager_contract: String, oracle_index: String, } #[derive(Serialize, Deserialize)] struct Data { - commit_hash: String, + version: String, config: Config, } @@ -30,7 +30,7 @@ pub fn json_to_calldata(json: serde_json::Value) -> anyhow::Result> { let data: Data = serde_json::from_value(json)?; let tokens = vec![ - Token::String(data.commit_hash), + Token::String(data.version), Token::Tuple(vec![ Token::String(data.config.ipfs_concurrency), Token::String(data.config.ipfs_timeout), @@ -38,8 +38,8 @@ pub fn json_to_calldata(json: serde_json::Value) -> anyhow::Result> { Token::String(data.config.period), Token::String(data.config.grace_period), Token::String(data.config.supported_data_source_kinds), - Token::String(data.config.network_subgraph_id), - Token::String(data.config.epoch_block_oracle_subgraph_id), + Token::String(data.config.network_subgraph_deloyment_id), + Token::String(data.config.epoch_block_oracle_subgraph_deloyment_id), Token::String(data.config.subgraph_availability_manager_contract), Token::String(data.config.oracle_index), ]), diff --git a/json-encoder-web/index.ts b/json-encoder-web/index.ts index 223083c..dcf08dd 100644 --- a/json-encoder-web/index.ts +++ b/json-encoder-web/index.ts @@ -7,7 +7,7 @@ import { output } from './webpack.config'; require('notie/dist/notie.min.css'); const samplePayload = `{ - "commit_hash": "XXXXX", + "version": "v0.0.1", "config": { "ipfs_concurrency": "4", "ipfs_timeout": "10000", @@ -15,8 +15,8 @@ const samplePayload = `{ "period": "300", "grace_period": "0", "supported_data_source_kinds": "ethereum,ethereum/contract,file/ipfs,substreams,file/arweave", - "network_subgraph_id": "Fg36gCZE7pXEuZ3p8sxYzFE5UbgHtk7kcJiC5HBbfgmY", - "epoch_block_oracle_subgraph_id": "4KFYqUWRTZQ9gn7GPHC6YQ2q15chJfVrX43ezYcwkgxB", + "network_subgraph_deloyment_id": "QmSWxvd8SaQK6qZKJ7xtfxCCGoRzGnoi2WNzmJYYJW9BXY", + "epoch_block_oracle_subgraph_deloyment_id": "QmQEGDTb3xeykCXLdWx7pPX3qeeGMUvHmGWP4SpMkv5QJf", "subgraph_availability_manager_contract": "CONTRACT_ADDRESS", "oracle_index": "ORACLE_INDEX" }