all: switch gas limits from big.Int to uint64
This commit is contained in:
@ -56,8 +56,8 @@ import (
|
||||
// * watching incoming ether
|
||||
|
||||
var (
|
||||
gasToCash = big.NewInt(2000000) // gas cost of a cash transaction using chequebook
|
||||
// gasToDeploy = big.NewInt(3000000)
|
||||
gasToCash = uint64(2000000) // gas cost of a cash transaction using chequebook
|
||||
// gasToDeploy = uint64(3000000)
|
||||
)
|
||||
|
||||
// Backend wraps all methods required for chequebook operation.
|
||||
|
@ -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)
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user