Felix Lange
e9d795da7c
Update lib.go
2025-03-08 18:35:13 +01:00
Jared Wasinger
9f5d77bae6
accounts/abi/bind/v2: clarify that v2 utility methods are intended to be used with contract bindings generated with --v2. Simplify Transact impl
2025-03-08 11:27:57 +01:00
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
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
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
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
cf0d15d276
remove redundant method
2025-02-03 20:18:34 -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
Felix Lange
47784b98b1
accounts/abi/bind/v2: infer event name from type
2025-01-28 00:54:05 +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
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
d6316e056c
accounts/abi/bind: remove third return value of DeployContractRaw
2025-01-22 14:27:26 +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
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
Jared Wasinger
2ab719cc59
accounts/abi/bind/v2: remove unecessary TODOs. Fix TestErrors compilation
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
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
3129593b3f
export event names in bindings. remove added APIs Filter/Watch-Logs which take event ids.
2025-01-22 13:54:57 +01:00
Jared Wasinger
780dd76746
add some docs
2025-01-22 13:54:57 +01:00
Jared Wasinger
2421cc3ed5
move contract dep tree, link-and-deploy to bind package. This is so that bind can build the dependency tree for each library to populate their exported deps.
2025-01-22 13:54:57 +01:00
Jared Wasinger
7000583654
fix regex for solc pattern matching
2025-01-22 13:54:57 +01:00
Jared Wasinger
709ff38bc1
gofmt files. add a TODO comment and remove another useless comment
2025-01-22 13:54:57 +01:00
Jared Wasinger
645c844f4b
clean up link/deploy code. add docs
2025-01-22 13:54:57 +01:00
Jared Wasinger
47192a758c
change semantics of contract overrides again: any direct/indirect dependencies of contracts/libraries specified with override addresses should not be deployed if they are not elsewhere referenced as direct/indirect deps of non-override contracts.
2025-01-22 13:54:57 +01:00
Jared Wasinger
736d587990
full support for errors with working test
2025-01-22 13:54:57 +01:00
Jared Wasinger
e7e1426d89
remove debug prints. fix contract linking test condition
2025-01-22 13:54:57 +01:00
Jared Wasinger
c293caade9
tests working now
2025-01-22 13:54:57 +01:00
Jared Wasinger
5cc853d807
fix linking tests
2025-01-22 13:54:57 +01:00
Jared Wasinger
60fc16dea8
rewrite contract link/deploy again
2025-01-22 13:54:57 +01:00
Jared Wasinger
463c3b6dd4
fix test cases
2025-01-22 13:54:57 +01:00
Jared Wasinger
81289d7e26
wip: update
2025-01-22 13:54:57 +01:00
Jared Wasinger
4821fbae99
add test cases for contract linking that I forgot to push earlier. Fix deployment logic (apparently modifying a map in-place during iteration is not safe????
2025-01-22 13:54:57 +01:00
Jared Wasinger
44420cbb36
basic linking test working
2025-01-22 13:54:57 +01:00
Jared Wasinger
c8b17ca9c4
staging changes for linking tests. rework LinkAndDeploy to decouple logic of contract deployment, by passing a callback that does it.
2025-01-22 13:54:57 +01:00
Jared Wasinger
4872d7fde5
remove unecessary abi parameter from WatchEvents. simplify event tests
2025-01-22 13:54:57 +01:00
Jared Wasinger
a0485167d5
add generic call/transact
2025-01-22 13:54:57 +01:00
Jared Wasinger
28d57002ff
add generic log watching/filtering. skip adding generic call/transact (issue with interface regarding contract methods that don't take arguments)
2025-01-22 13:54:57 +01:00
Jared Wasinger
6b5967afd8
delete unused test data. remove useless v2 helper methods. update tests
2025-01-22 13:54:57 +01:00
Jared Wasinger
d3d6926683
fix contract filter test. rename *Logs methods to *Events, to reflect the fact that these are specific to solidity events.
2025-01-22 13:54:57 +01:00
Jared Wasinger
1f25c68ec4
add error unpacking. simplify WatchLogs api.
2025-01-22 13:54:57 +01:00
Jared Wasinger
4fc62e94b3
add errors to emitted code.
2025-01-22 13:54:57 +01:00