Skip to main content
Version: 2.3.0

overlay namespace

overlay_callConstructor​

Re-runs the transaction that deployed the contract at address with code as its creation code and returns the runtime code that the constructor gives. Pass the result as a code state override to overlay_getLogs or eth_call. Needs the state of the parent of the creation block and of the blocks after it. If a contract deployed it, the code runs as a call from that contract on the state before the deploying transaction: ORIGIN is that contract, state that the deploying transaction writes before the deployment (for example, constructor parameters that a factory keeps in its storage) is not there, and the transactions before it in the block also see the code at address and, for a constructor that gets ETH, the value added to the balance of that contract. An address whose code was removed and deployed again can give an earlier deployment.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "overlay_callConstructor",
"params": [address, code]
}'

overlay_getLogs​

Re-executes the blocks in the filter range with the state overrides applied to the state before each block and returns the logs that match the filter, as eth_getLogs does. A block hash can select a block that is not canonical only when the range is that one block. Needs the state of each block in the range.

curl localhost:8545 \
-X POST \
-H "Content-Type: application/json" \
--data '{
"jsonrpc": "2.0",
"id": 0,
"method": "overlay_getLogs",
"params": [filter, stateOverride]
}'