From 6c051b246d477a0de8e8c558706db248d27ecae1 Mon Sep 17 00:00:00 2001 From: rvanasa Date: Wed, 27 Sep 2023 20:26:13 -0600 Subject: [PATCH] Rename 'gasPrice()' to 'eth_gasPrice()' in example for clarity --- e2e/motoko/Main.mo | 2 +- lib/motoko/lib.mo | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/motoko/Main.mo b/e2e/motoko/Main.mo index 5f216d0b..412c33d4 100644 --- a/e2e/motoko/Main.mo +++ b/e2e/motoko/Main.mo @@ -15,7 +15,7 @@ actor class Main() { public func example() : async Text { - let a = await rpc.gasPrice(); + let a = await rpc.eth_gasPrice(); let b = await rpc.request("eth_gasPrice", #Null, 1000); debug_show (a, b); diff --git a/lib/motoko/lib.mo b/lib/motoko/lib.mo index ff32a247..cf291ca9 100644 --- a/lib/motoko/lib.mo +++ b/lib/motoko/lib.mo @@ -125,7 +125,7 @@ module { }; }; - public func gasPrice() : async Nat { + public func eth_gasPrice() : async Nat { let result = request("eth_gasPrice", #Null, 256); // TODO: decode assert false;