mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-05-18 23:19:30 +00:00
feat(ata): integrate token-ids package and update dependencies
This commit is contained in:
parent
3bf91d42ef
commit
f3aa7b51c8
5
Cargo.lock
generated
5
Cargo.lock
generated
@ -3200,12 +3200,17 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "token-ids"
|
||||
version = "0.1.0"
|
||||
|
||||
[[package]]
|
||||
name = "token-methods"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"risc0-build",
|
||||
"risc0-zkvm",
|
||||
"token-ids",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
[workspace]
|
||||
members = [
|
||||
"token/ids",
|
||||
"token/core",
|
||||
"token",
|
||||
"token/methods",
|
||||
|
||||
9
ata/methods/guest/Cargo.lock
generated
9
ata/methods/guest/Cargo.lock
generated
@ -281,7 +281,7 @@ dependencies = [
|
||||
"risc0-zkvm",
|
||||
"serde",
|
||||
"spel-framework",
|
||||
"token-methods",
|
||||
"token-ids",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
@ -3147,13 +3147,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "token-methods"
|
||||
name = "token-ids"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"risc0-build",
|
||||
"risc0-zkvm",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "token_core"
|
||||
|
||||
@ -15,7 +15,7 @@ nssa_core = { git = "https://github.com/logos-blockchain/logos-execution-zone.gi
|
||||
risc0-zkvm = { version = "=3.0.5", default-features = false }
|
||||
ata_core = { path = "../../core" }
|
||||
ata_program = { path = "../..", package = "ata_program" }
|
||||
token-methods = { path = "../../../token/methods" }
|
||||
token-ids = { path = "../../../token/ids" }
|
||||
token_core = { path = "../../../token/core" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
borsh = "1.5"
|
||||
|
||||
@ -24,7 +24,7 @@ mod ata {
|
||||
token_definition,
|
||||
ata_account,
|
||||
ata_program_id,
|
||||
token_methods::TOKEN_ID,
|
||||
token_ids::TOKEN_ID,
|
||||
);
|
||||
Ok(SpelOutput::with_chained_calls(post_states, chained_calls))
|
||||
}
|
||||
@ -45,7 +45,7 @@ mod ata {
|
||||
sender_ata,
|
||||
recipient,
|
||||
ata_program_id,
|
||||
token_methods::TOKEN_ID,
|
||||
token_ids::TOKEN_ID,
|
||||
amount,
|
||||
);
|
||||
Ok(SpelOutput::with_chained_calls(post_states, chained_calls))
|
||||
@ -66,7 +66,7 @@ mod ata {
|
||||
holder_ata,
|
||||
token_definition,
|
||||
ata_program_id,
|
||||
token_methods::TOKEN_ID,
|
||||
token_ids::TOKEN_ID,
|
||||
amount,
|
||||
);
|
||||
Ok(SpelOutput::with_chained_calls(post_states, chained_calls))
|
||||
|
||||
4
token/ids/Cargo.toml
Normal file
4
token/ids/Cargo.toml
Normal file
@ -0,0 +1,4 @@
|
||||
[package]
|
||||
name = "token-ids"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
3
token/ids/src/lib.rs
Normal file
3
token/ids/src/lib.rs
Normal file
@ -0,0 +1,3 @@
|
||||
pub const TOKEN_ID: [u32; 8] = [
|
||||
437848389, 692033004, 1799570421, 2462683779, 3620810328, 646372816, 1484372518, 2025744330,
|
||||
];
|
||||
@ -10,5 +10,8 @@ risc0-build = "=3.0.5"
|
||||
risc0-zkvm = { version = "=3.0.5", features = ["std"] }
|
||||
token_core = { path = "../core" }
|
||||
|
||||
[dev-dependencies]
|
||||
token-ids = { path = "../ids" }
|
||||
|
||||
[package.metadata.risc0]
|
||||
methods = ["guest"]
|
||||
|
||||
@ -1 +1,9 @@
|
||||
include!(concat!(env!("OUT_DIR"), "/methods.rs"));
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn token_ids_match_generated_method_id() {
|
||||
assert_eq!(token_ids::TOKEN_ID, super::TOKEN_ID);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user