From d6316e056c816f62478b29677f0892791e272e63 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Wed, 22 Jan 2025 14:27:26 +0100 Subject: [PATCH] accounts/abi/bind: remove third return value of DeployContractRaw --- accounts/abi/bind/v2/lib.go | 6 +++--- accounts/abi/bind/v2/lib_test.go | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/accounts/abi/bind/v2/lib.go b/accounts/abi/bind/v2/lib.go index 939f21c599..6570ac6a71 100644 --- a/accounts/abi/bind/v2/lib.go +++ b/accounts/abi/bind/v2/lib.go @@ -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 } diff --git a/accounts/abi/bind/v2/lib_test.go b/accounts/abi/bind/v2/lib_test.go index eec93e67ab..a79ed2dd96 100644 --- a/accounts/abi/bind/v2/lib_test.go +++ b/accounts/abi/bind/v2/lib_test.go @@ -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) } }