mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-24 07:34:31 +00:00
## 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. |
||
|---|---|---|
| .. | ||
| bind | ||
| abi.go | ||
| abi.libevm.go | ||
| abi.libevm_test.go | ||
| abi_test.go | ||
| abifuzzer_test.go | ||
| argument.go | ||
| doc.go | ||
| error.go | ||
| error_handling.go | ||
| event.go | ||
| event_test.go | ||
| method.go | ||
| method_test.go | ||
| pack.go | ||
| pack_test.go | ||
| packing_test.go | ||
| reflect.go | ||
| reflect_test.go | ||
| selector_parser.go | ||
| selector_parser_test.go | ||
| topics.go | ||
| topics_test.go | ||
| type.go | ||
| type_test.go | ||
| unpack.go | ||
| unpack_test.go | ||
| utils.go | ||