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:
r4bbit
2026-08-26 12:30:36 +02:00
parent 1d88e6f3c4
commit 75a99d1224
90 changed files with 141 additions and 146 deletions
+2 -2
View File
@@ -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 <IDL> <PROGRAM_FUNCTION> ...` fails, ensure `seq_poll_timeout_millis` is set in the wallet config at `~/.nssa/wallet`.
+2 -2
View File
@@ -34,8 +34,8 @@ exclude = [
resolver = "2"
[workspace.dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
nssa = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["test-utils"], package = "lee" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
lee = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["test-utils"] }
token_core = { path = "programs/token/core" }
token_program = { path = "programs/token" }
amm_core = { path = "programs/amm/core" }
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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)
+2 -4
View File
@@ -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.
-1
View File
@@ -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 &
-2
View File
@@ -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/
+1 -1
View File
@@ -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.4" }
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 }
+1 -1
View File
@@ -1,6 +1,6 @@
use std::str::FromStr;
use nssa_core::{
use lee_core::{
account::{Account, AccountId, Data, Nonce},
program::ProgramId,
};
+1 -1
View File
@@ -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};
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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};
+3 -3
View File
@@ -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<Val
#[cfg(test)]
mod tests {
use amm_core::{compute_config_pda, compute_pool_pda, compute_vault_pda, AmmConfig};
use nssa_core::account::{Account, AccountId, Data};
use lee_core::account::{Account, AccountId, Data};
use super::*;
use crate::account::{account_read, AccountRead};
@@ -657,7 +657,7 @@ mod tests {
}
/// A valid AMM config account read so `derive_pair` succeeds in plan tests.
fn valid_config(amm: nssa_core::program::ProgramId) -> 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 {
+1 -1
View File
@@ -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};
+1 -1
View File
@@ -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;
+3 -3
View File
@@ -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<Va
pub(super) fn program_id(request: ProgramIdRequest) -> Result<Value, String> {
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<Value, String> {
#[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};
+1 -1
View File
@@ -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,
};
+1 -1
View File
@@ -40,7 +40,7 @@ pub(super) fn token_holdings(request: TokenHoldingsRequest) -> Result<Value, Str
#[cfg(test)]
mod tests {
use amm_core::{compute_config_pda, AmmConfig};
use nssa_core::{
use lee_core::{
account::{Account, AccountId, Data},
program::ProgramId,
};
+1 -1
View File
@@ -8,7 +8,7 @@ crate-type = ["cdylib", "rlib"]
[dependencies]
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 }
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountId, Data, Nonce},
program::ProgramId,
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountId},
program::ProgramId,
};
+1 -1
View File
@@ -54,6 +54,6 @@ impl fmt::Display for TokenApiError {
impl Error for TokenApiError {}
fn parse_token_program_id(value: &str) -> Result<nssa_core::program::ProgramId, TokenApiError> {
fn parse_token_program_id(value: &str) -> Result<lee_core::program::ProgramId, TokenApiError> {
parse_program_id(value).map_err(|_| TokenApiError::new("bad_request"))
}
+3 -3
View File
@@ -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<const N: usize>(
program_id: nssa_core::program::ProgramId,
program_id: lee_core::program::ProgramId,
account_ids: [AccountId; N],
signing_requirements: [bool; N],
instruction: Instruction,
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountId, Data, Nonce},
program::ProgramId,
};
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4" }
amm_core = { path = "core" }
token_core = { path = "../token/core" }
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
spel-framework-macros = { git = "https://github.com/logos-co/spel.git", rev = "1ef0500f8fc8ce3ddf95523726ae159db83f744f", package = "spel-framework-macros" }
token_core = { path = "../../token/core" }
borsh = { version = "1.5", features = ["derive"] }
+1 -1
View File
@@ -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},
};
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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::*;
+2 -2
View File
@@ -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::*;
+1 -1
View File
@@ -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},
};
+1 -1
View File
@@ -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},
};
+1 -1
View File
@@ -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},
};
+1 -1
View File
@@ -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},
};
+1 -1
View File
@@ -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},
};
+2 -2
View File
@@ -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::*;
+1 -1
View File
@@ -7,6 +7,6 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
ata_core = { path = "core" }
token_core = { path = "../token/core" }
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
borsh = { version = "1.5", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
risc0-zkvm = { version = "=3.0.5", default-features = false }
+2 -2
View File
@@ -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,
};
+1 -1
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::AccountWithMetadata,
program::{AccountPostState, ChainedCall, ProgramId},
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata},
program::{AccountPostState, ChainedCall, Claim, ProgramId},
};
+7 -7
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata},
program::{AccountPostState, ChainedCall, ProgramId},
};
+2 -2
View File
@@ -11,8 +11,8 @@ edition = "2021"
[workspace]
[dependencies]
nssa = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", package = "lee" }
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4" }
twap_oracle_core = { path = "../twap_oracle/core" }
twap-oracle-methods = { path = "../twap_oracle/methods" }
+7 -7
View File
@@ -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);
+2 -2
View File
@@ -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.4" }
amm_core = { workspace = true }
token_core = { workspace = true }
+6 -6
View File
@@ -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.
+4 -4
View File
@@ -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,10 +1,10 @@
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 stablecoin_core::{
compute_position_pda, compute_position_vault_pda, compute_protocol_parameters_pda,
compute_redemption_price_state_pda, compute_stability_fee_accumulator_pda,
@@ -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 stablecoin_program() -> nssa_core::program::ProgramId {
fn stablecoin_program() -> lee_core::program::ProgramId {
stablecoin_methods::STABLECOIN_ID
}
@@ -281,7 +281,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
+4 -4
View File
@@ -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]
}
+1 -1
View File
@@ -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.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4" }
stablecoin_core = { path = "core" }
token_core = { path = "../token/core" }
+1 -1
View File
@@ -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.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", 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.
+1 -1
View File
@@ -12,7 +12,7 @@ pub mod stability_fee_accumulator;
use borsh::{BorshDeserialize, BorshSerialize};
pub use controller::{run_controller_tick, ControllerOutput, INTEGRAL_CLAMP, RATE_DELTA_CLAMP};
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
@@ -5,7 +5,7 @@
//! `ProgramContext` exposes no clock.
use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID};
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, ChainedCall, ProgramId},
};
@@ -141,7 +141,7 @@ pub(crate) fn read_clock(clock: &AccountWithMetadata) -> u64 {
reason = "tests deliberately panic on bad state via assert!/#[should_panic] and index fixed-size vectors"
)]
mod tests {
use nssa_core::account::{AccountId, Nonce};
use lee_core::account::{AccountId, Nonce};
use stablecoin_core::math::FIXED_POINT_ONE;
use super::*;
@@ -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 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, ChainedCall, Claim, ProgramId},
};
+2 -2
View File
@@ -6,7 +6,7 @@
//! otherwise. A LEZ transaction carries exactly one instruction, so this is the
//! only way to advance both globals in a single transaction.
use nssa_core::{
use lee_core::{
account::AccountWithMetadata,
program::{AccountPostState, ChainedCall, ProgramId},
};
@@ -99,7 +99,7 @@ pub fn refresh_globals(
reason = "tests deliberately panic on bad state via assert!/#[should_panic] and index fixed-size vectors"
)]
mod tests {
use nssa_core::account::AccountId;
use lee_core::account::AccountId;
use stablecoin_core::{
compute_redemption_price_state_pda, compute_stability_fee_accumulator_pda,
math::FIXED_POINT_ONE, RedemptionPriceState, StabilityFeeAccumulator,
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, ChainedCall, ProgramId},
};
+1 -1
View File
@@ -5,7 +5,7 @@
//! otherwise repeat the same fixtures three times.
use clock_core::{ClockAccountData, CLOCK_01_PROGRAM_ACCOUNT_ID};
use nssa_core::{
use lee_core::{
account::{Account, AccountId, AccountWithMetadata, Data, Nonce},
program::ProgramId,
};
+1 -1
View File
@@ -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},
};
@@ -3,7 +3,7 @@
//! Wall-clock time comes from the system `CLOCK_01` account, same as the other
//! pokes.
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, ChainedCall, ProgramId},
};
@@ -193,7 +193,7 @@ pub(crate) fn advance_redemption_price(
reason = "tests deliberately panic on bad state via assert!/#[should_panic] and index fixed-size vectors"
)]
mod tests {
use nssa_core::account::AccountId;
use lee_core::account::AccountId;
use stablecoin_core::math::FIXED_POINT_ONE;
use super::*;
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, ChainedCall, ProgramId},
};
+1 -1
View File
@@ -7,5 +7,5 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
token_core = { path = "core" }
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
spel-framework-macros = { git = "https://github.com/logos-co/spel.git", rev = "1ef0500f8fc8ce3ddf95523726ae159db83f744f", package = "spel-framework-macros" }
borsh = { version = "1.5", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
+1 -1
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{AccountWithMetadata, Data},
program::AccountPostState,
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, Claim, ProgramId},
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, Claim, ProgramId},
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountId, AccountWithMetadata, Data},
program::{AccountPostState, Claim},
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, Claim},
};
+1 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{AccountId, AccountWithMetadata, Data},
program::{AccountPostState, ProgramId},
};
+1 -1
View File
@@ -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 -1
View File
@@ -1,4 +1,4 @@
use nssa_core::{
use lee_core::{
account::{Account, AccountWithMetadata, Data},
program::{AccountPostState, Claim},
};
+1 -1
View File
@@ -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.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
clock_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4" }
twap_oracle_core = { path = "core" }
+1 -1
View File
@@ -7,7 +7,7 @@ edition = "2021"
workspace = true
[dependencies]
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"], package = "lee_core" }
lee_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.4", features = ["host"] }
borsh = { version = "1.5", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
spel-framework-macros = { git = "https://github.com/logos-co/spel.git", rev = "1ef0500f8fc8ce3ddf95523726ae159db83f744f", package = "spel-framework-macros" }
+1 -1
View File
@@ -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::*;
+2 -2
View File
@@ -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,
+2 -2
View File
@@ -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::*;