Commit graph

12741 commits

Author SHA1 Message Date
Daniel Liu
c241fc3574 eth/filters: fix for eth_getLogs failing with tag (#25922) 2025-01-24 16:54:11 +08:00
Daniel Liu
98c67ab2d9 accounts/abi: return toGoType error immediately (#25565) 2025-01-24 16:54:11 +08:00
Daniel Liu
73947f03b7 accounts/abi/bind/backends: fix AdjustTime to respect Fork (#25225) 2025-01-24 16:54:11 +08:00
Daniel Liu
06394ca3c8 cmd/abigen: change --exc to exclude by type name (#22620)
The abigen exclusion pattern, previously on the form "path:type", now supports wildcards. Examples "*:type" to exclude a named type in all files, or "/path/to/foo.sol:*" all types in foo.sol.
2025-01-24 16:54:11 +08:00
Daniel Liu
fde9a7e270 cmd/abigen: redefine appp (#25851) 2025-01-24 16:54:11 +08:00
Daniel Liu
0389524da8 accounts/abi: fix typo in error message (#25742) 2025-01-24 16:54:11 +08:00
Daniel Liu
e2b5a03ce8 accounts: lint comments (#25726) 2025-01-24 16:54:11 +08:00
Daniel Liu
bdf80d77e4 accounts/abi/bind: add const for tx fee elasticity multiplier (#25504)
Co-authored-by: Felix Lange <fjl@twurst.com>
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
2025-01-24 16:54:11 +08:00
Daniel Liu
aec9d767cc accounts/abi: fix set function (#25477)
* accounts/abi: fix set function

* don't break things

* update test
2025-01-24 16:54:11 +08:00
Daniel Liu
b6be9c181c accounts/abi/bind/backends: typo fix (#25549) 2025-01-24 16:54:11 +08:00
Daniel Liu
c046f36afd accounts: fix some typos (#25551) 2025-01-24 16:54:11 +08:00
Daniel Liu
08fedbb503 accounts/abi: display name in "method/event not found" error (#25512) 2025-01-24 16:54:11 +08:00
Daniel Liu
78a35f1dc3 accounts: lint whitespace (#25312) 2025-01-24 16:54:11 +08:00
Daniel Liu
b3d89c0d84 accounts/abi: substitude arg%d to the range keyword (#25307)
* accounts/abi: substitude arg%d to the range keyword

* support more keywords

* review feedback
2025-01-24 16:54:11 +08:00
Daniel Liu
c5eecc5522 accounts/abi/bind/backends: return hash of new blocks (#25163)
Co-authored-by: Jens <jmw.1906@gmx.de>
2025-01-24 16:54:11 +08:00
Daniel Liu
b62913b54f accounts/scwallet: change format 0x%x to %#x (#25221) 2025-01-24 16:54:11 +08:00
Daniel Liu
53ea297d6a accounts/abi: replace fmt.Errorf with errors.New in abi argument (#25181)
Replace unnecessary fmt.Errorf with errors.New in accounts/abi/argument.go
2025-01-24 16:54:11 +08:00
Daniel Liu
d9b4f0f2c3 accounts/abi: prefer new(big.Int) over big.NewInt(0) (#25087) 2025-01-24 16:54:11 +08:00
Daniel Liu
9dda5b9819 accounts: more linters (#24783) 2025-01-24 16:54:11 +08:00
Daniel Liu
13eef32998 accounts/abi/bind: fix duplicate field names in the generated go struct (#24924)
* accounts/abi/bind: fix duplicate field names in the generated go struct #24627

* accounts, cmd/abigen: resolve name conflicts

* ci lint, accounts/abi: remove unused function overloadedArgName

Co-authored-by: Gary Rong <garyrong0905@gmail.com>
2025-01-24 16:54:11 +08:00
Daniel Liu
c4308f0fbc cmd/abigen: accept combined-json via stdin (#24960) 2025-01-24 16:54:11 +08:00
Daniel Liu
04fabd63a4 accounts/abi: validate fieldnames, fixes #24930 (#24932) 2025-01-24 16:54:11 +08:00
Daniel Liu
16cdf8f4ec accounts/abi: eplace strings.Replace with string.ReplaceAll (#24835) 2025-01-24 16:54:11 +08:00
Daniel Liu
a09fd97b11 abi: fix checks when all fields are indexed (#24792)
This PR fixes abi checks in the edge case where all arguments are indexed
2025-01-24 16:54:11 +08:00
Daniel Liu
98629d0c4b accounts: fix typo in comments (#24805) 2025-01-24 16:54:11 +08:00
Daniel Liu
206b61420f abi/base: return error for pending call error (#24649)
If a pending contract call errors, return that error right away rather
than ignoring it to allow an error somewhere else. This is helpful for
callers to know if perhaps a call failed because of the context deadline
being expired. This change mirrors the behavior of non-pending contract
calls.
2025-01-24 16:54:11 +08:00
Daniel Liu
5b10b2441c all: use T.TempDir to create temporary test directories (#24633) 2025-01-24 16:54:08 +08:00
Daniel Liu
8b9138521e accounts/abi/bind: improve WaitMined error handling (#24321)
This change makes it so WaitMined no longer logs an error when the receipt
is unavailable. It also changes the simulated backend to return NotFound for
unavailable receipts, just like ethclient does.
2025-01-24 16:18:30 +08:00
Daniel Liu
f22046701f accounts: correct spelling mistake (#24323)
I believe the sentence is attempting to explain that the URL is "[used] by upper layers to define a sorting order over all wallets from multiple backends."
2025-01-24 16:18:30 +08:00
Daniel Liu
c78cc1e8f8 accounts/abi: simplify Arguments.Unpack (#24277)
Since len(nonIndexedArgs) is definitely 0 in this context, the code can be simplified.
2025-01-24 16:18:30 +08:00
Daniel Liu
c55d8c8bab accounts: fix typo in errors.go (#24270) 2025-01-24 16:18:30 +08:00
Daniel Liu
4f7123c3c0 accounts/abi/bind/backends: return errors instead of panic (#24242) 2025-01-24 16:18:30 +08:00
Daniel Liu
9e82b201c7 accouts/scwallet: typo fix (#24207) 2025-01-24 16:18:30 +08:00
Daniel Liu
78fd3b44d7 accounts: corrected spelling mistakes (#24194)
Co-authored-by: sanskar khare <sanskarkhare@sanskars-MacBook-Air.local>
2025-01-24 16:18:30 +08:00
Daniel Liu
d89e2d6734 accounts: fix comments (#24186) 2025-01-24 16:18:30 +08:00
Daniel Liu
c5acd6822d accounts/abi: avoid unnecessary alloc (#24128) 2025-01-24 16:18:30 +08:00
Daniel Liu
b33307eaea accounts/abi/bind: correctly handle structs used only as constructor params (#23940)
The `structs` map is populated by iterating over all methods except the constructor, which results in a nil-pointer dereference.

I've first reproduced the problem with a new test and then implemented the fix.

Co-authored-by: Arran Schlosberg <me@arranschlosberg.com>
2025-01-24 16:18:30 +08:00
Daniel Liu
bdf9d80b56 accounts/abi/bind/backends: fix race condition in simulated backend (#23898)
Now that `SimulatedBackend.SuggestGasPrice` inspects member values, a lock needs to be added to prevent a race condition.
2025-01-24 16:18:30 +08:00
Daniel Liu
65c3ad5cba accounts/abi/bin/backends: return basefee in suggestGasPrice (#23838)
Co-authored-by: mrx <mrx@mrx.com>
2025-01-24 16:18:30 +08:00
Daniel Liu
7fb05b7c16 accounts/abi: add basic support for error types (#23161)
This is the initial step for support of Solidity errors in contract bindings.
As of this change, errors can be decoded, but are not supported in
bindings yet.

Closes #23157
2025-01-24 16:18:30 +08:00
Daniel Liu
0c9babc95c accounts/abi/bind: refactor transact method (#23719) 2025-01-24 16:18:30 +08:00
Daniel Liu
46a16f9149 accounts/abi: fix some go-critic linter warnings (#23709) 2025-01-24 16:18:30 +08:00
Daniel Liu
2af78feca0 accounts/abi/bind: check event signature before parsing (#23230)
* accounts/abi/bind: check event signature before parsing

* remove redundant break line
2025-01-24 16:18:30 +08:00
Daniel Liu
2b396f29ad accounts/abi: fix resolving single struct argument (#23573) 2025-01-24 16:18:30 +08:00
Daniel Liu
bcae4205e4 accounts/keystore: fix flaky tests (#23599)
* ethclient/gethclient: fix flaky test (due to map key ordering)

* accounts/keystore: fix test failing due to rand collision due to low time resolution on windows
2025-01-24 16:18:30 +08:00
Daniel Liu
f74eacd2cd node: remove dependency on wallet backend packages (#23019)
* accounts: new AddBackends method in manager

* node,cmd/geth: mv accman backend init to cmd/geth

* node,cmd/geth: mv scrypt config downstreawm from node

* accounts: use static buffer size for accman sub chan

minor fix

* accounts,cmd/geth: update accman backends through its event loop

* accounts,node: add comments

* accounts: un-export newBackendEvent

* accounts: use chan instead of wg in newBlockEvent

* node: rename isKeyDirEphem

* accounts,cmd: AddBackends->AddBackend

* accounts: fix potential blocking when adding backend
2025-01-24 16:18:30 +08:00
Daniel Liu
e33909649b cmd/utils: don't enumerate usb when --usb isn't set (#22130) 2025-01-24 16:18:30 +08:00
Daniel Liu
83b7c0eacb accounts/keystore: add go:build lines (#23468) 2025-01-24 16:18:30 +08:00
Daniel Liu
36d3e7dcc2 accounts/abi/bind: set Context in TransactOpts (#23188) 2025-01-24 16:18:30 +08:00
Daniel Liu
92d9f7e13a accounts/abi/bind: parse ABI only once, create metadata struct (#22583) 2025-01-24 16:18:30 +08:00