Contract 7a625f14ca7e1e233544766cd307e2411fd75046dcb914eed1e9485710141477

← Back to Index 📥 Download WASM

Meta

rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.91.1

Instances

  • CACZ3GBAKUPIAFRILUFO27J5RUH5GJ2VSJ46LP6GJYSKGDRTQ5MS3HCH

Interface

Upgrade the contract WASM. Callable only by the executor.

fn upgrade(
    env: soroban_sdk::Env,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), ContractError>

Constructor. Stores the executor address (the Wormhole executor contract authorized for governance operations).

Optionally accepts an initial trusted signer and expiry. This avoids needing a governance VAA for the very first signer during deployment.

fn __constructor(
    env: soroban_sdk::Env,
    executor: soroban_sdk::Address,
    initial_signer: Option>,
    initial_signer_expires_at: Option,
) -> Result<(), ContractError>

Verify an LE-ECDSA signed Pyth Lazer update.

Parses the envelope, recovers the signer's public key, checks it against trusted signers, validates expiry, and returns the verified payload bytes.

Verification is stateless: it proves the payload was signed by a currently trusted signer, but does not prevent replay of an update or order updates by arrival. Callers must deduplicate updates and enforce freshness using the timestamp field of the verified payload (and, where relevant, the per-feed feed_update_timestamp) — never the envelope bytes, the signature, or a hash of either.

fn verify_update(
    env: soroban_sdk::Env,
    data: soroban_sdk::Bytes,
) -> Result

List every currently trusted signer as (pubkey, expires_at) pairs. Read-only; readable by anyone.

fn list_trusted_signers(
    env: soroban_sdk::Env,
) -> soroban_sdk::Vec<(soroban_sdk::BytesN<33>, u64)>

Add, update, or remove a trusted signer. Callable only by the executor. Setting expires_at to 0 removes the signer.

fn update_trusted_signer(
    env: soroban_sdk::Env,
    pubkey: soroban_sdk::BytesN<33>,
    expires_at: u64,
) -> Result<(), ContractError>

Imports

WebAssembly Text (WAT) ▶