mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-06-26 00:49:27 +00:00
fix(ci, programs, privacy_preserving_circuit): properly check programs ci
This commit is contained in:
parent
96b28827f6
commit
9977cc5374
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -104,7 +104,7 @@ jobs:
|
||||
- name: Lint programs
|
||||
env:
|
||||
RISC0_SKIP_BUILD: "1"
|
||||
run: cargo clippy -p "*programs" -- -D warnings
|
||||
run: cargo clippy -p "*program" -- -D warnings
|
||||
|
||||
unit-tests:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
154
Cargo.lock
generated
154
Cargo.lock
generated
@ -106,17 +106,6 @@ version = "0.2.21"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"
|
||||
|
||||
[[package]]
|
||||
name = "amm"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"amm_core",
|
||||
"lee",
|
||||
"lee_core",
|
||||
"programs",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "amm_core"
|
||||
version = "0.1.0"
|
||||
@ -127,6 +116,17 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "amm_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"amm_core",
|
||||
"lee",
|
||||
"lee_core",
|
||||
"programs",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "android_system_properties"
|
||||
version = "0.1.5"
|
||||
@ -514,15 +514,6 @@ version = "0.7.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4858a9d740c5007a9069007c3b4e91152d0506f13c1b31dd49051fd537656156"
|
||||
|
||||
[[package]]
|
||||
name = "associated_token_account"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"associated_token_account_core",
|
||||
"lee_core",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "associated_token_account_core"
|
||||
version = "0.1.0"
|
||||
@ -532,6 +523,15 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "associated_token_account_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"associated_token_account_core",
|
||||
"lee_core",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "astral-tokio-tar"
|
||||
version = "0.6.2"
|
||||
@ -752,14 +752,6 @@ dependencies = [
|
||||
"syn 2.0.117",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "authenticated_transfer"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"authenticated_transfer_core",
|
||||
"lee_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "authenticated_transfer_core"
|
||||
version = "0.1.0"
|
||||
@ -767,6 +759,14 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "authenticated_transfer_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"authenticated_transfer_core",
|
||||
"lee_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.5.1"
|
||||
@ -1147,7 +1147,15 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bridge"
|
||||
name = "bridge_core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bridge_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"authenticated_transfer_core",
|
||||
@ -1156,14 +1164,6 @@ dependencies = [
|
||||
"vault_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bridge_core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bs58"
|
||||
version = "0.5.1"
|
||||
@ -1471,14 +1471,6 @@ version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
|
||||
|
||||
[[package]]
|
||||
name = "clock"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clock_core",
|
||||
"lee_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clock_core"
|
||||
version = "0.1.0"
|
||||
@ -1487,6 +1479,14 @@ dependencies = [
|
||||
"lee_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clock_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clock_core",
|
||||
"lee_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cmov"
|
||||
version = "0.5.4"
|
||||
@ -2672,7 +2672,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
||||
|
||||
[[package]]
|
||||
name = "faucet"
|
||||
name = "faucet_core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "faucet_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"authenticated_transfer_core",
|
||||
@ -2681,14 +2689,6 @@ dependencies = [
|
||||
"vault_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "faucet_core"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "fd-lock"
|
||||
version = "4.0.4"
|
||||
@ -7161,7 +7161,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||
|
||||
[[package]]
|
||||
name = "pinata"
|
||||
name = "pinata_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
@ -7169,7 +7169,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pinata_token"
|
||||
name = "pinata_token_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
@ -7331,7 +7331,7 @@ dependencies = [
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "privacy_preserving_circuit"
|
||||
name = "privacy_preserving_circuit_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
@ -7443,10 +7443,10 @@ dependencies = [
|
||||
name = "programs"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"amm",
|
||||
"amm_core",
|
||||
"associated_token_account",
|
||||
"amm_program",
|
||||
"associated_token_account_core",
|
||||
"associated_token_account_program",
|
||||
"authenticated_transfer_core",
|
||||
"bridge_core",
|
||||
"build_utils",
|
||||
@ -7455,8 +7455,8 @@ dependencies = [
|
||||
"lee",
|
||||
"lee_core",
|
||||
"risc0-zkvm",
|
||||
"token",
|
||||
"token_core",
|
||||
"token_program",
|
||||
"vault_core",
|
||||
]
|
||||
|
||||
@ -9973,14 +9973,6 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
||||
|
||||
[[package]]
|
||||
name = "token"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "token_core"
|
||||
version = "0.1.0"
|
||||
@ -9990,6 +9982,14 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "token_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"lee_core",
|
||||
"token_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.52.3"
|
||||
@ -10786,15 +10786,6 @@ version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
|
||||
|
||||
[[package]]
|
||||
name = "vault"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"authenticated_transfer_core",
|
||||
"lee_core",
|
||||
"vault_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vault_core"
|
||||
version = "0.1.0"
|
||||
@ -10804,6 +10795,15 @@ dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vault_program"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"authenticated_transfer_core",
|
||||
"lee_core",
|
||||
"vault_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.15"
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +1,14 @@
|
||||
[package]
|
||||
name = "privacy_preserving_circuit"
|
||||
name = "privacy_preserving_circuit_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
# Renaming binary to privacy_preserving_circuit for better looking.
|
||||
[[bin]]
|
||||
name = "privacy_preserving_circuit"
|
||||
path = "src/main.rs"
|
||||
|
||||
[lints]
|
||||
workspace = true
|
||||
|
||||
|
||||
@ -67,9 +67,9 @@ artifacts = ["dep:build_utils", "dep:lee"]
|
||||
programs = [
|
||||
"dep:lee_core",
|
||||
"dep:risc0-zkvm",
|
||||
"dep:amm",
|
||||
"dep:associated_token_account",
|
||||
"dep:token",
|
||||
"dep:amm_program",
|
||||
"dep:associated_token_account_program",
|
||||
"dep:token_program",
|
||||
"dep:amm_core",
|
||||
"dep:associated_token_account_core",
|
||||
"dep:authenticated_transfer_core",
|
||||
@ -93,9 +93,9 @@ faucet_core = { workspace = true, optional = true }
|
||||
token_core = { workspace = true, optional = true }
|
||||
vault_core = { workspace = true, optional = true }
|
||||
|
||||
amm = { path = "amm", optional = true }
|
||||
associated_token_account = { path = "associated_token_account", optional = true }
|
||||
token = { path = "token", optional = true }
|
||||
amm_program = { path = "amm", optional = true }
|
||||
associated_token_account_program = { path = "associated_token_account", optional = true }
|
||||
token_program = { path = "token", optional = true }
|
||||
|
||||
[build-dependencies]
|
||||
build_utils = { workspace = true, optional = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "amm"
|
||||
name = "amm_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -41,7 +41,7 @@ fn main() {
|
||||
] = pre_states
|
||||
.try_into()
|
||||
.expect("Transfer instruction requires exactly seven accounts");
|
||||
amm::new_definition::new_definition(
|
||||
amm_program::new_definition::new_definition(
|
||||
pool,
|
||||
vault_a,
|
||||
vault_b,
|
||||
@ -70,7 +70,7 @@ fn main() {
|
||||
] = pre_states
|
||||
.try_into()
|
||||
.expect("Transfer instruction requires exactly seven accounts");
|
||||
amm::add::add_liquidity(
|
||||
amm_program::add::add_liquidity(
|
||||
pool,
|
||||
vault_a,
|
||||
vault_b,
|
||||
@ -100,7 +100,7 @@ fn main() {
|
||||
] = pre_states
|
||||
.try_into()
|
||||
.expect("Transfer instruction requires exactly seven accounts");
|
||||
amm::remove::remove_liquidity(
|
||||
amm_program::remove::remove_liquidity(
|
||||
pool,
|
||||
vault_a,
|
||||
vault_b,
|
||||
@ -122,7 +122,7 @@ fn main() {
|
||||
let [pool, vault_a, vault_b, user_holding_a, user_holding_b] = pre_states
|
||||
.try_into()
|
||||
.expect("SwapExactInput instruction requires exactly five accounts");
|
||||
amm::swap::swap_exact_input(
|
||||
amm_program::swap::swap_exact_input(
|
||||
pool,
|
||||
vault_a,
|
||||
vault_b,
|
||||
@ -141,7 +141,7 @@ fn main() {
|
||||
let [pool, vault_a, vault_b, user_holding_a, user_holding_b] = pre_states
|
||||
.try_into()
|
||||
.expect("SwapExactOutput instruction requires exactly five accounts");
|
||||
amm::swap::swap_exact_output(
|
||||
amm_program::swap::swap_exact_output(
|
||||
pool,
|
||||
vault_a,
|
||||
vault_b,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "associated_token_account"
|
||||
name = "associated_token_account_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -19,7 +19,7 @@ fn main() {
|
||||
let [owner, token_definition, ata_account] = pre_states
|
||||
.try_into()
|
||||
.expect("Create instruction requires exactly three accounts");
|
||||
associated_token_account::create::create_associated_token_account(
|
||||
associated_token_account_program::create::create_associated_token_account(
|
||||
owner,
|
||||
token_definition,
|
||||
ata_account,
|
||||
@ -33,7 +33,7 @@ fn main() {
|
||||
let [owner, sender_ata, recipient] = pre_states
|
||||
.try_into()
|
||||
.expect("Transfer instruction requires exactly three accounts");
|
||||
associated_token_account::transfer::transfer_from_associated_token_account(
|
||||
associated_token_account_program::transfer::transfer_from_associated_token_account(
|
||||
owner,
|
||||
sender_ata,
|
||||
recipient,
|
||||
@ -48,7 +48,7 @@ fn main() {
|
||||
let [owner, holder_ata, token_definition] = pre_states
|
||||
.try_into()
|
||||
.expect("Burn instruction requires exactly three accounts");
|
||||
associated_token_account::burn::burn_from_associated_token_account(
|
||||
associated_token_account_program::burn::burn_from_associated_token_account(
|
||||
owner,
|
||||
holder_ata,
|
||||
token_definition,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "authenticated_transfer"
|
||||
name = "authenticated_transfer_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "bridge"
|
||||
name = "bridge_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "clock"
|
||||
name = "clock_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "faucet"
|
||||
name = "faucet_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "pinata"
|
||||
name = "pinata_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "pinata_token"
|
||||
name = "pinata_token_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "token"
|
||||
name = "token_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
//! for more details.
|
||||
|
||||
use lee_core::program::{ProgramInput, ProgramOutput, read_lee_inputs};
|
||||
use token::core::Instruction;
|
||||
use token_program::core::Instruction;
|
||||
|
||||
fn main() {
|
||||
let (
|
||||
@ -29,13 +29,13 @@ fn main() {
|
||||
let [sender, recipient] = pre_states
|
||||
.try_into()
|
||||
.expect("Transfer instruction requires exactly two accounts");
|
||||
token::transfer::transfer(sender, recipient, balance_to_move)
|
||||
token_program::transfer::transfer(sender, recipient, balance_to_move)
|
||||
}
|
||||
Instruction::NewFungibleDefinition { name, total_supply } => {
|
||||
let [definition_account, holding_account] = pre_states
|
||||
.try_into()
|
||||
.expect("NewFungibleDefinition instruction requires exactly two accounts");
|
||||
token::new_definition::new_fungible_definition(
|
||||
token_program::new_definition::new_fungible_definition(
|
||||
definition_account,
|
||||
holding_account,
|
||||
name,
|
||||
@ -49,7 +49,7 @@ fn main() {
|
||||
let [definition_account, holding_account, metadata_account] = pre_states
|
||||
.try_into()
|
||||
.expect("NewDefinitionWithMetadata instruction requires exactly three accounts");
|
||||
token::new_definition::new_definition_with_metadata(
|
||||
token_program::new_definition::new_definition_with_metadata(
|
||||
definition_account,
|
||||
holding_account,
|
||||
metadata_account,
|
||||
@ -61,25 +61,25 @@ fn main() {
|
||||
let [definition_account, account_to_initialize] = pre_states
|
||||
.try_into()
|
||||
.expect("InitializeAccount instruction requires exactly two accounts");
|
||||
token::initialize::initialize_account(definition_account, account_to_initialize)
|
||||
token_program::initialize::initialize_account(definition_account, account_to_initialize)
|
||||
}
|
||||
Instruction::Burn { amount_to_burn } => {
|
||||
let [definition_account, user_holding_account] = pre_states
|
||||
.try_into()
|
||||
.expect("Burn instruction requires exactly two accounts");
|
||||
token::burn::burn(definition_account, user_holding_account, amount_to_burn)
|
||||
token_program::burn::burn(definition_account, user_holding_account, amount_to_burn)
|
||||
}
|
||||
Instruction::Mint { amount_to_mint } => {
|
||||
let [definition_account, user_holding_account] = pre_states
|
||||
.try_into()
|
||||
.expect("Mint instruction requires exactly two accounts");
|
||||
token::mint::mint(definition_account, user_holding_account, amount_to_mint)
|
||||
token_program::mint::mint(definition_account, user_holding_account, amount_to_mint)
|
||||
}
|
||||
Instruction::PrintNft => {
|
||||
let [master_account, printed_account] = pre_states
|
||||
.try_into()
|
||||
.expect("PrintNft instruction requires exactly two accounts");
|
||||
token::print_nft::print_nft(master_account, printed_account)
|
||||
token_program::print_nft::print_nft(master_account, printed_account)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
[package]
|
||||
name = "vault"
|
||||
name = "vault_program"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
license = { workspace = true }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user