You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Type-safe contract bindings:** ERC-20 interactions use `abigen`-generated Go code, not manual ABI encoding.
156
167
168
+
**Dynamic ABI encoding:**`butler call` uses `abi.ParseSelector` + `abi.Arguments.Pack/Unpack` for runtime encoding without JSON ABI files. The `abi_helper.go` module is designed for reuse by future commands (validators, staking, logs).
169
+
157
170
**Config-driven extensibility:** Chains, tokens, and contacts are pure JSON. Both TUI and CLI dynamically use these at startup.
158
171
159
172
**Async blockchain calls:** RPC operations run as concurrent goroutines (CLI uses sync.WaitGroup, TUI uses Bubble Tea commands).
@@ -171,6 +184,7 @@ internal/
171
184
| Block by number | RPC ||
172
185
|**Tx history by address**|**Explorer API**| RPC cannot do this — no `eth_getTransactionsByAddress` exists |
abi_helper.go Dynamic ABI encoding/decoding (no abigen needed)
353
355
erc20.go ERC-20: balance, transfer, formatting
354
356
abi/erc20.json Standard ERC-20 ABI
355
357
contracts/erc20.go Auto-generated Go bindings (abigen)
@@ -380,6 +382,8 @@ internal/
380
382
381
383
**pow10 uses big.Int** — The original `int64`-based `pow10()` would silently overflow for tokens with >18 decimals. Fixed to use `big.Int.Exp()` which is safe for any decimal count.
382
384
385
+
**Dynamic ABI via `abi_helper.go`** — `butler call` uses `abi.ParseSelector` + `Arguments.Pack/Unpack` for runtime ABI encoding without JSON files. The same module will be reused by future commands (validators, staking, event logs). `ParseCallSignature` splits cast-style signatures via parenthesis depth counting because `abi.ParseSelector` rejects trailing characters.
0 commit comments