Skip to content

Commit

Permalink
docs: document configuring wallet namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Oct 12, 2024
1 parent b0ec232 commit 86ebe08
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,28 @@ This will start an enclave named `op-devnet`. You can tear down the enclave with
Consult the [Kurtosis OP package](https://github.com/ethpandaops/optimism-package) repository for instructions on how to adjust the args file to spin up additional services, like a block exporer.

### Wallet extension

Odyssey has a custom `wallet_` namespace, that allows users to delegate their EOAs to a contract using EIP-7702, and perform transactions on those accounts, all funded by the sequencer.

To enable this namespace, set the environment variable `EXP1_SK` to a private key that will sign the transactions, and `EXP1_WHITELIST` to a comma-delimited list of checksummed addresses accounts are allowed to delegate to. The new RPC method, `wallet_sendTransaction`, will only sign transactions that either:

1. Delegate accounts to one of the whitelisted addresses using EIP-7702, or
1. Send transactions to an EIP-7702 EOA that is already delegated to a whitelisted address

The `wallet_sendTransaction` endpoint accepts the same fields as `eth_sendTransaction`, with these notable exceptions:

1. `nonce` must not be set, as this is managed by the node
1. `value` must be unset or 0
1. `from` must not be specified

The following fields are ignored, as they are overwritten internally:

1. `gasPrice` (and EIP-1559 gas related pricing fields)
1. `gasLimit`

To get the list of contracts that are whitelisted for `wallet_sendTransaction`, you can query `wallet_getCapabilities`.

### Security

See [SECURITY.md](SECURITY.md).
Expand Down

0 comments on commit 86ebe08

Please sign in to comment.