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
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
1013c1c25b
accounts/abi/abigen: add panic when encoding constructor input fails
2025-01-23 14:00:06 +01:00
Felix Lange
1be2215a35
accounts/abi/abigen: use tabs for indent in v2 template
2025-01-23 13:53:25 +01:00
Felix Lange
dbe60f0b67
accounts/abi/abigen: remove error in v2 Pack function
...
This error cannot occur because abigen is in charge of selecting the Go types that will be
encoded, and it only ever chooses types which are representable in ABI.
2025-01-23 13:48:13 +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
4e43eec5f7
accounts/abi/bind: add missing function
2025-01-22 20:08:22 +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
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