Felix Lange
25481e04bb
accounts/abi/bind: fix some more warnings
2025-01-22 14:32:49 +01:00
Felix Lange
faabbf7671
accounts/abi/bind: fix warning about assignment to blank
2025-01-22 14:29:52 +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
d330916f57
accounts/abi/bind: update v2 template
...
Two changes:
New function doesn't return error anymore. It's annoying having to handle
an error there, especially since we know the ABI must be valid (we parsed it in
order to generate the contract).
The new Instance method returns the ContractInstance for use with v2 library functions.
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
46e7e44e77
accounts/abi/bind: rename field in MetaData
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
Martin Holst Swende
45d51ce05b
accounts/abi/bind: un-embed+ make test nicer
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
5ae1de49c7
accounts/abi/bind: remove unecessary TODO from v2 template
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
4d2706c1c5
add TODO note about cleaning up template code for return values
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
fb26a5843e
address some recent feedback. add docs about what the binder and contractBinder structs are used for.
2025-01-22 13:54:58 +01:00
Jared Wasinger
c7ff6488d6
reenable TestBindingV2ConvertedV1Tests
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
bcc305dc20
remove unused comment. add method description for RawCreationTransact
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
f70344216e
accounts/abi/bind: simplify bindv2: create constructors for contractBinder, tmplContractV2. move some sanitization of values loaded from ABI definition into tmplContractV2 constructor
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
a934729c2d
remove useless todo in v2 template
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
0953522e86
accounts/abi/bind: remove duplicate convertedv1bindtests
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
f4acb0ce04
remove capitalize helper method. simplify call/event/error symbol name registration
2025-01-22 13:54:57 +01:00
Jared Wasinger
ddc897e52c
simplify vars naming in normalizeArgs
2025-01-22 13:54:57 +01:00
Jared Wasinger
ec0b3e52fe
fix events/error args normalization capitalization. add unit test that fails before the fix, and also also a few more test cases for args normalization.
2025-01-22 13:54:57 +01:00
Jared Wasinger
6a007cac18
wip
2025-01-22 13:54:57 +01:00
Jared Wasinger
5eb7271f0b
accounts/abi/bind: remove unused fields from template structs
2025-01-22 13:54:57 +01:00
Jared Wasinger
6afe90dddd
accounts/abi/bind: don't define link test case table as a package-private variable
2025-01-22 13:54:57 +01:00
Jared Wasinger
7f301229bf
accounts/abi/bind: make link test case failure output the index of the subtest that failed.
2025-01-22 13:54:57 +01:00
Martin Holst Swende
b4f1a3c009
clarifications
2025-01-22 13:54:57 +01:00
Martin Holst Swende
3436fb984e
accounts/abi/bind: simplifications
2025-01-22 13:54:57 +01:00