Skip to content

Commit 00ba876

Browse files
committed
eth, graphql, internal/ethapi: merge CallArgs and SendTxArgs
internal/ethapi: remove unused function
1 parent 32c1ed8 commit 00ba876

File tree

4 files changed

+226
-213
lines changed

4 files changed

+226
-213
lines changed

eth/tracers/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ func (api *API) TraceTransaction(ctx context.Context, hash common.Hash, config *
730730
// created during the execution of EVM if the given transaction was added on
731731
// top of the provided block and returns them as a JSON object.
732732
// You can provide -2 as a block number to trace on top of the pending block.
733-
func (api *API) TraceCall(ctx context.Context, args ethapi.CallArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceCallConfig) (interface{}, error) {
733+
func (api *API) TraceCall(ctx context.Context, args ethapi.TransactionArgs, blockNrOrHash rpc.BlockNumberOrHash, config *TraceCallConfig) (interface{}, error) {
734734
// Try to retrieve the specified block
735735
var (
736736
err error

graphql/graphql.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ func (c *CallResult) Status() Long {
862862
}
863863

864864
func (b *Block) Call(ctx context.Context, args struct {
865-
Data ethapi.CallArgs
865+
Data ethapi.TransactionArgs
866866
}) (*CallResult, error) {
867867
if b.numberOrHash == nil {
868868
_, err := b.resolve(ctx)
@@ -887,7 +887,7 @@ func (b *Block) Call(ctx context.Context, args struct {
887887
}
888888

889889
func (b *Block) EstimateGas(ctx context.Context, args struct {
890-
Data ethapi.CallArgs
890+
Data ethapi.TransactionArgs
891891
}) (Long, error) {
892892
if b.numberOrHash == nil {
893893
_, err := b.resolveHeader(ctx)
@@ -937,7 +937,7 @@ func (p *Pending) Account(ctx context.Context, args struct {
937937
}
938938

939939
func (p *Pending) Call(ctx context.Context, args struct {
940-
Data ethapi.CallArgs
940+
Data ethapi.TransactionArgs
941941
}) (*CallResult, error) {
942942
pendingBlockNr := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)
943943
result, err := ethapi.DoCall(ctx, p.backend, args.Data, pendingBlockNr, nil, vm.Config{}, 5*time.Second, p.backend.RPCGasCap())
@@ -957,7 +957,7 @@ func (p *Pending) Call(ctx context.Context, args struct {
957957
}
958958

959959
func (p *Pending) EstimateGas(ctx context.Context, args struct {
960-
Data ethapi.CallArgs
960+
Data ethapi.TransactionArgs
961961
}) (Long, error) {
962962
pendingBlockNr := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)
963963
gas, err := ethapi.DoEstimateGas(ctx, p.backend, args.Data, pendingBlockNr, p.backend.RPCGasCap())

0 commit comments

Comments
 (0)