Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions contracts/examples/ed25519_example.sol

This file was deleted.

34 changes: 0 additions & 34 deletions contracts/interface.sol
Original file line number Diff line number Diff line change
Expand Up @@ -285,53 +285,19 @@ interface IHelperProgram {
function deposit_from_ata(uint256 wei_) external;
}

// IEd25519 — generic ed25519 signature verification primitive at `0xff..0a`.
// Confirms the Solana runtime cryptographically verified a signature in the
// current transaction against `allowed_signers` and `expected_message`.
// Pure-read CrossStateEthCall; single-state Rome chains only.
//
// Spec: rome-specs/main/active/technical/2026-05-19-rome-ed25519-precompile.md
// Source of truth: rome-evm-private/program/src/non_evm/ed25519.rs +
// rome-evm-private/program/src/non_evm/ed25519_ix.rs.
//
// Generic primitive — usable by any consumer that needs to confirm a Solana
// runtime Ed25519 signature verification. Examples: signed-payload bridges,
// signed-message oracle providers, capability tokens.
interface IEd25519 {
/// @param allowed_signers MUST be non-empty (max 16 — DoS guard).
/// @param expected_message MUST be non-empty. The byte sequence the caller
/// asserts was verified. Must byte-equal what the precompile
/// actually verified, or this function reverts.
/// @param ed25519_ix_idx Index of the Ed25519SigVerify ix in the current
/// Solana tx.
/// @param sig_idx Which signature within that ix to check (the ix
/// supports multi-sig batching).
/// @return verified_signer The pubkey from the precompile ix data that the
/// runtime confirmed signed `expected_message`. Guaranteed
/// member of `allowed_signers`.
function verify_from_allowlist(
bytes32[] calldata allowed_signers,
bytes calldata expected_message,
uint8 ed25519_ix_idx,
uint8 sig_idx
) external view returns (bytes32 verified_signer);
}

address constant system_cached_address = address(0xFf00000000000000000000000000000000000004);
address constant spl_cached_address = address(0xff00000000000000000000000000000000000005);
address constant associated_spl_cached_address = address(0xFF00000000000000000000000000000000000006);
address constant system_program_address = address(0xfF00000000000000000000000000000000000007);
address constant cpi_program_address = address(0xFF00000000000000000000000000000000000008);
address constant helper_program_address = address(0xff00000000000000000000000000000000000009);
address constant ed25519_program_address = address(0xfF0000000000000000000000000000000000000a);
address constant withdraw_cached_address = address(0xFF0000000000000000000000000000000000000B);
address constant withdraw_address = address(0x4200000000000000000000000000000000000016);

ISystemProgram constant SystemProgram = ISystemProgram(system_program_address);
ICrossProgramInvocation constant CpiProgram = ICrossProgramInvocation(cpi_program_address);
IWithdraw constant Withdraw = IWithdraw(withdraw_address);
IHelperProgram constant HelperProgram = IHelperProgram(helper_program_address);
IEd25519 constant Ed25519 = IEd25519(ed25519_program_address);
ISystemCached constant SystemCached = ISystemCached(system_cached_address);
ISplCached constant SplCached = ISplCached(spl_cached_address);
IAssociatedSplCached constant AssociatedSplCached = IAssociatedSplCached(associated_spl_cached_address);
Expand Down