Skip to content

Commit

Permalink
chore(centralized-bridge): use web3::ethabi
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed May 26, 2021
1 parent b45f17a commit 92ba848
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion bridges/centralized-ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ actix = { version = "0.11.1", default-features = false }
async-jsonrpc-client = { git = "https://github.com/witnet/async-jsonrpc-client", features = ["tcp"], branch = "fix-tcp-leak" }
ctrlc = "3.1.3"
env_logger = "0.7.1"
ethabi = "14.0.0"
futures-util = { version = "0.3.8", features = ["compat"] }
log = "0.4.8"
serde = { version = "1.0.104", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion bridges/centralized-ethereum/src/actors/dr_database.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use actix::prelude::*;
use ethabi::Bytes;
use serde::{Deserialize, Serialize};
use std::{cmp, collections::HashMap, fmt};
use web3::ethabi::Bytes;
use web3::types::U256;
use witnet_data_structures::chain::Hash;
use witnet_node::storage_mngr;
Expand Down
2 changes: 1 addition & 1 deletion bridges/centralized-ethereum/src/actors/dr_reporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::{
create_wrb_contract,
};
use actix::prelude::*;
use ethabi::Bytes;
use web3::{
contract::{self, Contract},
ethabi::Bytes,
types::{H160, U256},
};
use witnet_data_structures::{chain::Hash, radon_error::RadonErrors};
Expand Down
2 changes: 1 addition & 1 deletion bridges/centralized-ethereum/src/actors/eth_poller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use crate::{
create_wrb_contract,
};
use actix::prelude::*;
use ethabi::Bytes;
use std::{convert::TryFrom, time::Duration};
use web3::{
contract::{self, Contract},
ethabi::Bytes,
types::{H160, U256},
};
use witnet_data_structures::chain::Hash;
Expand Down
2 changes: 1 addition & 1 deletion bridges/centralized-ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub fn create_wrb_contract(config: &Config) -> Contract<Http> {
let web3 = web3::Web3::new(web3_http);
// Why read files at runtime when you can read files at compile time
let wrb_contract_abi_json: &[u8] = include_bytes!("../wrb_abi.json");
let wrb_contract_abi = ethabi::Contract::load(wrb_contract_abi_json)
let wrb_contract_abi = web3::ethabi::Contract::load(wrb_contract_abi_json)
.map_err(|e| format!("Unable to load WRB contract from ABI: {:?}", e))
.unwrap();
let wrb_contract_address = config.wrb_contract_addr;
Expand Down

0 comments on commit 92ba848

Please sign in to comment.