aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/ens
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-01-03 22:53:06 +0800
committerGitHub <noreply@github.com>2018-01-03 22:53:06 +0800
commit762f3a48a00da02fe58063cb6ce8dc2d08821f15 (patch)
tree783421f8ece4306f69cb17e515ee07c1ab4fe0eb /contracts/ens
parentb47285f1cf0cb475f29322ceb9fac4d7e1cfb11f (diff)
parent6f69cdd109b1dd692b8dfb15e7c53d2051fbc946 (diff)
downloaddexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.gz
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.bz2
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.lz
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.xz
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.tar.zst
dexon-762f3a48a00da02fe58063cb6ce8dc2d08821f15.zip
Merge pull request #15466 from karalabe/uint64-gas-limit
all: switch gas limits from big.Int to uint64
Diffstat (limited to 'contracts/ens')
-rw-r--r--contracts/ens/ens.go5
-rw-r--r--contracts/ens/ens_test.go2
2 files changed, 3 insertions, 4 deletions
diff --git a/contracts/ens/ens.go b/contracts/ens/ens.go
index c292a1714..60c3c83ab 100644
--- a/contracts/ens/ens.go
+++ b/contracts/ens/ens.go
@@ -19,7 +19,6 @@ package ens
//go:generate abigen --sol contract/ens.sol --pkg contract --out contract/ens.go
import (
- "math/big"
"strings"
"github.com/ethereum/go-ethereum/accounts/abi/bind"
@@ -163,7 +162,7 @@ func (self *ENS) Register(name string) (*types.Transaction, error) {
}
opts := self.TransactOpts
- opts.GasLimit = big.NewInt(200000)
+ opts.GasLimit = 200000
return registrar.Contract.Register(&opts, label, self.TransactOpts.From)
}
@@ -178,6 +177,6 @@ func (self *ENS) SetContentHash(name string, hash common.Hash) (*types.Transacti
}
opts := self.TransactOpts
- opts.GasLimit = big.NewInt(200000)
+ opts.GasLimit = 200000
return resolver.Contract.SetContent(&opts, node, hash)
}
diff --git a/contracts/ens/ens_test.go b/contracts/ens/ens_test.go
index 5faa9b1ad..9ab137581 100644
--- a/contracts/ens/ens_test.go
+++ b/contracts/ens/ens_test.go
@@ -37,7 +37,7 @@ func TestENS(t *testing.T) {
contractBackend := backends.NewSimulatedBackend(core.GenesisAlloc{addr: {Balance: big.NewInt(1000000000)}})
transactOpts := bind.NewKeyedTransactor(key)
// Workaround for bug estimating gas in the call to Register
- transactOpts.GasLimit = big.NewInt(1000000)
+ transactOpts.GasLimit = 1000000
ens, err := DeployENS(transactOpts, contractBackend)
if err != nil {