Skip to content

Commit

Permalink
fix: json web encoder fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Maikol committed Jun 14, 2024
1 parent 61f6aa6 commit 2ee2a9c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions crates/json-oracle-encoder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ struct Config {
period: String,
grace_period: String,
supported_data_source_kinds: String,
network_subgraph_deloyment_id: String,
epoch_block_oracle_subgraph_deloyment_id: String,
network_subgraph_deployment_id: String,
epoch_block_oracle_subgraph_deployment_id: String,
subgraph_availability_manager_contract: String,
oracle_index: String,
}
Expand All @@ -38,8 +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.network_subgraph_deloyment_id),
Token::String(data.config.epoch_block_oracle_subgraph_deloyment_id),
Token::String(data.config.network_subgraph_deployment_id),
Token::String(data.config.epoch_block_oracle_subgraph_deployment_id),
Token::String(data.config.subgraph_availability_manager_contract),
Token::String(data.config.oracle_index),
]),
Expand Down
4 changes: 2 additions & 2 deletions json-encoder-web/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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_deloyment_id": "QmSWxvd8SaQK6qZKJ7xtfxCCGoRzGnoi2WNzmJYYJW9BXY",
"epoch_block_oracle_subgraph_deloyment_id": "QmQEGDTb3xeykCXLdWx7pPX3qeeGMUvHmGWP4SpMkv5QJf",
"network_subgraph_deployment_id": "QmSWxvd8SaQK6qZKJ7xtfxCCGoRzGnoi2WNzmJYYJW9BXY",
"epoch_block_oracle_subgraph_deployment_id": "QmQEGDTb3xeykCXLdWx7pPX3qeeGMUvHmGWP4SpMkv5QJf",
"subgraph_availability_manager_contract": "CONTRACT_ADDRESS",
"oracle_index": "ORACLE_INDEX"
}
Expand Down

0 comments on commit 2ee2a9c

Please sign in to comment.