File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ impl RewardsManagerContract {
3030 pub async fn new (
3131 signing_key : & SecretKey ,
3232 url : Url ,
33- rewards_manager_contract : String ,
33+ rewards_manager_contract : Address ,
3434 logger : Logger ,
3535 ) -> Self {
3636 let http_client = reqwest:: ClientBuilder :: new ( )
@@ -44,8 +44,7 @@ impl RewardsManagerContract {
4444 . unwrap ( )
4545 . with_chain_id ( chain_id) ;
4646 let provider = Arc :: new ( SignerMiddleware :: new ( provider, wallet) ) ;
47- let address: Address = rewards_manager_contract. parse ( ) . unwrap ( ) ;
48- let contract = RewardsManagerABI :: new ( address, provider. clone ( ) ) ;
47+ let contract = RewardsManagerABI :: new ( rewards_manager_contract, provider. clone ( ) ) ;
4948 Self { contract, logger }
5049 }
5150}
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ mod util;
88use common:: prelude:: * ;
99use common:: prometheus;
1010use contract:: * ;
11+ use ethers:: abi:: Address ;
1112use ipfs:: * ;
1213use manifest:: { Abi , DataSource , Manifest , Mapping } ;
1314use network_subgraph:: * ;
@@ -126,7 +127,7 @@ struct Config {
126127 env = "REWARDS_MANAGER_CONTRACT" ,
127128 help = "The address of the rewards manager contract"
128129 ) ]
129- pub rewards_manager_contract : String ,
130+ pub rewards_manager_contract : Address ,
130131
131132 #[ structopt( long, env = "RPC_URL" , help = "RPC url for the network" ) ]
132133 pub url : Url ,
You can’t perform that action at this time.
0 commit comments