From f83187c2e95dc6a4c2d704a77db5a9ca8b53ef00 Mon Sep 17 00:00:00 2001 From: rvanasa Date: Wed, 13 Sep 2023 20:16:34 -0600 Subject: [PATCH] Add example 'request' and 'request_cost' calls to 'scripts/local' --- scripts/local | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/local b/scripts/local index 1b98adf9..9e493d54 100755 --- a/scripts/local +++ b/scripts/local @@ -7,3 +7,9 @@ dfx deploy ic_eth --mode reinstall -y dfx canister call ic_eth authorize "(principal \"$PRINCIPAL\", variant { RegisterProvider })" dfx canister call ic_eth register_provider '(record {base_url = "https://cloudflare-eth.com"; credential_path = "/v1/mainnet"; chain_id = 1; cycles_per_call = 1000; cycles_per_message_byte = 100})' + +dfx canister call ic_eth request_cost '("https://cloudflare-eth.com", "{ \"jsonrpc\": \"2.0\", \"method\": \"eth_getBlockByNumber\", \"params\": [\"0x2244\", true], \"id\": 1 }", 1000)' +dfx canister call ic_eth request '("https://cloudflare-eth.com", "{ \"jsonrpc\": \"2.0\", \"method\": \"eth_getBlockByNumber\", \"params\": [\"0x2244\", true], \"id\": 1 }", 1000)' + +dfx canister call ic_eth provider_request_cost '(0, "{ \"jsonrpc\": \"2.0\", \"method\": \"eth_getBlockByNumber\", \"params\": [\"0x2244\", true], \"id\": 1 }", 1000)' +dfx canister call ic_eth provider_request '(0, "{ \"jsonrpc\": \"2.0\", \"method\": \"eth_getBlockByNumber\", \"params\": [\"0x2244\", true], \"id\": 1 }", 1000)'