Skip to content

Commit

Permalink
Fix loadAbi and fetchAbi
Browse files Browse the repository at this point in the history
  • Loading branch information
danhper committed Jul 22, 2024
1 parent ab1ad37 commit 5b10f20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/interpreter/builtins/repl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ fn exec(_env: &mut Env, _receiver: &Value, args: &[Value]) -> Result<Value> {

fn load_abi(env: &mut Env, _receiver: &Value, args: &[Value]) -> Result<Value> {
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"),
Expand All @@ -97,7 +97,7 @@ fn fetch_abi<'a>(
) -> BoxFuture<'a, Result<Value>> {
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 =
Expand Down

0 comments on commit 5b10f20

Please sign in to comment.