diff --git a/pkg/geth/contract.go b/pkg/geth/contract.go index ed4c9999..8813f545 100644 --- a/pkg/geth/contract.go +++ b/pkg/geth/contract.go @@ -19,7 +19,12 @@ func (blockchain *Blockchain) FetchContractData(abiJSON string, address string, if err != nil { return err } - input, err := parsed.Pack(method, methodArg) + var input []byte + if methodArg != nil { + input, err = parsed.Pack(method, methodArg) + } else { + input, err = parsed.Pack(method) + } if err != nil { return err }