accounts/abi/bind/v2: remove unecessary TODOs. Fix TestErrors compilation

This commit is contained in:
Jared Wasinger 2025-01-09 16:15:09 +08:00 committed by Felix Lange
parent 0a751f8727
commit 2ab719cc59
3 changed files with 1 additions and 4 deletions

View file

@ -11,7 +11,6 @@ contract C {
uint256 data
);
// TODO: consider log test where data is hashed? maybe not necessary for v2 coverage
function EmitOne() public {
emit basic1(
uint256(1),

View file

@ -165,7 +165,6 @@ func Transact(instance *ContractInstance, opts *bind.TransactOpts, input []byte)
return c.RawTransact(opts, input)
}
// TODO: test coverage for Call where the unpack method returns a pointer object.
// Call performs an eth_call on the given bound contract instance, using the
// provided abi-encoded input (or nil).
func Call[T any](instance *ContractInstance, opts *bind.CallOpts, packedInput []byte, unpack func([]byte) (T, error)) (T, error) {

View file

@ -195,7 +195,6 @@ func TestDeploymentWithOverrides(t *testing.T) {
}
}
// TODO: constructor input packing should not return an error.
ctrct, err := nested_libraries.NewC1()
if err != nil {
panic(err)
@ -395,7 +394,7 @@ func TestErrors(t *testing.T) {
ctrctABI, _ := solc_errors.CMetaData.GetAbi()
instance := ContractInstance{res.Addrs[solc_errors.CMetaData.Pattern], backend, *ctrctABI}
_, err = Call[struct{}](&instance, opts, packedInput, func(packed []byte) (*struct{}, error) { return nil, nil })
_, err = Call[struct{}](&instance, opts, packedInput, func(packed []byte) (struct{}, error) { return struct{}{}, nil })
if err == nil {
t.Fatalf("expected call to fail")
}