mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-25 22:21:16 +00:00
refactor: rename nssa/nssa_core → lee/lee_core
Follow the spel fork's `nssa → lee` refactor (chore/update-lez): the `#[lez_program]` macro now emits `lee_core::…` paths, so the crate must be referenced by its real name rather than the `nssa_core` alias. - Cargo.toml: rename the `nssa_core`/`nssa` dep keys to `lee_core`/`lee` and drop the now-redundant `package = "lee_core"`/`package = "lee"` aliases (dep name == package name). - Rust: `nssa_core::` → `lee_core::`, `nssa::` → `lee::` across programs, modules, and tools. - Docs: update the library reference in CLAUDE.md and README.md. Also drop the dead `NSSA_WALLET_HOME_DIR` env var — superseded by `LEE_WALLET_HOME_DIR`, which is the only wallet-home var any v0.2.x wallet reads — from the test tooling (setup-amm-testnet.sh, custom-token.mjs, run-basecamp-e2e.sh) and docs. Closes #225
This commit is contained in:
@@ -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" }
|
||||
|
||||
@@ -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"] }
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::AccountWithMetadata,
|
||||
program::{AccountPostState, ChainedCall, ProgramId},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata},
|
||||
program::{AccountPostState, ChainedCall, Claim, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata},
|
||||
program::{AccountPostState, ChainedCall, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 }
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
}
|
||||
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! instruction.
|
||||
|
||||
use borsh::{BorshDeserialize, BorshSerialize};
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{AccountId, Data},
|
||||
program::{PdaSeed, ProgramId},
|
||||
};
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
//! for collateralization checks.
|
||||
|
||||
use borsh::{BorshDeserialize, BorshSerialize};
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{AccountId, Data},
|
||||
program::{PdaSeed, ProgramId},
|
||||
};
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
//! normalized debt.
|
||||
|
||||
use borsh::{BorshDeserialize, BorshSerialize};
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{AccountId, Data},
|
||||
program::{PdaSeed, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, ChainedCall, Claim, ProgramId},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, ChainedCall, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, ChainedCall, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -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"] }
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{AccountWithMetadata, Data},
|
||||
program::AccountPostState,
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, Claim, ProgramId},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, Claim, ProgramId},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountId, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, Claim},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, Claim},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{AccountId, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{Account, AccountWithMetadata, Data},
|
||||
program::{AccountPostState, Claim},
|
||||
};
|
||||
|
||||
@@ -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" }
|
||||
|
||||
|
||||
@@ -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" }
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use borsh::{BorshDeserialize, BorshSerialize};
|
||||
use nssa_core::{
|
||||
use lee_core::{
|
||||
account::{AccountId, Data},
|
||||
program::{PdaSeed, ProgramId},
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -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::*;
|
||||
|
||||
Reference in New Issue
Block a user