From c7e7267ece22f83febad2d89a4a501d049392ce8 Mon Sep 17 00:00:00 2001 From: brion Date: Tue, 20 Dec 2022 01:03:11 +0800 Subject: [PATCH] update --- internal/ethapi/api_multicall.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/internal/ethapi/api_multicall.go b/internal/ethapi/api_multicall.go index c07bf592a7..0bbd38cfff 100644 --- a/internal/ethapi/api_multicall.go +++ b/internal/ethapi/api_multicall.go @@ -5,6 +5,7 @@ import ( "context" "crypto/sha256" "fmt" + "math/big" "strings" "sync" "time" @@ -142,11 +143,11 @@ func handleNative(ctx context.Context, state *state.StateDB, msg types.Message) } switch method.Name { case "name", "symbol": - return method.Outputs.PackValues([]interface{}{"ETH"}) + return method.Outputs.Pack("ETH") case "decimals": - return method.Outputs.PackValues([]interface{}{uint8(18)}) + return method.Outputs.Pack(uint8(18)) case "totalSupply": - return method.Outputs.PackValues([]interface{}{120 * 1_000_000 * 18}) + return method.Outputs.Pack(big.NewInt(120 * 1_000_000 * 18)) } if method.Name == "balanceOf" {