diff --git a/graphql/graphql.go b/graphql/graphql.go index 548000271c..446242aa67 100644 --- a/graphql/graphql.go +++ b/graphql/graphql.go @@ -23,7 +23,6 @@ import ( "time" "github.com/ethereum/go-ethereum" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core/rawdb" @@ -812,16 +811,9 @@ func (b *Block) Call(ctx context.Context, args struct { if result.Failed() { status = 0 } - data := result.Return() - // If the result contains a revert reason, try to unpack and return it. - if len(result.Revert()) > 0 { - reason, err := abi.UnpackRevert(result.Revert()) - if err == nil { - data = []byte(reason) - } - } + //TODO(rjl493456442, MariusVanDerWijden) return revert reason here once the spec supports an error reason. return &CallResult{ - data: data, + data: result.Return(), gasUsed: hexutil.Uint64(result.UsedGas), status: status, }, nil @@ -889,16 +881,9 @@ func (p *Pending) Call(ctx context.Context, args struct { if result.Failed() { status = 0 } - data := result.Return() - // If the result contains a revert reason, try to unpack and return it. - if len(result.Revert()) > 0 { - reason, err := abi.UnpackRevert(result.Revert()) - if err == nil { - data = []byte(reason) - } - } + //TODO(rjl493456442, MariusVanDerWijden) return revert reason here once the spec supports an error reason. return &CallResult{ - data: data, + data: result.Return(), gasUsed: hexutil.Uint64(result.UsedGas), status: status, }, nil