Commit graph

102 commits

Author SHA1 Message Date
Felix Lange
176a4b3591 accounts/abi/bind/v2: add Backend type 2025-01-28 00:31:22 +01:00
Felix Lange
d5481a6327 accounts/abi/bind/v2: document MetaData fields and remove Sigs 2025-01-28 00:28:57 +01:00
Felix Lange
d3dfbf9bfa accounts/abi/bind/v2: export DeploymentParams fields
The constructor function doesn't make sense. The struct has one required and two optional
fields, and we may want to add more configuration later. With the constructor function,
all parameters always need to be given, even the optional ones. And we can't extend the
function without breaking the API. So it's better to use require users to write the
literal.
2025-01-28 00:19:15 +01:00
Felix Lange
8200bbf4a0 accounts/abi/bind/v2: provide only one version of WaitMined, WaitDeployed
WaitMinedHash & WaitDeployedHash are more versatile, they only need the hash.
2025-01-28 00:07:21 +01:00
Felix Lange
7c5c0bbbf3 accounts/abi/bind/v2: remove ContractInstance
It's equivalent to BoundContract.
2025-01-27 23:55:26 +01:00
Felix Lange
c9da576739 accounts/abi/bind/v2: change interface{} -> any 2025-01-27 23:55:08 +01:00
Felix Lange
5387d49400 accounts/abi/bind/v2: rename GetAbi -> ParseABI 2025-01-27 23:19:01 +01:00
Felix Lange
888bbcce9c accounts/abi/bind/v2: fix test 2025-01-23 14:00:06 +01:00
Felix Lange
92f6ec13f2 accounts/abi/abigen: update test bindings 2025-01-23 14:00:06 +01:00
Felix Lange
d5323011af accounts/abi/bind: fixup 2025-01-22 23:29:12 +01:00
Felix Lange
593a97f933 accounts/abi/bind/v2: remove deprecated TransactOpts constructors in v2 2025-01-22 23:24:55 +01:00
Felix Lange
ead086b674 accounts/abi/bind: move implementation to v2 package
Forwarding declarations remain in the v1 package.
2025-01-22 23:14:24 +01:00
Felix Lange
169a42448c accounts/abi/bind: move code generator to accounts/abi/abigen 2025-01-22 20:06:38 +01:00
Felix Lange
d6316e056c accounts/abi/bind: remove third return value of DeployContractRaw 2025-01-22 14:27:26 +01:00
Felix Lange
92b1f74a5d accounts/abi/bind: update converted v1 bind tests 2025-01-22 13:58:10 +01:00
Felix Lange
5598edfe48 accounts/abi/bind/v2: update tests
- add go:generate lines for updating the test bindings
- move tests to bind_test package because the contracts now import bind/v2
- simplify some code in tests
2025-01-22 13:54:58 +01:00
Felix Lange
56502a9122 accounts/abi/bind/v2: support passing nil unpack function in Call 2025-01-22 13:54:58 +01:00
Felix Lange
1602eb8aa6 accounts/abi/bind/v2: update generated bindings for test 2025-01-22 13:54:58 +01:00
Felix Lange
1bdc820c98 accounts/abi/bind/v2: pass contract instance as value 2025-01-22 13:54:58 +01:00
Felix Lange
077556859c accounts/abi/bind/v2: add ContractInstance constructor 2025-01-22 13:54:58 +01:00
Felix Lange
0e856b512a accounts/abi/bind/v2: rename package to "bind" and reexport some v1 stuff 2025-01-22 13:54:58 +01:00
Felix Lange
dbe316a48d accounts/abi/bind/v2: remove some unnecessary type parameters 2025-01-22 13:54:58 +01:00
Jared Wasinger
bda5e4c496 fix test 'BindingV2ConvertedV1Tests'. add more comprehensive output checking to solc errors test. 2025-01-22 13:54:58 +01:00
Jared Wasinger
8d3fc41c9a accounts/abi/bind, accounts/abi/bind/v2: fix error unpacking. update relevant binding example. make error unpacking test more comprehensive 2025-01-22 13:54:58 +01:00
Jared Wasinger
2ab719cc59 accounts/abi/bind/v2: remove unecessary TODOs. Fix TestErrors compilation 2025-01-22 13:54:58 +01:00
Jared Wasinger
0a751f8727 accounts/abi/bind/v2: fix test that doesn't compile 2025-01-22 13:54:58 +01:00
Jared Wasinger
8c20a2c987 accounts/abi/bind/v2: fix Call helper method: don't return a pointer to the generic unpacked type (b/c it may be a pointer itself in the case of *big.Int underlying type. in this case, double-pointer syntax in the generated binding code would look ugly. 2025-01-22 13:54:58 +01:00
Jared Wasinger
1b7aecef93 don't emit constructor input packing method if the contract constructor has no inputs 2025-01-22 13:54:58 +01:00
Jared Wasinger
c92220f20e add docs explaining internal variables on the v2 binder/contractBinder structs. convert exported metadata object in binding to be non-pointer type. Fix some linter issues. remove unecessary TODO comments 2025-01-22 13:54:58 +01:00
Jared Wasinger
9dd006f4e0 update converted v1 bindings
remove commented-out line
2025-01-22 13:54:58 +01:00
Jared Wasinger
1dd531a2ba misc template additions I forgot to include in previous commits. introduce 'RawDeploymentTransact' method 2025-01-22 13:54:58 +01:00
Jared Wasinger
b896ed2966 accounts/abi/bind, accounts/abi/bind/v2: move DeployContractRaw into v2 package 2025-01-22 13:54:58 +01:00
Jared Wasinger
9b453b04fe better naming for instance of self-struct in member methods of structs in generated bindings 2025-01-22 13:54:58 +01:00
Jared Wasinger
64c13eb2b9 update converted v1 bind test cases. rename test case that checks converted-v1 bindings in v2 to something more sensible 2025-01-22 13:54:58 +01:00
Jared Wasinger
8ea9929a30 accounts/abi/bind: fix some ugliness in the generated binding code which deals with pointer types 2025-01-22 13:54:58 +01:00
Jared Wasinger
3d974b22e2 accounts/abi/bind/v2/internal/contracts: update bindings 2025-01-22 13:54:58 +01:00
Jared Wasinger
41a0cfff69 accounts/abi/bind: deduplicate logic to normalize struct elements, event/error/method arguments/results. fix for case where normalization of name '_' would return an empty string 2025-01-22 13:54:58 +01:00
Jared Wasinger
0b09319eb7 accounts/abi/bind/v2/internal/contracts: regenerate bindings (they were mistakenly generated with a broken iteration of the code, and empty/broken bindings were included) 2025-01-22 13:54:58 +01:00
Jared Wasinger
fe2827e9d3 accounts/abi/bind/v2: fix lib_test.go (update test to reflect that bindings changed s.t. constructor unpack does not return error) 2025-01-22 13:54:58 +01:00
Jared Wasinger
e50bfdd053 remove error return from generated pack method for constructors. add the results of feeding v1 binding test ABIs through the v2 generator. 2025-01-22 13:54:57 +01:00
Jared Wasinger
708dc59223 copy DeploymentParams overrides before creating tree deployer (prevent the backing-array provided by the API user from being mutated). re-enable deployment-with-overrides test 2025-01-22 13:54:57 +01:00
Jared Wasinger
6a007cac18 wip 2025-01-22 13:54:57 +01:00
Jared Wasinger
2949b1a11d embed direct library relations in metadata in bindings. simplify dependency tree handling as a result of embedding it in the bindings. 2025-01-22 13:54:57 +01:00
Jared Wasinger
f90a88e85a make DeploymentParams fields private. instantiate it with a constructor method 2025-01-22 13:54:57 +01:00
Jared Wasinger
adc4ab6e79 remove unecessarily-added method 2025-01-22 13:54:57 +01:00
Jared Wasinger
b1f3970c57 tests pass 2025-01-22 13:54:57 +01:00
Jared Wasinger
b6d6ba92de refactor builds 2025-01-22 13:54:57 +01:00
Jared Wasinger
02ff41a738 add comment for tmplError struct and remove unused v2 backend interface 2025-01-22 13:54:57 +01:00
Jared Wasinger
2c9c9cf4bd regenerate bindings 2025-01-22 13:54:57 +01:00
Jared Wasinger
3129593b3f export event names in bindings. remove added APIs Filter/Watch-Logs which take event ids. 2025-01-22 13:54:57 +01:00