go-ethereum/accounts
Arran Schlosberg 865e03ca6a
feat(abi): pack event and output + unpack input (#249)
## Why this should be merged

Allows ICM code to use the `abi` package from `libevm` instead of
`subnet-evm`, as part of a broader transition.

## How this works

Port and refactor of the following `abi.ABI` methods (with differences
described) from `subnet-evm`:

1. `PackEvent()` returns topics and packed data for events. Unlike
`subnet-evm`, the returned `[]common.Hash` topic slice MAY be nil
instead of the non-nil but empty equivalent. This is in keeping with the
upstream `abi.MakeTopics()`.
2. `PackOutput()` returns packed output for methods.
3. `UnpackInputIntoInterface()` unpacks method inputs or event arguments
into an arbitrary interface. Unlike the `subnet-evm` implementation, it
doesn't perform any checks on the length of the input buffer as these
are an Avalanche-specific feature that can be performed by the consumer.

## How this was tested

Unit tests from `subnet-evm`, refactored for clarity.
2025-12-15 15:46:36 +00:00
..
abi feat(abi): pack event and output + unpack input (#249) 2025-12-15 15:46:36 +00:00
external [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
keystore [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
scwallet [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
usbwallet [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
accounts.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
accounts_test.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
errors.go accounts: fix typo in comments (#24805) 2022-05-03 08:49:41 +02:00
hd.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
hd_test.go accounts: run tests in parallel (#28544) 2023-12-04 14:55:06 +01:00
manager.go [AUTO] rename Go module + update internal import paths 2024-10-17 01:49:47 +00:00
sort.go accounts, console: frendly card errors, support pin unblock 2019-04-08 13:19:37 +02:00
url.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
url_test.go accounts: run tests in parallel (#28544) 2023-12-04 14:55:06 +01:00