mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-02 18:13:44 +00:00
accounts/abi/bind: remove third return value of DeployContractRaw
This commit is contained in:
parent
92b1f74a5d
commit
d6316e056c
2 changed files with 4 additions and 5 deletions
|
|
@ -200,12 +200,12 @@ func Call[T any](instance ContractInstance, opts *CallOpts, packedInput []byte,
|
|||
// DeployContractRaw deploys a contract onto the Ethereum blockchain and binds the
|
||||
// deployment address with a Go wrapper. It expects its parameters to be abi-encoded
|
||||
// bytes.
|
||||
func DeployContractRaw(opts *TransactOpts, bytecode []byte, backend ContractBackend, packedParams []byte) (common.Address, *types.Transaction, *bind1.BoundContract, error) {
|
||||
func DeployContractRaw(opts *TransactOpts, bytecode []byte, backend ContractBackend, packedParams []byte) (common.Address, *types.Transaction, error) {
|
||||
c := bind1.NewBoundContract(common.Address{}, abi.ABI{}, backend, backend, backend)
|
||||
tx, err := c.RawCreationTransact(opts, append(bytecode, packedParams...))
|
||||
if err != nil {
|
||||
return common.Address{}, nil, nil, err
|
||||
return common.Address{}, nil, err
|
||||
}
|
||||
address := crypto.CreateAddress(opts.From, tx.Nonce())
|
||||
return address, tx, c, nil
|
||||
return address, tx, nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,7 @@ func testSetup() (*bind.TransactOpts, *backends.SimulatedBackend, error) {
|
|||
|
||||
func makeTestDeployer(auth *bind.TransactOpts, backend bind.ContractBackend) func(input, deployer []byte) (common.Address, *types.Transaction, error) {
|
||||
return func(input, deployer []byte) (common.Address, *types.Transaction, error) {
|
||||
addr, tx, _, err := bind.DeployContractRaw(auth, deployer, backend, input)
|
||||
return addr, tx, err
|
||||
return bind.DeployContractRaw(auth, deployer, backend, input)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue