Modified Ethereum Methods

These standard Ethereum JSON-RPC methods have modified behavior in the Nullmask proxy.

eth_chainId

Returns the virtual chain ID, not the underlying network's chain ID.

→ { "method": "eth_chainId" }
← { "result": "0xaa5f" }   // 43615 = Ethereum Mainnet virtual chain

eth_sendTransaction

Intercepts outgoing transactions and shields them.

Standard behavior: Forward to blockchain node.

Nullmask behavior:

  1. Parse the transaction to detect if it's EIP-1559 with value > 0 or a Uniswap swap

  2. If shieldable:

    • Generate a ZK proof

    • Submit via the relayer

    • Return the transaction nullifier as the "hash"

  3. If not shieldable: store locally and return keccak256 hash

eth_sendRawTransaction

Same as eth_sendTransaction but accepts a signed raw transaction (hex-encoded). The proxy:

  1. Parses the raw transaction

  2. Recovers the sender address from the signature

  3. Applies the same shielding logic

eth_getBalance

Returns the shielded balance, not the on-chain balance.

  • Requires access token with permission for the requested address

  • Returns 0x0 if no access token or no permission

eth_getTransactionCount

Returns the count of spent notes as a proxy for the transaction nonce.

  • Required for wallet nonce management on the virtual network

  • Returns 0x0 if no access

eth_call

Intercepts ERC-20 balanceOf(address) calls to return shielded token balances.

  • Selector 0x70a08231 (balanceOf) → returns shielded balance

  • All other selectors (decimals, symbol, name, etc.) → forwarded to blockchain

eth_estimateGas

Returns gas estimates for shielded operations.

  1. Check if recipient has a registered receiving key

  2. If registered → return shielded transfer gas estimate

  3. If not registered → return shielded withdrawal gas estimate

Estimates are pre-computed per action type, not simulated.

eth_getTransactionByHash

Looks up transactions in the local transaction store, not the blockchain.

  • Accepts either a standard transaction hash or a transaction nullifier

  • Reconstructs a transaction object with on-chain receipt data

  • Returns null if not found

eth_getTransactionReceipt

Returns receipts for local transactions, combining local store data with on-chain receipt data.

  • Maps receipt status: 'success'0x1, 'reverted'0x0

  • Falls back to stored gas/gasPrice if receipt not yet available

eth_syncing

Reports Nullmask-specific sync status.

  • Queries sync status of both the notes scanner and key registry service

  • Returns false if both are synced to the latest block

  • Reports the lowest currentBlock between the two services

eth_getLogs

Always returns an empty array []. Log queries are blocked for privacy.

Last updated