@@ -301,21 +301,21 @@ func (t *Transaction) Status(ctx context.Context) (*hexutil.Uint64, error) {
301301 return & ret , nil
302302}
303303
304- func (t * Transaction ) GasUsed (ctx context.Context ) (* hexutil. Uint64 , error ) {
304+ func (t * Transaction ) GasUsed (ctx context.Context ) (* Long , error ) {
305305 receipt , err := t .getReceipt (ctx )
306306 if err != nil || receipt == nil {
307307 return nil , err
308308 }
309- ret := hexutil . Uint64 (receipt .GasUsed )
309+ ret := Long (receipt .GasUsed )
310310 return & ret , nil
311311}
312312
313- func (t * Transaction ) CumulativeGasUsed (ctx context.Context ) (* hexutil. Uint64 , error ) {
313+ func (t * Transaction ) CumulativeGasUsed (ctx context.Context ) (* Long , error ) {
314314 receipt , err := t .getReceipt (ctx )
315315 if err != nil || receipt == nil {
316316 return nil , err
317317 }
318- ret := hexutil . Uint64 (receipt .CumulativeGasUsed )
318+ ret := Long (receipt .CumulativeGasUsed )
319319 return & ret , nil
320320}
321321
@@ -811,15 +811,15 @@ type CallData struct {
811811// CallResult encapsulates the result of an invocation of the `call` accessor.
812812type CallResult struct {
813813 data hexutil.Bytes // The return data from the call
814- gasUsed hexutil. Uint64 // The amount of gas used
814+ gasUsed Long // The amount of gas used
815815 status hexutil.Uint64 // The return status of the call - 0 for failure or 1 for success.
816816}
817817
818818func (c * CallResult ) Data () hexutil.Bytes {
819819 return c .data
820820}
821821
822- func (c * CallResult ) GasUsed () hexutil. Uint64 {
822+ func (c * CallResult ) GasUsed () Long {
823823 return c .gasUsed
824824}
825825
@@ -847,22 +847,22 @@ func (b *Block) Call(ctx context.Context, args struct {
847847
848848 return & CallResult {
849849 data : result .ReturnData ,
850- gasUsed : hexutil . Uint64 (result .UsedGas ),
850+ gasUsed : Long (result .UsedGas ),
851851 status : status ,
852852 }, nil
853853}
854854
855855func (b * Block ) EstimateGas (ctx context.Context , args struct {
856856 Data ethapi.CallArgs
857- }) (hexutil. Uint64 , error ) {
857+ }) (Long , error ) {
858858 if b .numberOrHash == nil {
859859 _ , err := b .resolveHeader (ctx )
860860 if err != nil {
861- return hexutil . Uint64 ( 0 ) , err
861+ return 0 , err
862862 }
863863 }
864864 gas , err := ethapi .DoEstimateGas (ctx , b .backend , args .Data , * b .numberOrHash , b .backend .RPCGasCap ())
865- return gas , err
865+ return Long ( gas ) , err
866866}
867867
868868type Pending struct {
@@ -917,16 +917,17 @@ func (p *Pending) Call(ctx context.Context, args struct {
917917
918918 return & CallResult {
919919 data : result .ReturnData ,
920- gasUsed : hexutil . Uint64 (result .UsedGas ),
920+ gasUsed : Long (result .UsedGas ),
921921 status : status ,
922922 }, nil
923923}
924924
925925func (p * Pending ) EstimateGas (ctx context.Context , args struct {
926926 Data ethapi.CallArgs
927- }) (hexutil. Uint64 , error ) {
927+ }) (Long , error ) {
928928 pendingBlockNr := rpc .BlockNumberOrHashWithNumber (rpc .PendingBlockNumber )
929- return ethapi .DoEstimateGas (ctx , p .backend , args .Data , pendingBlockNr , p .backend .RPCGasCap ())
929+ gas , err := ethapi .DoEstimateGas (ctx , p .backend , args .Data , pendingBlockNr , p .backend .RPCGasCap ())
930+ return Long (gas ), err
930931}
931932
932933// Resolver is the top-level object in the GraphQL hierarchy.
0 commit comments