go-ethereum/accounts/abi/bind
Daniel Liu 56f9c17817 accounts/abi: Prevent recalculation of internal fields (#20895)
* accounts/abi: prevent recalculation of ID, Sig and String

* accounts/abi: fixed unpacking of no values

* accounts/abi: multiple fixes to arguments

* accounts/abi: refactored methodName and eventName

This commit moves the complicated logic of how we assign method names
and event names if they already exist into their own functions for
better readability.

* accounts/abi: prevent recalculation of internal

In this commit, I changed the way we calculate the string
representations, sig representations and the id's of methods. Before
that these fields would be recalculated everytime someone called .Sig()
.String() or .ID() on a method or an event.

Additionally this commit fixes issue #20856 as we assign names to inputs
with no name (input with name "" becomes "arg0")

* accounts/abi: added unnamed event params test

* accounts/abi: fixed rebasing errors in method sig

* accounts/abi: fixed rebasing errors in method sig

* accounts/abi: addressed comments

* accounts/abi: added FunctionType enumeration

* accounts/abi/bind: added test for unnamed arguments

* accounts/abi: improved readability in NewMethod, nitpicks

* accounts/abi: method/eventName -> overloadedMethodName
2025-01-24 16:18:29 +08:00
..
backends accounts/abi/bind/backends: add support for historical state (#20644) 2025-01-24 16:18:29 +08:00
auth.go accounts/abi/bind: fix typo in comments (#19791) 2025-01-24 16:18:29 +08:00
backend.go accounts/abi/bind: fix bounded contracts and sim backend for 1559 (#23038) 2024-11-01 11:36:52 +08:00
base.go accounts/abi: Prevent recalculation of internal fields (#20895) 2025-01-24 16:18:29 +08:00
base_test.go accounts/abi: Fix method overwritten by same name methods (#17099) 2025-01-24 16:18:29 +08:00
bind.go accounts/abi: Prevent recalculation of internal fields (#20895) 2025-01-24 16:18:29 +08:00
bind_test.go accounts/abi: Prevent recalculation of internal fields (#20895) 2025-01-24 16:18:29 +08:00
template.go accounts/abi: implement new fallback functions (#20764) 2025-01-24 16:18:29 +08:00
topics.go accounts/abi/bind: fixed erroneous filtering of negative ints (#20865) 2025-01-24 16:18:29 +08:00
topics_test.go accounts/abi/bind: fixed erroneous filtering of negative ints (#20865) 2025-01-24 16:18:29 +08:00
util.go all: use errrors.New instead of empty fmt.Errorf 2024-06-14 19:19:21 +08:00
util_test.go accounts/abi/bind: support closing a simulated backend (#19902) 2025-01-24 16:18:29 +08:00