Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
VickMellon committed Apr 12, 2023
2 parents c37dd9a + df6c7b4 commit a97d435
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions EthProvider.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ func (p *DefaultEthProvider) getAuth(options *GasOptions) *bind.TransactOpts {
newAuth.GasPrice = options.GasPrice
newAuth.GasLimit = options.GasLimit
}
if newAuth.GasPrice == nil {
newAuth.GasPrice, _ = p.ec.SuggestGasPrice(context.Background())
}
return newAuth
}

Expand Down
7 changes: 5 additions & 2 deletions Wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,11 @@ func (w *Wallet) Deploy(bytecode []byte, calldata []byte, salt []byte, deps [][]
return w.EstimateAndSend(tx, nonce)
}

func (w *Wallet) Execute(contract common.Address, calldata []byte, nonce *big.Int) (common.Hash, error) {
func (w *Wallet) Execute(contract common.Address, calldata []byte, value *big.Int, nonce *big.Int) (common.Hash, error) {
var err error
if value == nil {
value = big.NewInt(0)
}
if nonce == nil {
nonce, err = w.GetNonce()
if err != nil {
Expand All @@ -456,7 +459,7 @@ func (w *Wallet) Execute(contract common.Address, calldata []byte, nonce *big.In
contract,
big.NewInt(0),
big.NewInt(0),
big.NewInt(0),
value,
calldata,
nil, nil,
)
Expand Down

0 comments on commit a97d435

Please sign in to comment.