Skip checking ethscan contract existence
This commit is contained in:
parent
bea0b5a63d
commit
73afe62782
|
@ -1,7 +1,6 @@
|
||||||
package contracts
|
package contracts
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"errors"
|
"errors"
|
||||||
|
|
||||||
"github.com/ethereum/go-ethereum/common"
|
"github.com/ethereum/go-ethereum/common"
|
||||||
|
@ -181,14 +180,6 @@ func (c *ContractMaker) NewEthScan(chainID uint64) (*ethscan.BalanceScanner, uin
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
bytecode, err := backend.CodeAt(context.Background(), contractAddr, nil)
|
|
||||||
if err != nil {
|
|
||||||
return nil, 0, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if len(bytecode) == 0 {
|
|
||||||
return nil, 0, errors.New("is not a contract")
|
|
||||||
}
|
|
||||||
|
|
||||||
scanner, err := ethscan.NewBalanceScanner(
|
scanner, err := ethscan.NewBalanceScanner(
|
||||||
contractAddr,
|
contractAddr,
|
||||||
|
|
Loading…
Reference in New Issue