From c78330d32c121c104fcb9e16103f16894254101f Mon Sep 17 00:00:00 2001 From: Sina Mahmoodi Date: Fri, 30 Jun 2023 17:22:32 +0200 Subject: [PATCH] rename to multicallV1 --- internal/ethapi/api.go | 2 +- internal/ethapi/api_test.go | 4 ++-- internal/web3ext/web3ext.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 55faca0775..627cae0239 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1127,7 +1127,7 @@ func (r *callResult) MarshalJSON() ([]byte, error) { // // Note, this function doesn't make any changes in the state/blockchain and is // useful to execute and retrieve values. -func (s *BlockChainAPI) Multicall(ctx context.Context, blocks []CallBatch, blockNrOrHash rpc.BlockNumberOrHash, includeTransfers *bool) ([][]callResult, error) { +func (s *BlockChainAPI) MulticallV1(ctx context.Context, blocks []CallBatch, blockNrOrHash rpc.BlockNumberOrHash, includeTransfers *bool) ([][]callResult, error) { state, header, err := s.b.StateAndHeaderByNumberOrHash(ctx, blockNrOrHash) if state == nil || err != nil { return nil, err diff --git a/internal/ethapi/api_test.go b/internal/ethapi/api_test.go index 3efc90a82d..eeba0830da 100644 --- a/internal/ethapi/api_test.go +++ b/internal/ethapi/api_test.go @@ -598,7 +598,7 @@ func TestCall(t *testing.T) { } } -func TestMulticall(t *testing.T) { +func TestMulticallV1(t *testing.T) { t.Parallel() // Initialize test accounts var ( @@ -982,7 +982,7 @@ func TestMulticall(t *testing.T) { } for i, tc := range testSuite { - result, err := api.Multicall(context.Background(), tc.blocks, tc.tag, tc.includeTransfers) + result, err := api.MulticallV1(context.Background(), tc.blocks, tc.tag, tc.includeTransfers) if tc.expectErr != nil { if err == nil { t.Errorf("test %d: want error %v, have nothing", i, tc.expectErr) diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 943854a7da..9455367a91 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -612,8 +612,8 @@ web3._extend({ inputFormatter: [web3._extend.formatters.inputCallFormatter, web3._extend.formatters.inputDefaultBlockNumberFormatter, null, null], }), new web3._extend.Method({ - name: 'multicall', - call: 'eth_multicall', + name: 'multicallV1', + call: 'eth_multicallV1', params: 3, inputFormatter: [null, web3._extend.formatters.inputDefaultBlockNumberFormatter, null], }),