diff --git a/README.md b/README.md index a5eb2ea..8d99137 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # go-multicall ![coverage](https://img.shields.io/badge/coverage-87.7%25-brightgreen) -![build](https://github.com/forta-network/go-multicall/actions/workflows/build.yml/badge.svg) +![build](https://github.com/xiangxn/go-multicall/actions/workflows/build.yml/badge.svg) A thin Go client for making multiple function calls in single `eth_call` request @@ -12,7 +12,7 @@ _**Warning:** MakerDAO Multicall contracts are different than the [OpenZeppelin ## Install ``` -go get github.com/forta-network/go-multicall +go get github.com/xiangxn/go-multicall ``` ## Example @@ -27,7 +27,7 @@ import ( "fmt" "math/big" - "github.com/forta-network/go-multicall" + "github.com/xiangxn/go-multicall" "github.com/ethereum/go-ethereum/common" ) diff --git a/caller.go b/caller.go index eb2e10d..8b354b2 100644 --- a/caller.go +++ b/caller.go @@ -8,7 +8,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" - "github.com/forta-network/go-multicall/contracts/contract_multicall" + "github.com/xiangxn/go-multicall/contracts/contract_multicall" ) // DefaultAddress is the same for all chains (Multicall3). @@ -69,6 +69,9 @@ func (caller *Caller) Call(opts *bind.CallOpts, calls ...*Call) ([]*Call, error) for i, result := range results { call := calls[i] // index always matches call.Failed = !result.Success + if call.Failed { + continue + } if err := call.Unpack(result.ReturnData); err != nil { return calls, fmt.Errorf("failed to unpack call outputs at index [%d]: %v", i, err) } diff --git a/caller_test.go b/caller_test.go index 9d82367..986abed 100644 --- a/caller_test.go +++ b/caller_test.go @@ -7,8 +7,8 @@ import ( "github.com/ethereum/go-ethereum/accounts/abi/bind" "github.com/ethereum/go-ethereum/common" - "github.com/forta-network/go-multicall/contracts/contract_multicall" "github.com/stretchr/testify/require" + "github.com/xiangxn/go-multicall/contracts/contract_multicall" ) type testType struct { diff --git a/examples/agent_registry/main.go b/examples/agent_registry/main.go index 1138ea4..2581288 100644 --- a/examples/agent_registry/main.go +++ b/examples/agent_registry/main.go @@ -7,7 +7,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/forta-network/go-multicall" + "github.com/xiangxn/go-multicall" ) const ( diff --git a/examples/balance/main.go b/examples/balance/main.go index 05c43c8..ef3c1fe 100644 --- a/examples/balance/main.go +++ b/examples/balance/main.go @@ -6,7 +6,7 @@ import ( "math/big" "github.com/ethereum/go-ethereum/common" - "github.com/forta-network/go-multicall" + "github.com/xiangxn/go-multicall" ) const ( diff --git a/go.mod b/go.mod index ca96687..a77069f 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/forta-network/go-multicall +module github.com/xiangxn/go-multicall go 1.19