Skip to content

Commit

Permalink
Increase HTTP outcall cycles by order of magnitude
Browse files Browse the repository at this point in the history
  • Loading branch information
rvanasa committed Aug 7, 2023
1 parent 03fe231 commit 0bb3333
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions canisters/ic_eth/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ fn next_id() -> u64 {
})
}

const HTTP_CYCLES : u128 = 100_000_000;

#[ic_cdk_macros::query]
#[candid_method]
pub fn verify_ecdsa(eth_address: String, message: String, signature: String) -> bool {
Expand Down Expand Up @@ -116,7 +118,7 @@ pub async fn erc721_owner_of(
body: Some(json_rpc_payload.as_bytes().to_vec()),
transform: None,
};
let result = match make_http_request(request, 10_000_000).await {
let result = match make_http_request(request, HTTP_CYCLES).await {
Ok((r,)) => r,
Err((r, m)) => panic!("{:?} {:?}", r, m),
};
Expand Down Expand Up @@ -229,7 +231,7 @@ pub async fn erc1155_balance_of(
body: Some(json_rpc_payload.as_bytes().to_vec()),
transform: None,
};
let result = match make_http_request(request, 5000000).await {
let result = match make_http_request(request, HTTP_CYCLES).await {
Ok((r,)) => r,
Err((r, m)) => panic!("{:?} {:?}", r, m),
};
Expand Down

0 comments on commit 0bb3333

Please sign in to comment.