From 5b10f20fca7d1b3373fc64a42537d90d979bc917 Mon Sep 17 00:00:00 2001 From: Daniel Perez Date: Mon, 22 Jul 2024 21:51:52 +0200 Subject: [PATCH] Fix loadAbi and fetchAbi --- src/interpreter/builtins/repl.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interpreter/builtins/repl.rs b/src/interpreter/builtins/repl.rs index ecb79c2..c191976 100644 --- a/src/interpreter/builtins/repl.rs +++ b/src/interpreter/builtins/repl.rs @@ -78,8 +78,8 @@ fn exec(_env: &mut Env, _receiver: &Value, args: &[Value]) -> Result { fn load_abi(env: &mut Env, _receiver: &Value, args: &[Value]) -> Result { let (name, filepath, key) = match args { - [_, Value::Str(name), Value::Str(filepath)] => (name, filepath, None), - [_, Value::Str(name), Value::Str(filepath), Value::Str(key)] => { + [Value::Str(name), Value::Str(filepath)] => (name, filepath, None), + [Value::Str(name), Value::Str(filepath), Value::Str(key)] => { (name, filepath, Some(key.as_str())) } _ => bail!("loadAbi: invalid arguments"), @@ -97,7 +97,7 @@ fn fetch_abi<'a>( ) -> BoxFuture<'a, Result> { async move { match args { - [_, Value::Str(name), Value::Addr(address)] => { + [Value::Str(name), Value::Addr(address)] => { let chain_id = env.get_chain_id().await?; let etherscan_config = env.config.get_etherscan_config(chain_id)?; let abi =