accounts/abi— encode method calls, decode return values, and parse event logs.accounts/keystore— create, import, unlock, and sign with password-encrypted key files.
accounts/abi
The ABI type
Parsing an ABI
Encoding a method call
Pack prepends the 4-byte selector and ABI-encodes all arguments:
Decoding return values
Unpack returns []interface{}; UnpackIntoInterface maps values into a struct or slice:
Parsing event logs
Events are accessed throughabi.Events:
Indexed event parameters are packed into
log.Topics (32 bytes each), not into log.Data. Non-indexed parameters are ABI-encoded in log.Data.Looking up methods and events by selector
Decoding revert reasons
CallContract errors or receipt logs) and returns the human-readable reason string from a Solidity revert("...") or a panic code description.
