mirror of
https://github.com/logos-co/logos-verified-proxy-module.git
synced 2026-08-27 13:01:09 +00:00
Grows the typed surface from 8 methods to 60: all 30 eth_* the library dispatches, plus the 30 op_* mirrors. Everything was already reachable through rpc(); what was missing was discoverability — `lm methods`, the LIDL contract, and a caller's type checker. Generated, not hand-written. Each wrapper is three lines over the same shared path, so sixty-one of them by hand is sixty-one chances to transpose an argument; the table is extracted from the library's OWN dispatch table (the `case $name` in c_frontend.nim), including each parameter's real type — which is how ethGetBlockByNumber gets a bool, ethFeeHistory a uint64 and a list, and eth_call an object rather than everything being a string. They are still committed as literal text: the module's code generator parses verified_proxy_impl.h as TEXT to build the LIDL contract, so anything hidden behind a macro would simply not exist to it. `--check` proves the committed blocks still match, and fails on a one-character edit (verified). eth_syncing is deliberately excluded from the typed surface — the runtime issues it as its own keep-alive and a wrapper would invite callers to fight it. Still reachable through rpc(). CI is new for this repo, which had none: build on Linux and macOS, unit tests (the check derivation runs the suite as part of building it), and the codegen drift check. Named explicitly rather than via `nix flake check`, which would also evaluate the x86_64-windows pseudo-system. Verified live on sepolia through a real logoscore daemon: ethGasPrice, ethMaxPriorityFeePerGas, ethBlobBaseFee, ethGetBlockTransactionCountByNumber, ethGetUncleCountByBlockNumber and ethGetBlockByNumber all answer. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
380 lines
4.2 KiB
JSON
380 lines
4.2 KiB
JSON
[
|
|
{
|
|
"rpc": "eth_chainId",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "eth_blockNumber",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "eth_syncing",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "eth_getBalance",
|
|
"params": [
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getStorageAt",
|
|
"params": [
|
|
"str",
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getTransactionCount",
|
|
"params": [
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getCode",
|
|
"params": [
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getBlockByHash",
|
|
"params": [
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getBlockByNumber",
|
|
"params": [
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getUncleCountByBlockNumber",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getUncleCountByBlockHash",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getBlockTransactionCountByNumber",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getBlockTransactionCountByHash",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getTransactionByBlockNumberAndIndex",
|
|
"params": [
|
|
"str",
|
|
"u64"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getTransactionByBlockHashAndIndex",
|
|
"params": [
|
|
"str",
|
|
"u64"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_call",
|
|
"params": [
|
|
"json",
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_createAccessList",
|
|
"params": [
|
|
"json",
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_estimateGas",
|
|
"params": [
|
|
"json",
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getTransactionByHash",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getBlockReceipts",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getTransactionReceipt",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getLogs",
|
|
"params": [
|
|
"json"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_newFilter",
|
|
"params": [
|
|
"json"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_uninstallFilter",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getFilterLogs",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_getFilterChanges",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_blobBaseFee",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "eth_gasPrice",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "eth_maxPriorityFeePerGas",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "eth_feeHistory",
|
|
"params": [
|
|
"u64",
|
|
"str",
|
|
"json"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "eth_sendRawTransaction",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_chainId",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "op_blockNumber",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "op_getBalance",
|
|
"params": [
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getStorageAt",
|
|
"params": [
|
|
"str",
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getTransactionCount",
|
|
"params": [
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getCode",
|
|
"params": [
|
|
"str",
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getBlockByHash",
|
|
"params": [
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getBlockByNumber",
|
|
"params": [
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getUncleCountByBlockNumber",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getUncleCountByBlockHash",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getBlockTransactionCountByNumber",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getBlockTransactionCountByHash",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getTransactionByBlockNumberAndIndex",
|
|
"params": [
|
|
"str",
|
|
"u64"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getTransactionByBlockHashAndIndex",
|
|
"params": [
|
|
"str",
|
|
"u64"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_call",
|
|
"params": [
|
|
"json",
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_createAccessList",
|
|
"params": [
|
|
"json",
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_estimateGas",
|
|
"params": [
|
|
"json",
|
|
"str",
|
|
"bool"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getTransactionByHash",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getBlockReceipts",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getTransactionReceipt",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getLogs",
|
|
"params": [
|
|
"json"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_newFilter",
|
|
"params": [
|
|
"json"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_uninstallFilter",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getFilterLogs",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_getFilterChanges",
|
|
"params": [
|
|
"str"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_blobBaseFee",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "op_gasPrice",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "op_maxPriorityFeePerGas",
|
|
"params": []
|
|
},
|
|
{
|
|
"rpc": "op_feeHistory",
|
|
"params": [
|
|
"u64",
|
|
"str",
|
|
"json"
|
|
]
|
|
},
|
|
{
|
|
"rpc": "op_sendRawTransaction",
|
|
"params": [
|
|
"str"
|
|
]
|
|
}
|
|
] |