Precompile Reference
Every method on Rome's Solana-interop precompiles — address, Solidity signature, selector, and whether it reads, invokes, or stages a CPI.
The selectors Rome's on-chain program dispatches, by precompile. Selector = keccak256(signature)[:4]; every row below is verified against that. The Solidity interfaces live in rome-solidity/contracts/interface.sol.
Read the Dispatch column before anything else. It says what a method does to Solana state:
Invoke / Composed
One or more CPIs, signed as the caller's external-authority PDA where seeds apply. On the legacy track they run immediately; on the cached track they are staged and committed at the end of the transaction.
Yes
Legacy: no. Cached: yes
EthCall
Pure computation or a read of Rome's own state
No
Yes
CrossStateEthCall
A read of another Solana account's bytes, pre-loaded by emulation. No CPI, no side effects.
No
Yes
Precompiled
Deterministic cryptography (the Ethereum-standard precompiles)
No
Yes
A contract uses one track: either the legacy precompiles (0xff…07, 0xff…08, 0xff…09, 0x42…16) or the cached ones (0xff…04, 0xff…05, 0xff…06, 0xff…0b). Mixing mutating calls from both in one transaction is refused at runtime. Reads stay allowed, with one exception: once a cached-track invoke has fired, legacy-track reads are refused for the rest of the transaction. See Integrate a Solana program.
Who pays. The Solana fee payer fronts every lamport a legacy-track CPI spends (rent, transfers, swap_gas_to_lamports); the program measures the payer's balance around each CPI and bills the net spend to the user as gas at the gas price, refunding lamports a CPI returns.
Who signs. A contract that calls a precompile acts as itself: the signer is the contract's external-authority PDA (["EXTERNAL_AUTHORITY", contract]). A user's own PDA signs only on a transaction the user sends directly to the precompile address. Under DELEGATECALL / CALLCODE, mutating selectors are refused except create_ata*, create_pda*, swap_gas_to_lamports, init_spl_mint and create_and_init_mint on HelperProgram, create_ata* on ASplCached, and invoke / invoke_signed on CpiProgram. They are exempt because their target is bound to the caller or funded by the operator, not because they sign nothing: create_and_init_mint still signs with the outer caller's PDA to pay the mint's rent and may only create a mint whose authorities are that PDA, and invoke / invoke_signed refuse the bare authority (DelegatecallOwnerAuthority) and namespace salted PDAs by the running contract's address.
Every method is non-payable (msg.value > 0 reverts with TransferProhibited) except withdrawal(bytes32). Methods marked single-state only are refused on op-geth-stack chains. A CPI may not name the Solana fee payer (except inside a plain System transfer instruction) or the Rome program, and may not call the Rome program.
SystemCached (0xff00000000000000000000000000000000000004)
PDA creation + system-program ops (allocate, assign, lamport transfer), staged into overlay. Cached counterpart to legacy System @ 0xff..07's mutating selectors (legacy System retains the pure read selectors).
create_pda()
0xe0402a8d
Invoke
Create caller's external_auth PDA, rent-exempt, zero-data
create_pda(uint64)
0x4ceab657
Invoke
Same, with funder-specified lamports above rent
create_pda(uint64,bytes32)
0x48e2bb86
Invoke
Salt-derived PDA with lamports
create_pda(bytes32,uint64,bytes32)
0xcc258bbf
Invoke
Owner-specified, size-N, salt-derived
allocate(uint64,bytes32)
0x93225c9f
Invoke
Allocate N bytes on a salt-derived PDA
assign(bytes32,bytes32)
0x8ac00bdc
Invoke
Assign a salt-derived PDA to a new owner
transfer(address,uint64)
0x5d359fbd
Invoke
Lamport transfer to EVM-addr-derived PDA
transfer(bytes32,uint64)
0xfd54d1ea
Invoke
Lamport transfer to raw Solana pubkey
transfer(bytes32,uint64,bytes32)
0x875abfc0
Invoke
Lamport transfer to raw pubkey, salt-derived source
SplCached (0xff00000000000000000000000000000000000005)
SPL Token / Token-2022 transfers + ATA init + cross-state account reads, staged into overlay.
transfer(address,uint256)
0xa9059cbb
Invoke
Caller-as-owner SPL transfer to EVM-addr-derived PDA's ATA, current rollup mint
transfer(bytes32,uint256)
0x6a467394
Invoke
Same, recipient given as raw Solana pubkey
transfer(address,uint256,bytes32)
0x57cfeeee
Invoke
Explicit-mint variant, EVM-addr destination
transfer(bytes32,uint256,bytes32)
0x7db527f9
Invoke
Explicit-mint variant, raw-pubkey destination
transferFrom(address,address,uint256,bytes32)
0x401e3367
Invoke
Delegate-source variant — authority = external_auth(caller), accepted as ATA owner OR sufficient-amount delegate. Used by SPL_ERC20_cached.transferFrom and router-driven flows
approve(address,uint256,bytes32)
0x8180f2fc
Invoke
EVM-spender approve — owner = external_auth(caller), delegate = external_auth(spender_addr). Used by SPL_ERC20_cached.approve
mint(address,uint256,bytes32)
0x1e458bee
Invoke
Caller-PDA signs as mint authority. SPL runtime enforces caller-PDA == on-chain mint authority. Used by SPL_ERC20_cached.mint_to and inbound bridge settle
init(bytes32,bytes32,bytes32)
0x0b0ad508
Invoke
InitializeAccount3 ix (ata, mint, owner)
account(address)
0x73b9aa91
CrossStateEthCall
Read SPL account state for EVM-addr's PDA-derived ATA (current rollup mint)
account(bytes32)
0x882358ae
CrossStateEthCall
Read SPL account state for a raw ATA pubkey
account(address,bytes32)
0xf9827227
CrossStateEthCall
Same as account(address) with an explicit mint.
mint_info(bytes32)
0xe24bf5d4
CrossStateEthCall
Mint facts, overlay-aware: token program, decimals, armed hook program (0 when absent or inert), current-epoch fee bps, and an extension-presence bitmap. Same selector as HelperProgram.mint_info — one capability, two dispatch homes, because a cached-track contract cannot use the legacy read once a cached invoke has fired.
ASplCached (0xff00000000000000000000000000000000000006)
Associated Token Account creation, idempotent.
create_ata()
0xb6d336ed
Invoke
Idempotent ATA-create for caller-PDA × current rollup mint
create_ata(bytes32)
0x81972e35
Invoke
Idempotent ATA-create for caller-PDA × explicit mint
create_ata(address)
0x5a7c3259
Invoke
Idempotent ATA-create for EVM-addr-derived PDA × current mint
create_ata(address,bytes32)
0x3de2251a
Invoke
Idempotent ATA-create for EVM-addr × explicit mint
WithdrawCached (0xff0000000000000000000000000000000000000b)
Gas-token withdrawal legs (native gas → SPL wrapper, native gas → SOL, native gas → caller PDA), staged. Cached counterpart to legacy Withdraw @ 0x42..16.
withdrawal(bytes32) payable
0x4d8b0ea4
Composed
Burn msg.value Rome gas, transfer to Solana system-account recipient
withdraw_to_pda(uint256)
0x7f3124a0
Composed
Burn wei, deposit lamports to caller's EXTERNAL_AUTHORITY PDA. Single-state only.
withdraw_to_ata(uint256)
0x8059abc0
Composed
Burn wei, deposit SPL wrapper to caller's PDA-owned ATA. Single-state only. Wrap leg of the gas-wrapper bridge.
deposit(uint256)
0xb6b55f25
Composed
Inverse of withdrawal — SPL transfer from caller's PDA-owned ATA to chain's sol_wallet ATA on Solana side; mint wei native gas to caller on EVM side. Pure mint (no offsetting debit against Withdraw::ADDRESS — the chain's SPL wallet is the economic backing, not the precompile address). Single-state only. Unwrap leg of the gas-wrapper bridge. Matches HelperProgram.deposit_from_ata semantics.
System (0xff00000000000000000000000000000000000007)
PDA derivation + base58 conversion + identity-style utilities. Pure-read precompile — every method is EthCall (no Solana side effects).
find_program_address(bytes32,(bytes)[])
0x27e3edda
EthCall
Solana find_program_address via syscall — returns (pda, bump)
create_program_address(bytes32,(bytes)[],uint8)
0xb99f29e1
EthCall
Constant-time PDA derivation with a known bump
rome_evm_program_id()
0xb76fd45b
EthCall
Returns this Rome EVM program's Solana program ID
program_id()
0x77764881
EthCall
Returns Rome's System Program ID (this precompile's identity)
mint_id()
0xe132a122
EthCall
Returns the chain's gas-token SPL mint pubkey (OwnerInfo.chain_mint_id)
operator()
0x570ca735
EthCall
Returns the Solana signer of the outer Rome tx
bytes32_to_base58(bytes32)
0xfa2b1a5f
EthCall
Pubkey-bytes → base58 string
base58_to_bytes32(bytes)
0x5df01b72
EthCall
base58 string → pubkey-bytes
CpiProgram (0xff00000000000000000000000000000000000008)
Dual-purpose precompile. Of the 7 selectors below, 2 perform real Solana CPI (invoke, invoke_signed — dispatch as Invoke) and 5 are pure cross-state reads (account_info, account_data_at, account_u64_at, account_lamports, pdas_batch_derive — dispatch as CrossStateEthCall, no syscall, no found_cpi flag set). The historical phrase "CPI shortcut selectors" referred to the read selectors as CU-saving replacements for earlier CPI-based reads — they themselves are not CPIs. See the disambiguation table at the top of this section for the full behavioral matrix.
invoke(bytes32,(bytes32,bool,bool)[],bytes)
0x7480cb86
Invoke
CPI signed as EXTERNAL_AUTHORITY(caller) when that account is listed as a signer (refused under DELEGATECALL); no salted sub-PDAs. Caller passes target program + account metas + ix data
invoke_signed(bytes32,(bytes32,bool,bool)[],bytes,bytes32[])
0xb94f3733
Invoke
CPI signed as EXTERNAL_AUTHORITY(caller) on a direct CALL; salts append per-PDA seed. Under DELEGATECALL the bare caller authority is refused and salted seeds carry the running contract's address — see the derivation note below
account_info(bytes32)
0xc13465d9
CrossStateEthCall
Read a Solana account's full state (lamports/owner/flags/data)
account_data_at(bytes32,uint16,uint16)
0x593762e8
CrossStateEthCall
Read a slice of any Solana account's data buffer
account_u64_at(bytes32,uint16)
0xb317d4c1
CrossStateEthCall
Typed u64 LE read at a known offset — saves ABI roundtrip
account_lamports(bytes32)
0xde79ed54
CrossStateEthCall
Lamports-only probe — skips data fetch
pdas_batch_derive(bytes[][],bytes32)
0x944336f8
CrossStateEthCall
N independent PDAs against one program in one dispatch
HelperProgram (0xff00000000000000000000000000000000000009)
Rome user-facing helpers for ATA/PDA creation, SPL transfers/approve/mint signed by the caller's EXTERNAL_AUTHORITY PDA, gas↔lamports conversion, ATA-deposit, and SPL_ERC20-facing reads (user_balance / allowance_of). Every method is not_payable; mutation routes through Invoke (single CPI) except deposit_from_ata (Composed, single-state only), the three read-only pda/ata queries (EthCall), and the two cross-state SPL_ERC20 reads (CrossStateEthCall — one Solana account fetch).
create_ata(address)
0x5a7c3259
Invoke
Create ATA for the EVM user under the chain's gas mint
create_ata(address,bytes32)
0x3de2251a
Invoke
Create ATA for the EVM user under an arbitrary mint
create_ata_for_key(bytes32,bytes32)
0xd258a69d
Invoke
Idempotent ATA-create for an arbitrary raw Solana pubkey as owner (not derived via external_auth). Operator pays rent. Used by SPL_ERC20.bridgeOutToSolana / ensureRecipientAta / create_token_account raw-pubkey-recipient flows
create_pda(address)
0xff3556ca
Invoke
Create the user's EXTERNAL_AUTHORITY PDA (rent-exempt)
create_pda(address,uint64)
0x58e88298
Invoke
Same, but funded with lamports over rent floor
swap_gas_to_lamports(uint64)
0x6e3f24e0
Invoke
Credit the caller's PDA with n lamports from the transaction's Solana fee payer; the caller pays for them in Rome gas (the payer's lamport spend inside any legacy CPI is added to the transaction fee)
transfer_lamports(address,uint64)
0x5fe71665
Invoke
Move lamports from caller's PDA to another EVM user's PDA
transfer_spl(address,uint64)
0xb12be5ba
Invoke
Send chain-gas SPL from caller PDA's ATA to dest user's ATA
transfer_spl(bytes32,uint64)
0xba3a5eac
Invoke
Send chain-gas SPL from caller PDA's ATA to an explicit ATA
transfer_spl(address,uint64,bytes32)
0x53b505e0
Invoke
Send arbitrary-mint SPL from caller PDA's ATA to dest user's ATA
transfer_spl(bytes32,uint64,bytes32)
0xb6977879
Invoke
Send arbitrary-mint SPL from caller PDA's ATA to explicit ATA
transfer_spl(bytes32,bytes32,uint64,bytes32)
0x766b362a
Invoke
Delegate variant — caller supplies src_ata (must be PDA-owned OR PDA must be the delegate with sufficient delegated_amount)
transfer_spl(address,address,uint64,bytes32)
0xe479df56
Invoke
Addr-keyed delegate variant — derives both ATAs from EVM addresses internally. Signs as external_auth(caller); SPL Token accepts PDA as owner OR delegate. Used by SPL_ERC20.transferFrom
transfer_spl_to_signer(uint64,bytes32)
0x46efa679
Invoke
Solana-native exit leg. Sends amount of mint from caller PDA's ATA to the outer Solana signer's ATA for that mint (the user's own wallet only on the wallet-signed Solana lane; from MetaMask or through the relay, the signer is Rome's proxy payer; no EVM-address conversion). No approve needed — caller-PDA owns the source ATA. Pair it with ActivateAta (slot 18) for end-to-end Solana-key-only EVM use. It reaches the wallet on the current v1 lane and on the older legacy DoTxUnsigned (slot 17) lane, because the wallet signs the Solana transaction on both.
approve_spl(address,uint64,bytes32)
0xabf6f675
Invoke
Caller-PDA-as-owner sets delegate_pda(spender) on owner-ATA via SPL approve_checked. Used by SPL_ERC20.approve
approve_spl_raw_delegate(bytes32,bytes32,uint64,bytes32,uint8)
0x7881d453
Invoke
SPL approve_checked with caller-supplied raw-pubkey delegate (e.g. Wormhole authority_signer PDA, no EVM-address equivalent). Caller passes decimals to skip on-chain mint read (~30-50K CU saving). Hardcoded spl_program = SPL Token. Used by RomeBridgeWithdraw.approveBurnETH
mint_spl(address,uint64,bytes32)
0xd795522b
Invoke
Caller-PDA-as-mint-authority mints to dest user's ATA via SPL mint_to_checked. SPL runtime enforces authority match. Used by SPL_ERC20.mint_to
create_mint_account(bytes32)
0xe97d3291
Invoke
System CreateAccount allocating a salt-derived PDA (external_auth_with_salt(caller, salt)) of space=82 owned by SPL Token. Funder = caller's external_auth PDA. Two PDA signers. Used by ERC20SPLFactory.create_token_mint
init_spl_mint(bytes32,uint8,bytes32,bool,bytes32)
0x4f75e987
Invoke
SPL Token InitializeMint2 against pre-allocated mint. No PDA signer (mint_authority/freeze_authority stored as data, not runtime signers). Used by ERC20SPLFactory.init_token_mint
create_and_init_mint(uint8,bytes32,bool,bytes32,bytes32)
0x20972d0f
Composed
Combined: System CreateAccount + SPL InitializeMint2 in one dispatch. Saves 1 Rome DoTx envelope vs separate create_mint_account + init_spl_mint calls
deposit_from_ata(uint256)
0x4479b709
Composed
Pull SPL from caller's ATA into Rome native gas. Single-state only — rejected on op-geth chains
pda(address)
0x8854a299
EthCall
Derive the user's EXTERNAL_AUTHORITY PDA — read-only
pda_with_salt(address,bytes32)
0x5c6d04b3
EthCall
Salt-derived EXTERNAL_AUTHORITY PDA in a single dispatch. Collapses Solidity-side 2-call rome_evm_program_id() + find_program_address() composition. Used by RomeEVMAccount.pda_with_salt, RomeBridgeWithdraw.{burnUSDC,burnETH}
ata(address)
0x31db4f82
EthCall
Derive getATA(user_pda, chain_mint_id) — composes EXT_AUTH + ATA — read-only
ata(address,bytes32)
0xfeb1c647
EthCall
Same with an explicit mint — read-only
user_balance(address,bytes32)
0xdd0119c8
CrossStateEthCall
Read user-ATA amount (SPL TokenAccount offset 64). Returns 0 if ATA doesn't exist (fresh-chain probe). Collapses 3 v1 dispatches. Used by SPL_ERC20.balanceOf
mint_info(bytes32)
0xe24bf5d4
CrossStateEthCall
Mint facts for a legacy-track caller: token program, decimals, armed hook program (0 when absent or inert), current-epoch fee bps, extension-presence bitmap. Mirrored on SplCached at the same selector. feeBps is a predicate — it says a fee is armed, it is not an operand, since the real fee is capped by maximum_fee which this deliberately does not carry.
allowance_of(address,address,bytes32)
0xed72dbc8
CrossStateEthCall
Read owner-ATA delegated_amount with delegate-equality check — returns 0 unless on-chain delegate == external_auth(spender). ERC-20 semantic-correct (HARD REQ). Used by SPL_ERC20.allowance
Withdraw (0x4200000000000000000000000000000000000016)
Rome → Solana native gas withdrawal.
withdrawal(bytes32)
0x4d8b0ea4
Composed (payable)
Burn msg.value Rome gas; mint+transfer to a Solana system-account to. The only payable precompile method
withdraw_to_pda(uint256)
0x7f3124a0
Composed
Burn gas; deposit to caller's EXTERNAL_AUTHORITY PDA. Single-state only
withdraw_to_ata(uint256)
0x8059abc0
Composed
Burn gas; deposit to getATA(caller_pda, chain_mint_id). Single-state only
Last updated
Was this helpful?