mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-26 14:41:12 +00:00
refactor!: Update dependencies and implement new required features across multiple modules
- Updated `nssa_core` and `spel-framework` dependencies to their respective release candidates in `Cargo.toml` and `Cargo.lock` files for `amm`, `ata`, and `token` modules. - Enhanced the `new_definition` function in `amm/src/new_definition.rs` to include new claim logic and updated PDA seed calculations. - Modified tests in `integration_tests/tests/amm.rs`, `integration_tests/tests/ata.rs`, and `integration_tests/tests/token.rs` to accommodate changes in transaction handling and account initialization. - Refactored account initialization logic in `ata/src/create.rs` and `token/src/initialize.rs` to include authorization claims. - Updated various functions in `token/src/mint.rs`, `token/src/new_definition.rs`, and `token/src/transfer.rs` to utilize the new claim system for account states. - Adjusted the IDL generation tool to use the latest version of `spel-framework-core`.
This commit is contained in:
committed by
r4bbit
parent
6c86b5b9ce
commit
471abef719
Generated
+7
-7
@@ -1744,7 +1744,7 @@ checksum = "a5b0c77c1b780822bc749a33e39aeb2c07584ab93332303babeabb645298a76e"
|
||||
[[package]]
|
||||
name = "nssa_core"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/logos-blockchain/logos-execution-zone.git?rev=ffcbc15972adbf557939bf3e2852af276422631b#ffcbc15972adbf557939bf3e2852af276422631b"
|
||||
source = "git+https://github.com/logos-blockchain/logos-execution-zone.git?tag=v0.2.0-rc1#35d8df0d031315219f94d1546ceb862b0e5b208f"
|
||||
dependencies = [
|
||||
"base58",
|
||||
"borsh",
|
||||
@@ -2863,8 +2863,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "spel-framework"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/logos-co/spel.git?rev=57201f64b4542bb3f592bc9a0aa654c47aa908a6#57201f64b4542bb3f592bc9a0aa654c47aa908a6"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/logos-co/spel.git?tag=v0.2.0-rc.2#9005e9fbbd78b0530412f9987273f753ed32eb2d"
|
||||
dependencies = [
|
||||
"borsh",
|
||||
"nssa_core",
|
||||
@@ -2874,8 +2874,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "spel-framework-core"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/logos-co/spel.git?rev=57201f64b4542bb3f592bc9a0aa654c47aa908a6#57201f64b4542bb3f592bc9a0aa654c47aa908a6"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/logos-co/spel.git?tag=v0.2.0-rc.2#9005e9fbbd78b0530412f9987273f753ed32eb2d"
|
||||
dependencies = [
|
||||
"borsh",
|
||||
"nssa_core",
|
||||
@@ -2887,8 +2887,8 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "spel-framework-macros"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/logos-co/spel.git?rev=57201f64b4542bb3f592bc9a0aa654c47aa908a6#57201f64b4542bb3f592bc9a0aa654c47aa908a6"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/logos-co/spel.git?tag=v0.2.0-rc.2#9005e9fbbd78b0530412f9987273f753ed32eb2d"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
|
||||
@@ -10,8 +10,8 @@ name = "token"
|
||||
path = "src/bin/token.rs"
|
||||
|
||||
[dependencies]
|
||||
spel-framework = { git = "https://github.com/logos-co/spel.git", rev = "57201f64b4542bb3f592bc9a0aa654c47aa908a6", package = "spel-framework" }
|
||||
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", rev = "ffcbc15972adbf557939bf3e2852af276422631b" }
|
||||
spel-framework = { git = "https://github.com/logos-co/spel.git", tag = "v0.2.0-rc.2", package = "spel-framework" }
|
||||
nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.git", tag = "v0.2.0-rc1" }
|
||||
risc0-zkvm = { version = "=3.0.5", default-features = false }
|
||||
token_core = { path = "../../core" }
|
||||
token_program = { path = "../..", package = "token_program" }
|
||||
|
||||
@@ -11,6 +11,7 @@ mod token {
|
||||
use super::*;
|
||||
|
||||
/// Transfer tokens from sender to recipient.
|
||||
/// Fresh public recipients must be explicitly authorized in the same transaction.
|
||||
#[instruction]
|
||||
pub fn transfer(
|
||||
sender: AccountWithMetadata,
|
||||
@@ -25,6 +26,7 @@ mod token {
|
||||
}
|
||||
|
||||
/// Create a new fungible token definition without metadata.
|
||||
/// Definition and holding targets must be uninitialized and authorized.
|
||||
#[instruction]
|
||||
pub fn new_fungible_definition(
|
||||
definition_target_account: AccountWithMetadata,
|
||||
@@ -43,6 +45,7 @@ mod token {
|
||||
}
|
||||
|
||||
/// Create a new fungible or non-fungible token definition with metadata.
|
||||
/// Definition, holding, and metadata targets must be uninitialized and authorized.
|
||||
#[instruction]
|
||||
pub fn new_definition_with_metadata(
|
||||
definition_target_account: AccountWithMetadata,
|
||||
@@ -63,6 +66,7 @@ mod token {
|
||||
}
|
||||
|
||||
/// Initialize a token holding account for a given token definition.
|
||||
/// The holding target must be uninitialized and authorized.
|
||||
#[instruction]
|
||||
pub fn initialize_account(
|
||||
definition_account: AccountWithMetadata,
|
||||
@@ -91,6 +95,7 @@ mod token {
|
||||
}
|
||||
|
||||
/// Mint new tokens to the holder's account.
|
||||
/// Fresh public holders must be explicitly authorized in the same transaction.
|
||||
#[instruction]
|
||||
pub fn mint(
|
||||
definition_account: AccountWithMetadata,
|
||||
@@ -105,6 +110,7 @@ mod token {
|
||||
}
|
||||
|
||||
/// Print a new NFT from the master copy.
|
||||
/// The printed copy target must be uninitialized and authorized.
|
||||
#[instruction]
|
||||
pub fn print_nft(
|
||||
master_account: AccountWithMetadata,
|
||||
|
||||
Reference in New Issue
Block a user