diff --git a/CLAUDE.md b/CLAUDE.md index 80547f5..8c75805 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co ## Overview -This repo contains essential programs for the **Logos Execution Zone (LEZ)** — a zkVM-based execution environment built on [RISC Zero](https://risczero.com/). Programs run inside the RISC Zero zkVM (`riscv32im-risc0-zkvm-elf` target) and interact with the LEZ runtime via the `nssa_core` library from `logos-execution-zone`. +This repo contains essential programs for the **Logos Execution Zone (LEZ)** — a zkVM-based execution environment built on [RISC Zero](https://risczero.com/). Programs run inside the RISC Zero zkVM (`riscv32im-risc0-zkvm-elf` target) and interact with the LEZ runtime via the `lee_core` library from `logos-execution-zone`. Five programs are implemented: - **token** — Fungible and non-fungible token program (create, mint, burn, transfer, print NFTs) @@ -81,7 +81,7 @@ Generated IDL files live in `artifacts/`. CI checks that every program under `*/ ## Deployment -`wallet` and `spel` are CLI tools that ship with the [SPEL](https://github.com/logos-co/spel.git) toolchain. `wallet` requires `NSSA_WALLET_HOME_DIR` to point to a directory containing the wallet config. +`wallet` and `spel` are CLI tools that ship with the [SPEL](https://github.com/logos-co/spel.git) toolchain. `wallet` requires `LEE_WALLET_HOME_DIR` to point to a directory containing the wallet config. **Note:** `spel` and `wallet` may use different versions of the wallet package. If `spel --idl ...` fails, ensure `seq_poll_timeout_millis` is set in the wallet config at `~/.nssa/wallet`. diff --git a/Cargo.toml b/Cargo.toml index 609783e..d8a0a77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,8 +34,8 @@ exclude = [ resolver = "2" [workspace.dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } -nssa = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["test-utils"], package = "lee" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } +lee = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["test-utils"] } token_core = { path = "programs/token/core" } token_program = { path = "programs/token" } amm_core = { path = "programs/amm/core" } diff --git a/README.md b/README.md index d71c6f5..8e6b664 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # lez-programs -Essential programs for the **Logos Execution Zone (LEZ)** — a zkVM-based execution environment built on [RISC Zero](https://risczero.com/). Programs run inside the RISC Zero zkVM (`riscv32im-risc0-zkvm-elf` target) and interact with the LEZ runtime via the `nssa_core` library. +Essential programs for the **Logos Execution Zone (LEZ)** — a zkVM-based execution environment built on [RISC Zero](https://risczero.com/). Programs run inside the RISC Zero zkVM (`riscv32im-risc0-zkvm-elf` target) and interact with the LEZ runtime via the `lee_core` library. ## Programs diff --git a/apps/amm/tests/custom-token.mjs b/apps/amm/tests/custom-token.mjs index 4521a4f..e115a64 100644 --- a/apps/amm/tests/custom-token.mjs +++ b/apps/amm/tests/custom-token.mjs @@ -80,7 +80,7 @@ async function saveShot(app, name) { function resolveTokenD() { const out = execFileSync("wallet", ["account", "id", "--account-id", "token-d-def"], { encoding: "utf8", - env: { ...process.env, LEE_WALLET_HOME_DIR: WALLET_HOME, NSSA_WALLET_HOME_DIR: WALLET_HOME }, + env: { ...process.env, LEE_WALLET_HOME_DIR: WALLET_HOME }, }); const id = (out.match(/[1-9A-HJ-NP-Za-km-z]{32,44}/) || [])[0]; if (!id) diff --git a/apps/amm/tests/testnet/setup-amm-testnet.sh b/apps/amm/tests/testnet/setup-amm-testnet.sh index fc1ae16..031e331 100755 --- a/apps/amm/tests/testnet/setup-amm-testnet.sh +++ b/apps/amm/tests/testnet/setup-amm-testnet.sh @@ -51,12 +51,10 @@ cd "$REPO_ROOT" # TEST WALLET — isolated + deterministic ############################################################################### -# Dedicated wallet home for tests. Kept out of git (see .gitignore). Exported -# under both env var names so whichever the installed `wallet`/`spel` expects is -# satisfied (the current wallet uses LEE_WALLET_HOME_DIR). +# Dedicated wallet home for tests. Kept out of git (see .gitignore). The v0.2.x +# wallet/spel read LEE_WALLET_HOME_DIR (the old NSSA_WALLET_HOME_DIR is unused). TEST_WALLET_HOME="${TEST_WALLET_HOME:-$SCRIPT_DIR/.wallet}" export LEE_WALLET_HOME_DIR="$TEST_WALLET_HOME" -export NSSA_WALLET_HOME_DIR="$TEST_WALLET_HOME" # The deterministic test seed. A wallet restored from this mnemonic yields the # same account ids every time, which is why they can be shared/pinned. diff --git a/apps/token/tests/run-basecamp-e2e.sh b/apps/token/tests/run-basecamp-e2e.sh index 8015d41..6c33f78 100755 --- a/apps/token/tests/run-basecamp-e2e.sh +++ b/apps/token/tests/run-basecamp-e2e.sh @@ -67,7 +67,6 @@ QT_FORCE_STDERR_LOGGING=1 \ QML_DISABLE_DISK_CACHE=1 \ QML_INSPECTOR_PORT="${inspector_port}" \ LEE_WALLET_HOME_DIR="${wallet_home}" \ -NSSA_WALLET_HOME_DIR="${wallet_home}" \ LD_LIBRARY_PATH="${bundle_root}/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" \ "${basecamp_bin}" --user-dir "${run_root}/user" -platform offscreen \ >"${run_root}/basecamp.log" 2>&1 & diff --git a/docs/token/README.md b/docs/token/README.md index ccb1d0c..2e8530a 100644 --- a/docs/token/README.md +++ b/docs/token/README.md @@ -49,8 +49,6 @@ below was exercised with the `spel` CLI **v0.5.0**; where v0.6.0 differs it is c ```bash export LEE_WALLET_HOME_DIR="$HOME/.lee/wallet" ``` - Older toolchain builds read `NSSA_WALLET_HOME_DIR` instead — set whichever yours expects, and - use the **same** one everywhere. - Wallet pointed at your sequencer: ```bash wallet config set sequencer_addr https://testnet.lez.logos.co/ diff --git a/modules/amm/ffi/Cargo.toml b/modules/amm/ffi/Cargo.toml index a0df2d1..fa06f9e 100644 --- a/modules/amm/ffi/Cargo.toml +++ b/modules/amm/ffi/Cargo.toml @@ -12,7 +12,7 @@ amm_core = { workspace = true } borsh = { workspace = true } clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } hex = "0.4" -nssa_core = { workspace = true } +lee_core = { workspace = true } risc0-binfmt = { version = "=3.0.4", default-features = false } risc0-zkvm = { workspace = true } serde = { workspace = true } diff --git a/modules/amm/ffi/src/account.rs b/modules/amm/ffi/src/account.rs index 2a8d020..7602e26 100644 --- a/modules/amm/ffi/src/account.rs +++ b/modules/amm/ffi/src/account.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, Data, Nonce}, program::ProgramId, }; diff --git a/modules/amm/ffi/src/api/config.rs b/modules/amm/ffi/src/api/config.rs index 926c342..fb264ac 100644 --- a/modules/amm/ffi/src/api/config.rs +++ b/modules/amm/ffi/src/api/config.rs @@ -1,5 +1,5 @@ use amm_core::{compute_config_pda, AmmConfig}; -use nssa_core::{account::Account, program::ProgramId}; +use lee_core::{account::Account, program::ProgramId}; use serde_json::{json, Value}; use super::{ConfigAccountRequest, ConfigIdRequest}; diff --git a/modules/amm/ffi/src/api/context.rs b/modules/amm/ffi/src/api/context.rs index 514d609..e34324b 100644 --- a/modules/amm/ffi/src/api/context.rs +++ b/modules/amm/ffi/src/api/context.rs @@ -1,6 +1,6 @@ use std::collections::BTreeSet; -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; use serde_json::{json, Value}; use token_core::TokenDefinition; diff --git a/modules/amm/ffi/src/api/holding.rs b/modules/amm/ffi/src/api/holding.rs index 7f73b97..1fbe151 100644 --- a/modules/amm/ffi/src/api/holding.rs +++ b/modules/amm/ffi/src/api/holding.rs @@ -1,4 +1,4 @@ -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; use token_core::TokenHolding; use crate::account::{decode_account, AccountRead}; diff --git a/modules/amm/ffi/src/api/liquidity.rs b/modules/amm/ffi/src/api/liquidity.rs index 5bb9337..840d976 100644 --- a/modules/amm/ffi/src/api/liquidity.rs +++ b/modules/amm/ffi/src/api/liquidity.rs @@ -15,7 +15,7 @@ use amm_core::{ isqrt_product, mul_div_floor, spot_price_q64_64, PoolDefinition, FEE_BPS_DENOMINATOR, MINIMUM_LIQUIDITY, }; -use nssa_core::account::AccountId; +use lee_core::account::AccountId; use serde_json::{json, Value}; use super::{ @@ -633,7 +633,7 @@ pub(super) fn sync_reserves_plan(request: SyncReservesPlanRequest) -> Result AccountRead { + fn valid_config(amm: lee_core::program::ProgramId) -> AccountRead { let token_program = parse_program_id(&"01".repeat(32)).unwrap(); let twap_program = parse_program_id(&"02".repeat(32)).unwrap(); let account = Account { diff --git a/modules/amm/ffi/src/api/oracle.rs b/modules/amm/ffi/src/api/oracle.rs index f2c2318..4655a46 100644 --- a/modules/amm/ffi/src/api/oracle.rs +++ b/modules/amm/ffi/src/api/oracle.rs @@ -1,5 +1,5 @@ use amm_core::Instruction; -use nssa_core::account::AccountId; +use lee_core::account::AccountId; use serde_json::{json, Value}; use twap_oracle_core::{compute_oracle_price_account_pda, compute_price_observations_pda}; diff --git a/modules/amm/ffi/src/api/pair.rs b/modules/amm/ffi/src/api/pair.rs index 36e97b5..accf1c9 100644 --- a/modules/amm/ffi/src/api/pair.rs +++ b/modules/amm/ffi/src/api/pair.rs @@ -3,7 +3,7 @@ use amm_core::{ compute_vault_pda, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; use serde_json::{json, Value}; use twap_oracle_core::compute_current_tick_account_pda; diff --git a/modules/amm/ffi/src/api/swap.rs b/modules/amm/ffi/src/api/swap.rs index df883cb..c23dee9 100644 --- a/modules/amm/ffi/src/api/swap.rs +++ b/modules/amm/ffi/src/api/swap.rs @@ -7,7 +7,7 @@ use amm_core::{ compute_pool_pda, mul_div_ceil, mul_div_floor, price_impact_bps, swap_exact_in_amounts, swap_exact_out_amounts, PoolDefinition, FEE_BPS_DENOMINATOR, }; -use nssa_core::account::AccountId; +use lee_core::account::AccountId; use risc0_binfmt::ProgramBinary; use serde_json::{json, Value}; @@ -429,7 +429,7 @@ pub(super) fn swap_exact_out_plan(request: SwapExactOutPlanRequest) -> Result Result { let elf = hex::decode(&request.elf).map_err(|error| format!("invalid elf hex: {error}"))?; let binary = ProgramBinary::decode(&elf).map_err(|error| format!("{error:?}"))?; - let image_id: nssa_core::program::ProgramId = binary + let image_id: lee_core::program::ProgramId = binary .compute_image_id() .map_err(|error| format!("{error:?}"))? .into(); @@ -439,7 +439,7 @@ pub(super) fn program_id(request: ProgramIdRequest) -> Result { #[cfg(test)] mod tests { use amm_core::PoolDefinition; - use nssa_core::account::AccountId; + use lee_core::account::AccountId; use super::*; use crate::account::{AccountRead, WalletAccount}; diff --git a/modules/amm/ffi/src/api/tests.rs b/modules/amm/ffi/src/api/tests.rs index ad30006..4f74142 100644 --- a/modules/amm/ffi/src/api/tests.rs +++ b/modules/amm/ffi/src/api/tests.rs @@ -4,7 +4,7 @@ use amm_core::{ compute_vault_pda, isqrt_product, AmmConfig, Instruction, PoolDefinition, MINIMUM_LIQUIDITY, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, Data, Nonce}, program::ProgramId, }; diff --git a/modules/amm/ffi/src/api/token_holdings.rs b/modules/amm/ffi/src/api/token_holdings.rs index 7127b93..b15100d 100644 --- a/modules/amm/ffi/src/api/token_holdings.rs +++ b/modules/amm/ffi/src/api/token_holdings.rs @@ -40,7 +40,7 @@ pub(super) fn token_holdings(request: TokenHoldingsRequest) -> Result Result { +fn parse_token_program_id(value: &str) -> Result { parse_program_id(value).map_err(|_| TokenApiError::new("bad_request")) } diff --git a/modules/token/ffi/src/api/plan.rs b/modules/token/ffi/src/api/plan.rs index 3623081..b00fa0c 100644 --- a/modules/token/ffi/src/api/plan.rs +++ b/modules/token/ffi/src/api/plan.rs @@ -1,4 +1,4 @@ -use nssa_core::account::AccountId; +use lee_core::account::AccountId; use risc0_binfmt::ProgramBinary; use serde_json::{json, Value}; use token_core::{Instruction, MetadataStandard, NewTokenDefinition, NewTokenMetadata}; @@ -18,7 +18,7 @@ use crate::account::{account_id_from_hex, account_id_hex, program_id_bytes}; pub fn program_id(request: ProgramIdRequest) -> TokenResult { let elf = hex::decode(&request.elf).map_err(|_| TokenApiError::new("bad_request"))?; let binary = ProgramBinary::decode(&elf).map_err(|_| TokenApiError::new("bad_request"))?; - let image_id: nssa_core::program::ProgramId = binary + let image_id: lee_core::program::ProgramId = binary .compute_image_id() .map_err(|_| TokenApiError::new("backend_error"))? .into(); @@ -298,7 +298,7 @@ fn reject_zero_account_id(account_id: AccountId, code: &'static str) -> Result<( } fn plan_response( - program_id: nssa_core::program::ProgramId, + program_id: lee_core::program::ProgramId, account_ids: [AccountId; N], signing_requirements: [bool; N], instruction: Instruction, diff --git a/modules/token/ffi/src/api/tests.rs b/modules/token/ffi/src/api/tests.rs index 277b867..98e5f68 100644 --- a/modules/token/ffi/src/api/tests.rs +++ b/modules/token/ffi/src/api/tests.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, Data, Nonce}, program::ProgramId, }; diff --git a/programs/amm/Cargo.toml b/programs/amm/Cargo.toml index c4f140f..091b085 100644 --- a/programs/amm/Cargo.toml +++ b/programs/amm/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } amm_core = { path = "core" } token_core = { path = "../token/core" } diff --git a/programs/amm/core/Cargo.toml b/programs/amm/core/Cargo.toml index a91fe79..2737f00 100644 --- a/programs/amm/core/Cargo.toml +++ b/programs/amm/core/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } spel-framework-macros = { git = "https://github.com/0x-r4bbit/spel.git", rev = "3655513edbc516b76e5d6f725cb2089239e03b7f", package = "spel-framework-macros" } token_core = { path = "../../token/core" } borsh = { version = "1.5", features = ["derive"] } diff --git a/programs/amm/core/src/lib.rs b/programs/amm/core/src/lib.rs index ce25cb0..f39d611 100644 --- a/programs/amm/core/src/lib.rs +++ b/programs/amm/core/src/lib.rs @@ -1,7 +1,7 @@ //! This crate contains core data structures and utilities for the AMM Program. use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{PdaSeed, ProgramId}, }; diff --git a/programs/amm/examples/amm_pdas.rs b/programs/amm/examples/amm_pdas.rs index 06d1783..a1596bf 100644 --- a/programs/amm/examples/amm_pdas.rs +++ b/programs/amm/examples/amm_pdas.rs @@ -13,7 +13,7 @@ use amm_core::{ compute_config_pda, compute_liquidity_token_pda, compute_lp_lock_holding_pda, compute_pool_pda, compute_vault_pda, }; -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; use twap_oracle_core::compute_current_tick_account_pda; // Accepts a ProgramId as 8 comma-separated u32 limbs, a 64-char ImageID hex, or a base58 diff --git a/programs/amm/src/add.rs b/programs/amm/src/add.rs index 80d03b3..17ea849 100644 --- a/programs/amm/src/add.rs +++ b/programs/amm/src/add.rs @@ -6,7 +6,7 @@ use amm_core::{ AmmConfig, PoolDefinition, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/amm/src/create_oracle_price_account.rs b/programs/amm/src/create_oracle_price_account.rs index f0c4a34..5d95794 100644 --- a/programs/amm/src/create_oracle_price_account.rs +++ b/programs/amm/src/create_oracle_price_account.rs @@ -3,7 +3,7 @@ use amm_core::{ PoolDefinition, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata}, program::{AccountPostState, ChainedCall, ProgramId}, }; @@ -152,7 +152,7 @@ pub fn create_oracle_price_account( #[cfg(test)] mod tests { use amm_core::compute_pool_pda_seed; - use nssa_core::account::{Account, AccountId, Data, Nonce}; + use lee_core::account::{Account, AccountId, Data, Nonce}; use super::*; diff --git a/programs/amm/src/create_price_observations.rs b/programs/amm/src/create_price_observations.rs index 8a52a03..1a35069 100644 --- a/programs/amm/src/create_price_observations.rs +++ b/programs/amm/src/create_price_observations.rs @@ -2,7 +2,7 @@ use amm_core::{ compute_config_pda, compute_pool_pda, compute_pool_pda_seed, AmmConfig, PoolDefinition, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata}, program::{AccountPostState, ChainedCall, ProgramId}, }; @@ -134,7 +134,7 @@ pub fn create_price_observations( #[cfg(test)] mod tests { use amm_core::compute_pool_pda_seed; - use nssa_core::account::{Account, AccountId, Data, Nonce}; + use lee_core::account::{Account, AccountId, Data, Nonce}; use twap_oracle_core::compute_current_tick_account_pda; use super::*; diff --git a/programs/amm/src/initialize.rs b/programs/amm/src/initialize.rs index 6d84fab..30799e8 100644 --- a/programs/amm/src/initialize.rs +++ b/programs/amm/src/initialize.rs @@ -1,5 +1,5 @@ use amm_core::{compute_config_pda, compute_config_pda_seed, AmmConfig}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data}, program::{AccountPostState, Claim, ProgramId}, }; @@ -51,7 +51,7 @@ pub fn initialize( #[cfg(test)] mod tests { use amm_core::compute_config_pda; - use nssa_core::account::{AccountId, Nonce}; + use lee_core::account::{AccountId, Nonce}; use super::*; diff --git a/programs/amm/src/new_definition.rs b/programs/amm/src/new_definition.rs index 7afe9b2..f0ce8eb 100644 --- a/programs/amm/src/new_definition.rs +++ b/programs/amm/src/new_definition.rs @@ -8,7 +8,7 @@ use amm_core::{ MINIMUM_LIQUIDITY, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, Claim, ProgramId}, }; diff --git a/programs/amm/src/remove.rs b/programs/amm/src/remove.rs index 2d0bbf4..8e3e2bf 100644 --- a/programs/amm/src/remove.rs +++ b/programs/amm/src/remove.rs @@ -6,7 +6,7 @@ use amm_core::{ PoolDefinition, MINIMUM_LIQUIDITY, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/amm/src/swap.rs b/programs/amm/src/swap.rs index 794198d..4de0398 100644 --- a/programs/amm/src/swap.rs +++ b/programs/amm/src/swap.rs @@ -5,7 +5,7 @@ use amm_core::{ }; pub use amm_core::{compute_liquidity_token_pda_seed, compute_vault_pda_seed, PoolDefinition}; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/amm/src/sync.rs b/programs/amm/src/sync.rs index 250bfc8..91da4e4 100644 --- a/programs/amm/src/sync.rs +++ b/programs/amm/src/sync.rs @@ -3,7 +3,7 @@ use amm_core::{ read_vault_fungible_balances, spot_price_q64_64, AmmConfig, PoolDefinition, MINIMUM_LIQUIDITY, }; use clock_core::CLOCK_01_PROGRAM_ACCOUNT_ID; -use nssa_core::{ +use lee_core::{ account::{AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/amm/src/tests.rs b/programs/amm/src/tests.rs index 5852983..a84c4bd 100644 --- a/programs/amm/src/tests.rs +++ b/programs/amm/src/tests.rs @@ -14,7 +14,7 @@ use amm_core::{ AmmConfig, PoolDefinition, FEE_BPS_DENOMINATOR, FEE_TIER_BPS_1, FEE_TIER_BPS_100, FEE_TIER_BPS_30, FEE_TIER_BPS_5, MINIMUM_LIQUIDITY, }; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data, Nonce}, program::{ChainedCall, Claim, ProgramId}, }; diff --git a/programs/amm/src/update_config.rs b/programs/amm/src/update_config.rs index 2ff9fbf..bf7ca85 100644 --- a/programs/amm/src/update_config.rs +++ b/programs/amm/src/update_config.rs @@ -1,5 +1,5 @@ use amm_core::{compute_config_pda, AmmConfig}; -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{AccountPostState, ProgramId}, }; @@ -57,7 +57,7 @@ pub fn update_config( #[cfg(test)] mod tests { - use nssa_core::account::{Account, Nonce}; + use lee_core::account::{Account, Nonce}; use super::*; diff --git a/programs/ata/Cargo.toml b/programs/ata/Cargo.toml index 51a283a..f816c9e 100644 --- a/programs/ata/Cargo.toml +++ b/programs/ata/Cargo.toml @@ -7,6 +7,6 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } ata_core = { path = "core" } token_core = { path = "../token/core" } diff --git a/programs/ata/core/Cargo.toml b/programs/ata/core/Cargo.toml index 792bd97..5de230f 100644 --- a/programs/ata/core/Cargo.toml +++ b/programs/ata/core/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } borsh = { version = "1.5", features = ["derive"] } serde = { version = "1.0", features = ["derive"] } risc0-zkvm = { version = "=3.0.5", default-features = false } diff --git a/programs/ata/core/src/lib.rs b/programs/ata/core/src/lib.rs index e4be506..745472f 100644 --- a/programs/ata/core/src/lib.rs +++ b/programs/ata/core/src/lib.rs @@ -1,5 +1,5 @@ -pub use nssa_core::program::PdaSeed; -use nssa_core::{ +pub use lee_core::program::PdaSeed; +use lee_core::{ account::{AccountId, AccountWithMetadata}, program::ProgramId, }; diff --git a/programs/ata/examples/ata_pdas.rs b/programs/ata/examples/ata_pdas.rs index 1b7481d..b519010 100644 --- a/programs/ata/examples/ata_pdas.rs +++ b/programs/ata/examples/ata_pdas.rs @@ -9,7 +9,7 @@ use std::str::FromStr; use ata_core::{compute_ata_seed, get_associated_token_account_id}; -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; // Accepts a ProgramId as 8 comma-separated u32 limbs, a 64-char ImageID hex, or a base58 // ImageID. Hex/base58 are decoded as the 32 ImageID bytes read little-endian per u32 word, diff --git a/programs/ata/src/burn.rs b/programs/ata/src/burn.rs index 3386e6d..0158dba 100644 --- a/programs/ata/src/burn.rs +++ b/programs/ata/src/burn.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::AccountWithMetadata, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/ata/src/create.rs b/programs/ata/src/create.rs index 6239b11..fca0007 100644 --- a/programs/ata/src/create.rs +++ b/programs/ata/src/create.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata}, program::{AccountPostState, ChainedCall, Claim, ProgramId}, }; diff --git a/programs/ata/src/tests.rs b/programs/ata/src/tests.rs index 09f1792..7f1546c 100644 --- a/programs/ata/src/tests.rs +++ b/programs/ata/src/tests.rs @@ -1,13 +1,13 @@ use ata_core::{compute_ata_seed, get_associated_token_account_id}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data}, program::{ChainedCall, Claim}, }; use token_core::{TokenDefinition, TokenHolding}; -const ATA_PROGRAM_ID: nssa_core::program::ProgramId = [1u32; 8]; -const TOKEN_PROGRAM_ID: nssa_core::program::ProgramId = [2u32; 8]; -const OTHER_TOKEN_PROGRAM_ID: nssa_core::program::ProgramId = [3u32; 8]; +const ATA_PROGRAM_ID: lee_core::program::ProgramId = [1u32; 8]; +const TOKEN_PROGRAM_ID: lee_core::program::ProgramId = [2u32; 8]; +const OTHER_TOKEN_PROGRAM_ID: lee_core::program::ProgramId = [3u32; 8]; fn owner_id() -> AccountId { AccountId::new([0x01u8; 32]) @@ -43,7 +43,7 @@ fn definition_account() -> AccountWithMetadata { metadata_id: None, authority: None, }), - nonce: nssa_core::account::Nonce(0), + nonce: lee_core::account::Nonce(0), }, is_authorized: false, account_id: definition_id(), @@ -67,7 +67,7 @@ fn initialized_ata_account() -> AccountWithMetadata { definition_id: definition_id(), balance: 100, }), - nonce: nssa_core::account::Nonce(0), + nonce: lee_core::account::Nonce(0), }, is_authorized: false, account_id: ata_id(), @@ -248,7 +248,7 @@ fn initialized_recipient_account() -> AccountWithMetadata { definition_id: definition_id(), balance: 0, }), - nonce: nssa_core::account::Nonce(0), + nonce: lee_core::account::Nonce(0), }, is_authorized: false, account_id: recipient_id(), diff --git a/programs/ata/src/transfer.rs b/programs/ata/src/transfer.rs index c816f26..699d6d7 100644 --- a/programs/ata/src/transfer.rs +++ b/programs/ata/src/transfer.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/benchmark/Cargo.toml b/programs/benchmark/Cargo.toml index f0744eb..54a4604 100644 --- a/programs/benchmark/Cargo.toml +++ b/programs/benchmark/Cargo.toml @@ -11,8 +11,8 @@ edition = "2021" [workspace] [dependencies] -nssa = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", package = "lee" } -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } twap_oracle_core = { path = "../twap_oracle/core" } twap-oracle-methods = { path = "../twap_oracle/methods" } diff --git a/programs/benchmark/tests/twap_cycle_bench.rs b/programs/benchmark/tests/twap_cycle_bench.rs index b739a61..2362340 100644 --- a/programs/benchmark/tests/twap_cycle_bench.rs +++ b/programs/benchmark/tests/twap_cycle_bench.rs @@ -4,9 +4,9 @@ //! with the session limit lifted, so we can measure the zkVM cycle cost of instructions that exceed //! the on-chain `MAX_NUM_CYCLES_PUBLIC_EXECUTION = 32 MiCycles` budget — `RecordTick` in //! particular, which aborts under the normal runtime and therefore can't be measured through -//! `nssa`'s `transition_from_public_transaction`. +//! `lee`'s `transition_from_public_transaction`. //! -//! It reproduces `nssa::program::Program::execute`'s input encoding (four `env.write` calls: +//! It reproduces `lee::program::Program::execute`'s input encoding (four `env.write` calls: //! program id, caller program id, pre-states, instruction words) and reports the executor's //! user / paging / reserved / total cycle split per scenario. //! @@ -17,7 +17,7 @@ //! ``` use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data}, program::ProgramId, }; @@ -27,7 +27,7 @@ use twap_oracle_core::{ Instruction, ObservationEntry, PriceObservations, OBSERVATIONS_CAPACITY, }; -/// The on-chain public-execution cycle ceiling (`MAX_NUM_CYCLES_PUBLIC_EXECUTION` in `nssa`). +/// The on-chain public-execution cycle ceiling (`MAX_NUM_CYCLES_PUBLIC_EXECUTION` in `lee`). const PUBLIC_EXECUTION_CYCLE_LIMIT: u64 = 1024 * 1024 * 32; /// A 24-hour window in milliseconds; `min_interval = WINDOW / OBSERVATIONS_CAPACITY ≈ 13.5 s`. @@ -162,7 +162,7 @@ fn run(pre_states: &[AccountWithMetadata], instruction: &Instruction) -> Cycles } } -/// Runs the guest under a hard session limit — exactly as `nssa::program::Program::execute` does on +/// Runs the guest under a hard session limit — exactly as `lee::program::Program::execute` does on /// chain — and reports whether it completed or was aborted by the limit. This is the ground-truth /// reproduction of the on-chain behaviour. fn completes_under_limit( @@ -178,7 +178,7 @@ fn completes_under_limit( } /// Same as [`completes_under_limit`] but via `default_executor().execute()` — the EXACT entry point -/// `nssa::program::Program::execute` uses — to check whether the executor path (not just the input +/// `lee::program::Program::execute` uses — to check whether the executor path (not just the input /// encoding) accounts for the session limit differently than [`ExecutorImpl::run`]. fn completes_under_limit_via_default_executor( pre_states: &[AccountWithMetadata], @@ -280,7 +280,7 @@ fn twap_record_tick_cycle_budget_report() { let write_ok = completes_under_limit(&write_pre, &write_instr, limit); println!(" RecordTick (cap {cap}): {}", verdict(write_ok)); - // The exact nssa entry point, to expose any executor-path accounting difference. + // The exact lee entry point, to expose any executor-path accounting difference. let create_ok_de = completes_under_limit_via_default_executor(&create_pre, &create_instr, limit); let write_ok_de = completes_under_limit_via_default_executor(&write_pre, &write_instr, limit); diff --git a/programs/integration_tests/Cargo.toml b/programs/integration_tests/Cargo.toml index c96ca1c..02bfee4 100644 --- a/programs/integration_tests/Cargo.toml +++ b/programs/integration_tests/Cargo.toml @@ -7,8 +7,8 @@ edition = "2021" workspace = true [dependencies] -nssa = { workspace = true } -nssa_core = { workspace = true, features = ["host", "test_utils"] } +lee = { workspace = true } +lee_core = { workspace = true, features = ["host", "test_utils"] } clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } amm_core = { workspace = true } token_core = { workspace = true } diff --git a/programs/integration_tests/tests/amm.rs b/programs/integration_tests/tests/amm.rs index 9aa3eec..e1ae100 100644 --- a/programs/integration_tests/tests/amm.rs +++ b/programs/integration_tests/tests/amm.rs @@ -8,12 +8,12 @@ use amm_core::{ MINIMUM_LIQUIDITY, }; use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa::{ +use lee::{ error::LeeError, program_deployment_transaction::{self, ProgramDeploymentTransaction}, public_transaction, PrivateKey, PublicKey, PublicTransaction, V03State, }; -use nssa_core::account::{Account, AccountId, Data, Nonce}; +use lee_core::account::{Account, AccountId, Data, Nonce}; use token_core::{TokenDefinition, TokenHolding}; struct Keys; @@ -40,15 +40,15 @@ impl Keys { } impl Ids { - fn token_program() -> nssa_core::program::ProgramId { + fn token_program() -> lee_core::program::ProgramId { token_methods::TOKEN_ID } - fn amm_program() -> nssa_core::program::ProgramId { + fn amm_program() -> lee_core::program::ProgramId { amm_methods::AMM_ID } - fn twap_oracle_program() -> nssa_core::program::ProgramId { + fn twap_oracle_program() -> lee_core::program::ProgramId { twap_oracle_methods::TWAP_ORACLE_ID } @@ -1873,7 +1873,7 @@ fn amm_create_price_observations_without_current_tick_account_fails() { /// state. `RecordTick` reads this account (`CLOCK_01_PROGRAM_ACCOUNT_ID`), so the TWAP tests use it /// to simulate the passage of time between observations. /// -/// rc6 moved the clock program out of `nssa` into the separate system-programs crate (gated behind +/// rc6 moved the clock program out of `lee` into the separate system-programs crate (gated behind /// the guest-building `artifacts` feature), so the clock can no longer be ticked by submitting a /// real clock transaction here. Instead we set the account state directly via /// `force_insert_account`, matching how the upstream rc6 state-machine tests seed accounts. diff --git a/programs/integration_tests/tests/ata.rs b/programs/integration_tests/tests/ata.rs index f806a78..de1ec5c 100644 --- a/programs/integration_tests/tests/ata.rs +++ b/programs/integration_tests/tests/ata.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use ata_core::{compute_ata_seed, get_associated_token_account_id}; -use nssa::{ +use lee::{ execute_and_prove, privacy_preserving_transaction::{ circuit::ProgramWithDependencies, Message, PrivacyPreservingTransaction, WitnessSet, @@ -10,7 +10,7 @@ use nssa::{ program_deployment_transaction::{self, ProgramDeploymentTransaction}, public_transaction, PrivateKey, PublicKey, PublicTransaction, V03State, }; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data, Nonce}, encryption::ViewingPublicKey, InputAccountIdentity, NullifierPublicKey, NullifierSecretKey, @@ -36,11 +36,11 @@ impl Keys { } impl Ids { - fn token_program() -> nssa_core::program::ProgramId { + fn token_program() -> lee_core::program::ProgramId { token_methods::TOKEN_ID } - fn ata_program() -> nssa_core::program::ProgramId { + fn ata_program() -> lee_core::program::ProgramId { ata_methods::ATA_ID } diff --git a/programs/integration_tests/tests/stablecoin.rs b/programs/integration_tests/tests/stablecoin.rs index 02b3aa0..0196d21 100644 --- a/programs/integration_tests/tests/stablecoin.rs +++ b/programs/integration_tests/tests/stablecoin.rs @@ -1,9 +1,9 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa::{ +use lee::{ program_deployment_transaction::{self, ProgramDeploymentTransaction}, public_transaction, PrivateKey, PublicKey, PublicTransaction, V03State, }; -use nssa_core::account::{Account, AccountId, Data, Nonce}; +use lee_core::account::{Account, AccountId, Data, Nonce}; use stablecoin_core::{ compute_position_pda, compute_position_vault_pda, compute_protocol_parameters_pda, compute_redemption_price_state_pda, compute_stability_fee_accumulator_pda, @@ -35,11 +35,11 @@ impl Keys { } impl Ids { - fn token_program() -> nssa_core::program::ProgramId { + fn token_program() -> lee_core::program::ProgramId { token_methods::TOKEN_ID } - fn stablecoin_program() -> nssa_core::program::ProgramId { + fn stablecoin_program() -> lee_core::program::ProgramId { stablecoin_methods::STABLECOIN_ID } @@ -264,7 +264,7 @@ fn state_for_stablecoin_tests() -> V03State { Accounts::collateral_definition_init(), ); state.force_insert_account(Ids::user_holding(), Accounts::user_holding_init()); - // Seed the owner as a non-default-owned account. In nssa, balance-holding user + // Seed the owner as a non-default-owned account. In lee, balance-holding user // accounts are owned by a system program (see lee `system_accounts` / the // `time_locked_transfer` sender), not the default program. A default-owned owner // works the first time it signs (its pre-state is still `Account::default()`), but diff --git a/programs/integration_tests/tests/token.rs b/programs/integration_tests/tests/token.rs index 1d5b7c6..fadb008 100644 --- a/programs/integration_tests/tests/token.rs +++ b/programs/integration_tests/tests/token.rs @@ -1,11 +1,11 @@ -use nssa::{ +use lee::{ execute_and_prove, privacy_preserving_transaction::{Message, PrivacyPreservingTransaction, WitnessSet}, program::Program, program_deployment_transaction::{self, ProgramDeploymentTransaction}, public_transaction, PrivateKey, PublicKey, PublicTransaction, V03State, }; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data, Nonce}, encryption::ViewingPublicKey, Commitment, InputAccountIdentity, NullifierPublicKey, NullifierSecretKey, @@ -35,11 +35,11 @@ impl Keys { } impl Ids { - fn token_program() -> nssa_core::program::ProgramId { + fn token_program() -> lee_core::program::ProgramId { token_methods::TOKEN_ID } - fn foreign_token_program() -> nssa_core::program::ProgramId { + fn foreign_token_program() -> lee_core::program::ProgramId { [0xfeed_u32; 8] } diff --git a/programs/stablecoin/Cargo.toml b/programs/stablecoin/Cargo.toml index 361b8af..12a8c21 100644 --- a/programs/stablecoin/Cargo.toml +++ b/programs/stablecoin/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } stablecoin_core = { path = "core" } token_core = { path = "../token/core" } diff --git a/programs/stablecoin/core/Cargo.toml b/programs/stablecoin/core/Cargo.toml index 528d9f7..7ef5c6e 100644 --- a/programs/stablecoin/core/Cargo.toml +++ b/programs/stablecoin/core/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } borsh = { version = "1.5", features = ["derive"] } alloy-primitives = { version = "1", default-features = false } # Pin ruint (transitive via alloy-primitives) below 1.18, which raised its MSRV to rustc 1.90. diff --git a/programs/stablecoin/core/src/lib.rs b/programs/stablecoin/core/src/lib.rs index a1b31de..9d4d6a2 100644 --- a/programs/stablecoin/core/src/lib.rs +++ b/programs/stablecoin/core/src/lib.rs @@ -9,7 +9,7 @@ pub mod redemption_price_state; pub mod stability_fee_accumulator; use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{PdaSeed, ProgramId}, }; diff --git a/programs/stablecoin/core/src/protocol_parameters.rs b/programs/stablecoin/core/src/protocol_parameters.rs index 3b6d8ed..49d9468 100644 --- a/programs/stablecoin/core/src/protocol_parameters.rs +++ b/programs/stablecoin/core/src/protocol_parameters.rs @@ -5,7 +5,7 @@ //! instruction. use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::{ +use lee_core::{ account::{AccountId, Data}, program::{PdaSeed, ProgramId}, }; diff --git a/programs/stablecoin/core/src/redemption_price_state.rs b/programs/stablecoin/core/src/redemption_price_state.rs index 5b8cdca..a338563 100644 --- a/programs/stablecoin/core/src/redemption_price_state.rs +++ b/programs/stablecoin/core/src/redemption_price_state.rs @@ -5,7 +5,7 @@ //! for collateralization checks. use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::{ +use lee_core::{ account::{AccountId, Data}, program::{PdaSeed, ProgramId}, }; diff --git a/programs/stablecoin/core/src/stability_fee_accumulator.rs b/programs/stablecoin/core/src/stability_fee_accumulator.rs index 92d9ca4..ed9e15c 100644 --- a/programs/stablecoin/core/src/stability_fee_accumulator.rs +++ b/programs/stablecoin/core/src/stability_fee_accumulator.rs @@ -6,7 +6,7 @@ //! normalized debt. use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::{ +use lee_core::{ account::{AccountId, Data}, program::{PdaSeed, ProgramId}, }; diff --git a/programs/stablecoin/examples/stablecoin_pdas.rs b/programs/stablecoin/examples/stablecoin_pdas.rs index f828406..fa156fa 100644 --- a/programs/stablecoin/examples/stablecoin_pdas.rs +++ b/programs/stablecoin/examples/stablecoin_pdas.rs @@ -9,7 +9,7 @@ use std::str::FromStr; -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; use stablecoin_core::{compute_position_pda, compute_position_vault_pda}; // Accepts a ProgramId as 8 comma-separated u32 limbs, a 64-char ImageID hex, or a base58 diff --git a/programs/stablecoin/src/initialize_program.rs b/programs/stablecoin/src/initialize_program.rs index 39468de..2d1c8f5 100644 --- a/programs/stablecoin/src/initialize_program.rs +++ b/programs/stablecoin/src/initialize_program.rs @@ -6,7 +6,7 @@ //! millisecond timestamp from a clock account (see `clock_core`). use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, Claim, ProgramId}, }; @@ -311,7 +311,7 @@ pub fn initialize_program( reason = "tests deliberately panic on bad state via assert!/#[should_panic] and index fixed-size vectors" )] mod tests { - use nssa_core::account::Nonce; + use lee_core::account::Nonce; use stablecoin_core::compute_protocol_parameters_pda_seed; use super::*; diff --git a/programs/stablecoin/src/open_position.rs b/programs/stablecoin/src/open_position.rs index 2d9903d..ee830fc 100644 --- a/programs/stablecoin/src/open_position.rs +++ b/programs/stablecoin/src/open_position.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, Claim, ProgramId}, }; diff --git a/programs/stablecoin/src/repay_debt.rs b/programs/stablecoin/src/repay_debt.rs index 79f0efc..d23efdf 100644 --- a/programs/stablecoin/src/repay_debt.rs +++ b/programs/stablecoin/src/repay_debt.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/stablecoin/src/tests.rs b/programs/stablecoin/src/tests.rs index 64a9335..1a21c45 100644 --- a/programs/stablecoin/src/tests.rs +++ b/programs/stablecoin/src/tests.rs @@ -5,7 +5,7 @@ reason = "tests deliberately panic on bad state via assert!/#[should_panic] and index fixed-size vectors" )] -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data, Nonce}, program::{ChainedCall, Claim, ProgramId}, }; diff --git a/programs/stablecoin/src/withdraw_collateral.rs b/programs/stablecoin/src/withdraw_collateral.rs index d146ca5..d973e69 100644 --- a/programs/stablecoin/src/withdraw_collateral.rs +++ b/programs/stablecoin/src/withdraw_collateral.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, ChainedCall, ProgramId}, }; diff --git a/programs/token/Cargo.toml b/programs/token/Cargo.toml index 4654c95..d4af884 100644 --- a/programs/token/Cargo.toml +++ b/programs/token/Cargo.toml @@ -7,5 +7,5 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } token_core = { path = "core" } diff --git a/programs/token/core/Cargo.toml b/programs/token/core/Cargo.toml index d42da0c..410785e 100644 --- a/programs/token/core/Cargo.toml +++ b/programs/token/core/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } spel-framework-macros = { git = "https://github.com/0x-r4bbit/spel.git", rev = "3655513edbc516b76e5d6f725cb2089239e03b7f", package = "spel-framework-macros" } borsh = { version = "1.5", features = ["derive"] } serde = { version = "1.0", features = ["derive"] } diff --git a/programs/token/core/src/lib.rs b/programs/token/core/src/lib.rs index f8c629c..962930d 100644 --- a/programs/token/core/src/lib.rs +++ b/programs/token/core/src/lib.rs @@ -1,7 +1,7 @@ //! This crate contains core data structures and utilities for the Token Program. use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::account::{AccountId, Data}; +use lee_core::account::{AccountId, Data}; use serde::{Deserialize, Serialize}; use spel_framework_macros::account_type; diff --git a/programs/token/src/burn.rs b/programs/token/src/burn.rs index e984745..f81f905 100644 --- a/programs/token/src/burn.rs +++ b/programs/token/src/burn.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{AccountWithMetadata, Data}, program::AccountPostState, }; diff --git a/programs/token/src/initialize.rs b/programs/token/src/initialize.rs index 7f57e38..485ae91 100644 --- a/programs/token/src/initialize.rs +++ b/programs/token/src/initialize.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, Claim, ProgramId}, }; diff --git a/programs/token/src/mint.rs b/programs/token/src/mint.rs index b96e917..96d2dd3 100644 --- a/programs/token/src/mint.rs +++ b/programs/token/src/mint.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, Claim, ProgramId}, }; diff --git a/programs/token/src/new_definition.rs b/programs/token/src/new_definition.rs index 731c383..c01d2b1 100644 --- a/programs/token/src/new_definition.rs +++ b/programs/token/src/new_definition.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data}, program::{AccountPostState, Claim}, }; diff --git a/programs/token/src/print_nft.rs b/programs/token/src/print_nft.rs index c45e6ad..5b2f32b 100644 --- a/programs/token/src/print_nft.rs +++ b/programs/token/src/print_nft.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, Claim}, }; diff --git a/programs/token/src/set_authority.rs b/programs/token/src/set_authority.rs index 5be0e90..1c8235c 100644 --- a/programs/token/src/set_authority.rs +++ b/programs/token/src/set_authority.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{AccountPostState, ProgramId}, }; diff --git a/programs/token/src/tests.rs b/programs/token/src/tests.rs index 02e56d5..1094c36 100644 --- a/programs/token/src/tests.rs +++ b/programs/token/src/tests.rs @@ -4,7 +4,7 @@ reason = "test fixtures use fixed values to lock boundary behavior" )] -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data, Nonce}, program::{Claim, ProgramId}, }; diff --git a/programs/token/src/transfer.rs b/programs/token/src/transfer.rs index 2d1fe70..377ca45 100644 --- a/programs/token/src/transfer.rs +++ b/programs/token/src/transfer.rs @@ -1,4 +1,4 @@ -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, Claim}, }; diff --git a/programs/twap_oracle/Cargo.toml b/programs/twap_oracle/Cargo.toml index 4825b60..9d2d4c6 100644 --- a/programs/twap_oracle/Cargo.toml +++ b/programs/twap_oracle/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2" } twap_oracle_core = { path = "core" } diff --git a/programs/twap_oracle/core/Cargo.toml b/programs/twap_oracle/core/Cargo.toml index d7f9c8e..412ecb9 100644 --- a/programs/twap_oracle/core/Cargo.toml +++ b/programs/twap_oracle/core/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" workspace = true [dependencies] -nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"], package = "lee_core" } +lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.2", features = ["host"] } borsh = { version = "1.5", features = ["derive"] } serde = { version = "1.0", features = ["derive"] } spel-framework-macros = { git = "https://github.com/0x-r4bbit/spel.git", rev = "3655513edbc516b76e5d6f725cb2089239e03b7f", package = "spel-framework-macros" } diff --git a/programs/twap_oracle/core/src/lib.rs b/programs/twap_oracle/core/src/lib.rs index 2c62ece..11f6404 100644 --- a/programs/twap_oracle/core/src/lib.rs +++ b/programs/twap_oracle/core/src/lib.rs @@ -1,5 +1,5 @@ use borsh::{BorshDeserialize, BorshSerialize}; -use nssa_core::{ +use lee_core::{ account::{AccountId, Data}, program::{PdaSeed, ProgramId}, }; diff --git a/programs/twap_oracle/examples/twap_oracle_pdas.rs b/programs/twap_oracle/examples/twap_oracle_pdas.rs index d62c843..1c166aa 100644 --- a/programs/twap_oracle/examples/twap_oracle_pdas.rs +++ b/programs/twap_oracle/examples/twap_oracle_pdas.rs @@ -10,7 +10,7 @@ use std::str::FromStr; -use nssa_core::{account::AccountId, program::ProgramId}; +use lee_core::{account::AccountId, program::ProgramId}; use twap_oracle_core::{ compute_current_tick_account_pda, compute_oracle_price_account_pda, compute_price_observations_pda, diff --git a/programs/twap_oracle/src/create_current_tick_account.rs b/programs/twap_oracle/src/create_current_tick_account.rs index 7753161..54889b9 100644 --- a/programs/twap_oracle/src/create_current_tick_account.rs +++ b/programs/twap_oracle/src/create_current_tick_account.rs @@ -1,5 +1,5 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, Claim, ProgramId}, }; @@ -75,7 +75,7 @@ pub fn create_current_tick_account( #[cfg(test)] mod tests { - use nssa_core::account::{AccountId, Nonce}; + use lee_core::account::{AccountId, Nonce}; use super::*; diff --git a/programs/twap_oracle/src/create_oracle_price_account.rs b/programs/twap_oracle/src/create_oracle_price_account.rs index dbc492a..d2a37f8 100644 --- a/programs/twap_oracle/src/create_oracle_price_account.rs +++ b/programs/twap_oracle/src/create_oracle_price_account.rs @@ -1,5 +1,5 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountId, AccountWithMetadata, Data}, program::{AccountPostState, Claim, ProgramId}, }; @@ -119,7 +119,7 @@ pub fn create_oracle_price_account( #[cfg(test)] mod tests { - use nssa_core::account::Nonce; + use lee_core::account::Nonce; use super::*; diff --git a/programs/twap_oracle/src/create_price_observations.rs b/programs/twap_oracle/src/create_price_observations.rs index ba98842..c9c22a8 100644 --- a/programs/twap_oracle/src/create_price_observations.rs +++ b/programs/twap_oracle/src/create_price_observations.rs @@ -1,5 +1,5 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{Account, AccountWithMetadata, Data}, program::{AccountPostState, Claim, ProgramId}, }; @@ -99,7 +99,7 @@ pub fn create_price_observations( #[cfg(test)] mod tests { - use nssa_core::account::{AccountId, Nonce}; + use lee_core::account::{AccountId, Nonce}; use super::*; diff --git a/programs/twap_oracle/src/publish_price.rs b/programs/twap_oracle/src/publish_price.rs index 5b6b810..655e31b 100644 --- a/programs/twap_oracle/src/publish_price.rs +++ b/programs/twap_oracle/src/publish_price.rs @@ -1,5 +1,5 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{AccountPostState, ProgramId}, }; @@ -210,7 +210,7 @@ pub fn publish_price( #[cfg(test)] mod tests { - use nssa_core::account::{Account, AccountId, Nonce}; + use lee_core::account::{Account, AccountId, Nonce}; use twap_oracle_core::{ compute_current_tick_account_pda, compute_oracle_price_account_pda, compute_price_observations_pda, tick_to_oracle_price, CurrentTickAccount, ObservationEntry, diff --git a/programs/twap_oracle/src/record_tick.rs b/programs/twap_oracle/src/record_tick.rs index 7c7019f..2ef4e26 100644 --- a/programs/twap_oracle/src/record_tick.rs +++ b/programs/twap_oracle/src/record_tick.rs @@ -1,5 +1,5 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{AccountId, AccountWithMetadata, Data}, program::{AccountPostState, ProgramId}, }; @@ -153,7 +153,7 @@ pub fn record_tick( #[cfg(test)] mod tests { - use nssa_core::account::{Account, AccountId, Nonce}; + use lee_core::account::{Account, AccountId, Nonce}; use twap_oracle_core::{ compute_current_tick_account_pda, compute_price_observations_pda, OBSERVATIONS_CAPACITY, }; diff --git a/programs/twap_oracle/src/update_current_tick.rs b/programs/twap_oracle/src/update_current_tick.rs index 8171829..c4317cf 100644 --- a/programs/twap_oracle/src/update_current_tick.rs +++ b/programs/twap_oracle/src/update_current_tick.rs @@ -1,5 +1,5 @@ use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID}; -use nssa_core::{ +use lee_core::{ account::{AccountWithMetadata, Data}, program::{AccountPostState, ProgramId}, }; @@ -61,7 +61,7 @@ pub fn update_current_tick( #[cfg(test)] mod tests { - use nssa_core::account::{Account, AccountId, Nonce}; + use lee_core::account::{Account, AccountId, Nonce}; use twap_oracle_core::compute_current_tick_account_pda; use super::*;