Commit graph

12639 commits

Author SHA1 Message Date
Daniel Liu
601d1c80ea accounts/scwallet: fix unnecessary use of fmt.Sprint 2025-01-24 16:18:29 +08:00
Daniel Liu
6259ce565c accounts/abi faster unpacking of int256 (#20850) 2025-01-24 16:18:29 +08:00
Daniel Liu
219b5ef883 accounts: add walletsNoLock to avoid double read lock (#20655) 2025-01-24 16:18:29 +08:00
Daniel Liu
164d929307 accounts/abi/bind/backends: add support for historical state (#20644) 2025-01-24 16:18:29 +08:00
Daniel Liu
8d4c290cce accounts/abi: fix method constant flag for solidity 6.0 (#20482) 2025-01-24 16:18:29 +08:00
Daniel Liu
0350880af6 accounts/abi/backends/simulated: add more API methods (#5) (#20208)
* Add more functionality to the sim (#5)

* backends: implement more of ethclient in sim

* backends: add BlockByNumber to simulated backend

* backends: make simulated progress function agree with syncprogress interface for client

* backends: add more tests

* backends: add more comments

* backends: fix sim for index in tx and add tests

* backends: add lock back to estimategas

* backends: goimports

* backends: go ci lint

* Add more functionality to the sim (#5)

* backends: implement more of ethclient in sim

* backends: add BlockByNumber to simulated backend

* backends: make simulated progress function agree with syncprogress interface for client

* backends: add more tests

* backends: add more comments

* backends: fix sim for index in tx and add tests

* backends: add lock back to estimategas

* backends: goimports

* backends: go ci lint

* assert errs
2025-01-24 16:18:29 +08:00
Daniel Liu
f7b66c10b3 [#20266] Fix bugs decoding integers and fixed bytes in indexed event fields (#20269)
* fix parseTopics() and add tests

* remove printf

* add ParseTopicsIntoMap() tests

* fix FixedBytesTy

* fix int and fixed bytes

* golint topics_test.go
2025-01-24 16:18:29 +08:00
Daniel Liu
e9f9c19c52 accounts/abi/bind: fix destructive packing of *big.Int (#20412) 2025-01-24 16:18:29 +08:00
Daniel Liu
193ee6d606 accounts/usbwallet: fix staticcheck warnings (#20372) 2025-01-24 16:18:29 +08:00
Daniel Liu
db708e7697 accounts/scwallet: fix staticcheck warnings (#20370) 2025-01-24 16:18:29 +08:00
Daniel Liu
833c851361 accounts/keystore: fix staticcheck warnings (#20373)
* accounts/keystore: fix staticcheck warnings

* review feedback
2025-01-24 16:18:29 +08:00
Daniel Liu
f2fb9f8661 accounts/abi/bind: avoid reclaring structs (#20381) 2025-01-24 16:18:29 +08:00
Daniel Liu
eb628a4f02 accounts/abi: fix staticcheck warnings (#20358)
* accounts/abi: fix staticcheck warnings

* accounts/abi: restore unused field for test
2025-01-24 16:18:29 +08:00
Daniel Liu
575a5cb2e2 accounts/abi/bind/backends: remove unused assignment (#20359) 2025-01-24 16:18:29 +08:00
Daniel Liu
3a320d2c6f accounts/abi/bind, cmd/abigen: implement alias for abigen (#20244) 2025-01-24 16:18:29 +08:00
Daniel Liu
32615fda97 accounts/abi: add internalType information and fix issues (#20179)
* accounts/abi: fix various issues

The fixed issues include:

(1) If there is no return in a call function, unpack should
return nil error

(2) For some functions which have struct array as parameter,
it will also be detected and generate the struct definition

(3) For event, if it has non-indexed parameter, the parameter
name will also be assigned if empty. Also the internal struct
will be detected and generate struct defition if not exist.

(4) Fix annotation generation in event function

* accounts/abi: add new abi field internalType

* accounts: address comments and add tests

* accounts/abi: replace strings.ReplaceAll with strings.Replace
2025-01-24 16:18:29 +08:00
Daniel Liu
e90df44b43 accounts: replace passPHRASE with passWORD in any user interactions (#19932) 2025-01-24 16:18:29 +08:00
Daniel Liu
6a7b539c0e accounts, internal/ethapi: use common Accounts method (#18428)
* accounts/mananger, internal/ethapi/api: Add new function AllAccounts on account manager to remove the duplication code on getting all wallets accounts

* Rename to Accounts

* Rename to AllAccounts
2025-01-24 16:18:29 +08:00
Daniel Liu
5009a3df04 accounts/abi: fix incorrect signature (#19881)
The abi package already supports function overload by adding a suffix to the overloaded function name, but it uses the function name with suffix to calculate signature(both for the event and method).

This PR fixes it by adding a new field named RawName, which can be used to calcuate all signatures but use Name to distinguish different overloaded function.
2025-01-24 16:18:29 +08:00
Daniel Liu
9340a81ce1 accounts/abi/bind: support closing a simulated backend (#19902) 2025-01-24 16:18:29 +08:00
Daniel Liu
6d17a42edb all: replace t.Log(); t.FailNow() with t.Fatal() (#19849) 2025-01-24 16:18:29 +08:00
Daniel Liu
f571689bab signer/core: fix reference issue in key derivation (#19827)
* signer/core: fix reference issue in key derivation

* Review feedback
2025-01-24 16:18:29 +08:00
Daniel Liu
587f6b3438 accounts/abi/bind: fix typo in comments (#19791) 2025-01-24 16:18:29 +08:00
Daniel Liu
0050f84142 accounts/abi: enable struct golang binding generation (#18491)
* accounts/abi, cmd/abigen: support tuple

accounts/abi/bind, cmd/abigen: add objc back

accounts/abi/bind: use byte[24] as function indicator

accounts/abi/bind: resolve struct slice or array

accounts/abi/bind: remove sort logic

accounts: fix issues in abi

* accounts/abi: address comment
2025-01-24 16:18:29 +08:00
Daniel Liu
71e4c0609a accounts/abi: Fix method overwritten by same name methods (#17099)
* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: Fix method overwritten by same name methods.

* accounts/abi: avoid possible name conflict

Co-authored-by: Guillaume Ballet <gballet@gmail.com>
2025-01-24 16:18:29 +08:00
Daniel Liu
f542e463d3 accounts: implement simple checkpoint syncing (#19543) 2025-01-24 16:18:29 +08:00
Daniel Liu
894bed5b7e accounts/abi: adding the method EventById and its test (#19359) 2025-01-24 16:18:29 +08:00
Daniel Liu
07ebb5ef12 accounts/keystore: fix #19707, avoid keyword as variable name (#19731) 2025-01-24 16:18:29 +08:00
Daniel Liu
6aeab6a207 accounts/abi/bind: rename NewKeystoreTransactor (#19703)
renamed NewKeyStoreFromTransactor to NewKeystoreTransactor
fixed godoc
2025-01-24 16:18:29 +08:00
Daniel Liu
313018496f accounts: added transactorFromKeyStore (#19685) 2025-01-24 16:18:29 +08:00
Daniel Liu
e6df5f8798 account/usbwallet: abort usb enumeration after failures (#19671) 2025-01-24 16:18:29 +08:00
Daniel Liu
2e21b96101 accounts/usbwallet: add webusb trezor support (#19588) 2025-01-24 16:18:29 +08:00
Daniel Liu
100ea1c8e0 accounts/scwallet: add a switch to specify path to sc daemon (#19439) 2025-01-24 16:18:29 +08:00
Daniel Liu
fb35c54280 accounts/scwallet: change sc url scheme to keycard (#19632) 2025-01-24 16:18:29 +08:00
Daniel Liu
f80a00b6fa accounts/scwallet: display PUK retry count, validate PIN/PUK length (#19524) 2025-01-24 16:18:29 +08:00
Daniel Liu
00fbe17f2e accounts/keystore: enable fallback for darwin,!cgo (#19614)
Without this, accounts/keystore fails to build for Darwin with
CGO_ENABLED=0.
2025-01-24 16:18:29 +08:00
Daniel Liu
b2a9e1cb67 accounts/usbwallet: enable the Nano X and upcoming Ledger IDs (#19623) 2025-01-24 16:18:29 +08:00
Daniel Liu
7c8707f03e accounts, p2p: make CGO_ENABLED=0 build again (#19593) 2025-01-24 16:18:29 +08:00
Daniel Liu
316d2f8052 accounts/abi: fix TestUnpackMethodIntoMap (#19484) 2025-01-24 16:18:29 +08:00
Daniel Liu
b75f946081 accounts: better support for EIP-191 intended validator (#19523) 2025-01-24 16:18:29 +08:00
Daniel Liu
44d58cb8dc accounts/abi: fix documentation (#19568) 2025-01-24 16:18:29 +08:00
Daniel Liu
b5ace99624 accounts/usbwallet: fix a comment typo in trezor driver (#19535) 2025-01-24 16:18:29 +08:00
Daniel Liu
fa35614784 accounts, cmd: add note about backing up the keystore (#19432) 2025-01-24 16:18:29 +08:00
Daniel Liu
44b6b14685 accounts/scwallet: fix card pairing instruction message (#19436) 2025-01-24 16:18:29 +08:00
Daniel Liu
194a77505f accounts: switch Ledger derivation path to canonical one (#19438) 2025-01-24 16:18:29 +08:00
Daniel Liu
508ae8f155 accounts/scwallet: Update README for v2.2.1 support (#19425)
Update the app download link to the latest version, as requested in #19418
2025-01-24 16:18:29 +08:00
Daniel Liu
2999bea17f accounts: smartcard wallet without the dependency on libpcsclite (#19273) 2025-01-24 16:18:29 +08:00
Daniel Liu
1f9778bb9f accounts: disable unlock account on open HTTP (#17037) 2025-01-24 16:18:29 +08:00
Daniel Liu
769a34bfb7 accounts/abi: generic unpacking of event logs into map[string]interface{} (#18440)
Add methods that allow for the unpacking of event logs into maps (allows for agnostic unpacking of logs)
2025-01-24 16:18:29 +08:00
Daniel Liu
36577396ec accounts/abi: add the original name as json-structtag for tuples (#19340) 2025-01-24 16:18:29 +08:00