Skip to content

Commit

Permalink
fix: use signer provider
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Jan 6, 2025
1 parent b0e2066 commit 3badfb1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/chainio/clients/elcontracts/src/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pub use eigen_types::operator::Operator;
use eigen_utils::{
allocationmanager::{AllocationManager, IAllocationManagerTypes},
delegationmanager::DelegationManager,
erc20::ERC20,
get_signer,
irewardscoordinator::{
IRewardsCoordinator,
Expand Down Expand Up @@ -178,11 +179,12 @@ impl ELChainWriter {
amount: U256,
) -> Result<TxHash, ElContractsError> {
info!("depositing {amount:?} tokens into strategy {strategy_addr:?}");
let (_strategy, token_contract, token_address) = self
let (_strategy, token_address) = self
.el_chain_reader
.get_strategy_and_underlying_erc20_token(strategy_addr)
.get_strategy_and_underlying_token(strategy_addr)
.await?;
let provider = get_signer(&self.signer.clone(), &self.provider);
let token_contract = ERC20::new(token_address, &provider);

let contract_call = token_contract.approve(self.strategy_manager, amount);

Expand Down

0 comments on commit 3badfb1

Please sign in to comment.