Jared Wasinger
b33c6c97c5
accounts/abi/bind/v2: add package-level documentation summarizing the utilties. Better documentation indicating the intended use of DefaultDeployer and the deployment options available.
2025-03-08 10:19:25 +01:00
Jared Wasinger
829c3cba34
accounts/abi/bind/v2: simplify EventIterator.Next interface: don't return error
2025-03-07 10:23:04 +01:00
Jared Wasinger
24dbfc82cd
accounts/abi/bind/v2/internal/contracts: recompile all contracts to update any bindings that were stale (all changed because I used a newer version of solc)
2025-03-07 10:17:47 +01:00
Jared Wasinger
9b7dfc4575
accounts/abi/bind/v2/internal/contracts/db: revert unintended change to contract.sol
2025-02-17 20:40:40 -08:00
Jared Wasinger
c5fa9c4182
accounts/abi: don't capitalise argument names in pack functions. normalizeArgs returns args with names that start lowercase.
2025-02-17 19:41:45 -08:00
Jared Wasinger
8b506f5b6f
accounts/abi/abigen: remove duplicated method normalization logic
2025-02-17 17:39:03 -08:00
Jared Wasinger
e97cef6365
accounts/abi/abigen: simplify calculation whether or not a method's outputs should be gathered into a struct
2025-02-17 17:39:03 -08:00
Jared Wasinger
ab6643b775
cmd/abigen: remove regression: ensure that either --abi or --combined-json are set.
2025-02-17 17:39:03 -08:00
Jared Wasinger
9eddba42ba
accounts/abi/abigen: remove unused template helper function
2025-02-17 17:38:53 -08:00
Jared Wasinger
a9b2384c19
accounts/abi/bind/v2: for v2 utility API: restrict func doc comments to 80 chars per line, fill in TODOs.
2025-02-12 13:35:38 -08:00
Jared Wasinger
9d7001c1f6
accounts/abi/bind/v2: clean up lib.go:
...
* improve function and type comments (adding a TODO for FilterEvents/WatchEvents descriptions)
* simplify EventIterator implementation, change signature of Next to return an error if it occurred. Don't prevent further iteration if the subscription was cancelled before all the logs could be read from the channel (this needs a test case).
2025-02-11 20:33:59 -08:00
Jared Wasinger
9d5003c4c4
accounts/abi: regenerate test bindings
2025-02-10 17:28:12 -08:00
Jared Wasinger
c88e3874bb
accounts/abi: attempt to improve documentation throughout the PR. Make the method docs in generated bindings consistent.
2025-02-10 17:26:47 -08:00
Jared Wasinger
6868cd49d9
abigen: replace space-prefixed lines with tabs
2025-02-09 18:35:00 -08:00
Jared Wasinger
868e3c6552
accounts/abi/abigen: fix generation of event struct fields in bindings
2025-02-09 18:15:27 -08:00
Jared Wasinger
9ab62d60f0
accounts/abi/abigen: improve v2 template
...
Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-02-07 07:03:02 -08:00
Jared Wasinger
2241fbb5f4
accounts/abi/bind/v2: add Transact utility method for v2. There is already an identical Transact member method on the BoundContract struct. I just add this one to ensure that user code which performs transactions doesn't have to use both the v1 BoundContract methods and the utility methods provided in v2/lib.go
2025-02-06 15:02:14 -08:00
Jared Wasinger
a3b95f014c
update tests
2025-02-06 14:45:40 -08:00
Jared Wasinger
de5fb7401b
revert 6c70418313, 028ef2f263
2025-02-06 14:45:28 -08:00
Jared Wasinger
0df5b17df3
accounts/abi/bind/v2: simplify DefaultDeployer func signature
2025-02-05 20:36:27 -08:00
Gary Rong
8a4a5a60fb
accounts/abi/abigen, account/abi/bind/v2: polish code
2025-02-06 12:03:48 +08:00
Jared Wasinger
6680b836f6
accounts/abi/bind/v2: modify v2 DeployContract to take packed input to be more in-line with the rest of the API. add a default DeployFn implementation for the deployer.
2025-02-04 19:18:25 -08:00
Jared Wasinger
e8259bf98e
cmd/abigen: for '--alias' flag descriptor, mention that errors are aliased if --v2 is set.
2025-02-04 17:23:34 -08:00
Jared Wasinger
c9cab4d2bc
update tests
2025-02-04 16:19:53 -08:00
Jared Wasinger
14f84d35c8
accounts/abi/abigend: ensure that the bindings produced for a single contract are deterministic.
2025-02-04 16:19:50 -08:00
Jared Wasinger
484164968c
accounts/abi: regenerate test data
2025-02-03 20:21:17 -08:00
Jared Wasinger
cf0d15d276
remove redundant method
2025-02-03 20:18:34 -08:00
Jared Wasinger
3a96aaa819
fix lint
2025-02-03 20:06:05 -08:00
Jared Wasinger
82886ff010
update tests
2025-02-03 20:01:28 -08:00
Jared Wasinger
6c70418313
accounts/abi/bind/v2: improvement on the previous commit: remove all publicly-exported member methods from v2 BoundContract. Most of these are only needed to implement the contract interaction methods in accounts/abi/bind/v2/lib.go . Add 'Transact' method to the contract interaction API.
2025-02-03 20:00:45 -08:00
Jared Wasinger
028ef2f263
accounts/abi/bind/v2: add separate BoundContract struct for v2. Previously, it was unintuitive to instantiate a BoundContract instance which contained member methods used by V1 bindings, while the corresponding methods for v2 functionality were implemented as non-member methods. The new v2 BoundContract instance only exposes member methods that are required by the V2 contract interaction utility methods.
2025-02-03 17:33:26 -08:00
Jared Wasinger
741ed92383
accounts/abi/abigen/testdata/v2,accounts/abi/bind/v2/internal/contracts: update test data
2025-02-03 14:02:39 -08:00
Jared Wasinger
3eb1f8ab7f
accounts/abi: rename MetaData field 'Id' to 'ID'
2025-02-03 14:02:32 -08:00
Jared Wasinger
7fc8c6d553
update generated bindings for tests
2025-02-03 07:15:36 -08:00
Jared Wasinger
d43e375683
accounts/abi: rename contract MetaData field 'Pattern' to 'Id'. This reflects the fact that this field will not hold the solidity library pattern when it cannot be defined (when not using the --combined-json option). Modify LinkAndDeploy to return an error upfront if any of the provided metadatas in the DeploymentParams do not have deployer code embedded. Add comment clarifying semantics of link and deploy wrt contracts that share common dependency libraries
2025-02-03 07:13:30 -08:00
Jared Wasinger
ddb9390bae
update generated bindings
2025-01-30 16:22:45 -08:00
Jared Wasinger
20bf7bd631
only populate Pattern field on binding metdata if the bindings were built from a combined-json
2025-01-30 14:18:35 -08:00
Jared Wasinger
6d3e3b2ec5
accounts/abi/abigen/testdata/v2: update converted v1 test binding (testcase that binds abi only)
2025-01-29 19:09:51 -08:00
Jared Wasinger
07ab96e742
accounts/abi/abigen: add binding generation test that mirrors the --abi option (not providing the libraries or binaries as source of the binding, only the abi definition). Extract single converted v1 test into this new test case.
2025-01-29 19:00:33 -08:00
Jared Wasinger
a4480b2db3
accounts/abi/bind/v2: remove instances copying of MetaData in contract linking test
2025-01-29 19:00:33 -08:00
Felix Lange
47784b98b1
accounts/abi/bind/v2: infer event name from type
2025-01-28 00:54:05 +01:00
Felix Lange
c452fb10f0
accounts/abi/abigen: create ContractEventName method
2025-01-28 00:54:05 +01:00
Felix Lange
fd3bb352fe
accounts/abi/bind: make MetaData independent of v2
2025-01-28 00:54:05 +01:00
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
f937417fd8
accounts/abi/abigen: change for removal of ContractInstance
2025-01-27 23:56:30 +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