From 6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= <peterke@gmail.com>
Date: Mon, 13 Nov 2017 13:47:27 +0200
Subject: all: switch gas limits from big.Int to uint64

---
 eth/bind.go | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

(limited to 'eth/bind.go')

diff --git a/eth/bind.go b/eth/bind.go
index d09977dbc..769a6c741 100644
--- a/eth/bind.go
+++ b/eth/bind.go
@@ -83,9 +83,7 @@ func toCallArgs(msg ethereum.CallMsg) ethapi.CallArgs {
 		To:   msg.To,
 		From: msg.From,
 		Data: msg.Data,
-	}
-	if msg.Gas != nil {
-		args.Gas = hexutil.Big(*msg.Gas)
+		Gas:  hexutil.Uint64(msg.Gas),
 	}
 	if msg.GasPrice != nil {
 		args.GasPrice = hexutil.Big(*msg.GasPrice)
@@ -124,9 +122,9 @@ func (b *ContractBackend) SuggestGasPrice(ctx context.Context) (*big.Int, error)
 // the backend blockchain. There is no guarantee that this is the true gas limit
 // requirement as other transactions may be added or removed by miners, but it
 // should provide a basis for setting a reasonable default.
-func (b *ContractBackend) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (*big.Int, error) {
-	out, err := b.bcapi.EstimateGas(ctx, toCallArgs(msg))
-	return out.ToInt(), err
+func (b *ContractBackend) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) {
+	gas, err := b.bcapi.EstimateGas(ctx, toCallArgs(msg))
+	return uint64(gas), err
 }
 
 // SendTransaction implements bind.ContractTransactor injects the transaction
-- 
cgit v1.2.3