Skip to content

Commit

Permalink
fix: call with payment
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Jan 17, 2025
1 parent 852a478 commit 977bc42
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/deferred_minter/src/app/ethereum/evm_rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ impl EvmRpcClient {
log::debug!("estimated cost for get next nonce: {cycles_cost}",);

// send effective request
let (result,) = ic_cdk::api::call::call::<_, (MultiGetTransactionCountResult,)>(
self.principal,
"eth_getTransactionCount",
(services, rpc_config, args),
)
.await
.map_err(|(code, msg)| DeferredMinterError::CanisterCall(code, msg))?;
let (result,) =
ic_cdk::api::call::call_with_payment128::<_, (MultiGetTransactionCountResult,)>(
self.principal,
"eth_getTransactionCount",
(services, rpc_config, args),
cycles_cost,
)
.await
.map_err(|(code, msg)| DeferredMinterError::CanisterCall(code, msg))?;

log::debug!("get next nonce result: {result:?}",);

Expand Down

0 comments on commit 977bc42

Please sign in to comment.