Skip to content

Commit

Permalink
wip: make exchange a higher order module
Browse files Browse the repository at this point in the history
  • Loading branch information
willyrgf committed Aug 26, 2023
1 parent cdf9357 commit 702f536
Show file tree
Hide file tree
Showing 6 changed files with 736 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/config/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ impl Network {
}

pub fn get_web3_client_rpc(&self) -> Web3<Http> {
// FIXME: handle propery with rpc
self.get_web3_client_http(self.rpc_url()).unwrap()
}

Expand All @@ -90,8 +91,7 @@ impl Network {
}

pub async fn balance_coin(&self, wallet: &Wallet) -> Result<U256, anyhow::Error> {
self
.get_web3_client_rpc()
self.get_web3_client_rpc()
.eth()
.balance(wallet.address(), None)
.await
Expand Down
Loading

0 comments on commit 702f536

Please sign in to comment.