mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
return rawTx when signer is not preset and noSend is true
This commit is contained in:
parent
f94baab238
commit
752303432f
1 changed files with 4 additions and 0 deletions
|
|
@ -414,6 +414,10 @@ func (c *BoundContract) transact(opts *TransactOpts, contract *common.Address, i
|
|||
}
|
||||
// Sign the transaction and schedule it for execution
|
||||
if opts.Signer == nil {
|
||||
if opts.NoSend {
|
||||
// If no signer is provided, return the raw transaction
|
||||
return rawTx, nil
|
||||
}
|
||||
return nil, errors.New("no signer to authorize the transaction with")
|
||||
}
|
||||
signedTx, err := opts.Signer(opts.From, rawTx)
|
||||
|
|
|
|||
Loading…
Reference in a new issue