Impersonation
RPC methods for sending transactions from any address without holding its private key.
When an address is on the impersonation allowlist, the Stagenet accepts eth_sendTransaction requests where the from field matches that address — no signature required. The Stagenet’s EVM sees the impersonated address as msg.sender.
Impersonation only works through eth_sendTransaction.
Locally-signed transactions sent via eth_sendRawTransaction already have a fixed sender baked into the signature, so impersonation does not apply.
Use a JSON-RPC signer instead — see SDK: Impersonation for ethers and viem examples.
dev_impersonateAccount
Adds an address to the impersonation allowlist.
| Parameter | Type | Description |
|---|---|---|
address | string | A 0x-prefixed Ethereum address |
Returns true on success.
Example:
curl -X POST <YOUR_STAGENET_RPC_URL> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "dev_impersonateAccount",
"params": ["0x28C6c06298d514Db089934071355E5743bf21d60"]
}'Send a transaction from the impersonated address with a standard eth_sendTransaction:
curl -X POST <YOUR_STAGENET_RPC_URL> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "eth_sendTransaction",
"params": [
{
"from": "0x28C6c06298d514Db089934071355E5743bf21d60",
"to": "0x1111111111111111111111111111111111111111",
"value": "0xde0b6b3a7640000"
}
]
}'dev_stopImpersonatingAccount
Removes an address from the impersonation allowlist. After this, unsigned transactions from that address are rejected unless it is impersonated again.
| Parameter | Type | Description |
|---|---|---|
address | string | A 0x-prefixed Ethereum address |
Returns true on success.
dev_getImpersonatedAccounts
Lists every address currently on the impersonation allowlist. Addresses are returned lowercased.
Takes no parameters. Returns string[].
Example:
curl -X POST <YOUR_STAGENET_RPC_URL> \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "dev_getImpersonatedAccounts",
"params": []
}'