From 74d78b3d94c7167bc9b523007fe392c43642b289 Mon Sep 17 00:00:00 2001 From: Max Murphy Date: Thu, 5 Dec 2024 16:55:17 +0100 Subject: [PATCH] ++ --- Cargo.lock | 12 ++++++++++++ Cargo.toml | 3 +++ Dockerfile | 6 ++++++ src/cycles_ledger/pic/Cargo.toml | 12 ++++++++++++ src/cycles_ledger/pic/src/lib.rs | 1 + 5 files changed, 34 insertions(+) create mode 100644 src/cycles_ledger/pic/Cargo.toml create mode 100644 src/cycles_ledger/pic/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index bf359cb30e..de9465f108 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1514,6 +1514,18 @@ dependencies = [ "serde_bytes", ] +[[package]] +name = "ic-cycles-ledger-pic" +version = "0.1.0" +dependencies = [ + "candid", + "ic-cdk 0.16.0", + "ic-cycles-ledger-types", + "pocket-ic", + "serde", + "serde_bytes", +] + [[package]] name = "ic-cycles-ledger-types" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index cf03d6231b..7808141cd8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "src/backend", "src/cycles_ledger/client", + "src/cycles_ledger/pic", "src/cycles_ledger/types", "src/shared" ] @@ -12,6 +13,8 @@ ic-cdk = "0.16.0" ic-cdk-macros = "0.16.0" ic-cdk-timers = "0.9.0" ic-cycles-ledger-client = { path = "src/cycles_ledger/client" } +ic-cycles-ledger-pic = { path = "src/cycles_ledger/pic" } +ic-cycles-ledger-types = { path = "src/cycles_ledger/types" } ic-ledger-types = "0.13.0" ic-stable-structures = "0.6.7" ic-metrics-encoder = "1.1.1" diff --git a/Dockerfile b/Dockerfile index 75876e8ffa..48ab7ad7b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,12 +51,18 @@ COPY Cargo.lock . COPY Cargo.toml . COPY src/backend/Cargo.toml src/backend/Cargo.toml COPY src/cycles_ledger/client/Cargo.toml src/cycles_ledger/client/Cargo.toml +COPY src/cycles_ledger/pic/Cargo.toml src/cycles_ledger/pic/Cargo.toml +COPY src/cycles_ledger/types/Cargo.toml src/cycles_ledger/types/Cargo.toml COPY src/shared/Cargo.toml src/shared/Cargo.toml ENV CARGO_TARGET_DIR=/cargo_target RUN mkdir -p src/backend/src \ && touch src/backend/src/lib.rs \ && mkdir -p src/cycles_ledger/client/src \ && touch src/cycles_ledger/client/src/lib.rs \ + && mkdir -p src/cycles_ledger/pic/src \ + && touch src/cycles_ledger/pic/src/lib.rs \ + && mkdir -p src/cycles_ledger/types/src \ + && touch src/cycles_ledger/types/src/lib.rs \ && mkdir -p src/shared/src \ && touch src/shared/src/lib.rs \ && ./docker/build --only-dependencies \ diff --git a/src/cycles_ledger/pic/Cargo.toml b/src/cycles_ledger/pic/Cargo.toml new file mode 100644 index 0000000000..22e83f1c53 --- /dev/null +++ b/src/cycles_ledger/pic/Cargo.toml @@ -0,0 +1,12 @@ +[package] +name = "ic-cycles-ledger-pic" +version = "0.1.0" +edition = "2021" + +[dependencies] +candid = { workspace = true } +ic-cdk = { workspace = true } +ic-cycles-ledger-types = { workspace = true } +pocket-ic = { workspace = true } +serde = { workspace = true } +serde_bytes = { workspace = true } diff --git a/src/cycles_ledger/pic/src/lib.rs b/src/cycles_ledger/pic/src/lib.rs new file mode 100644 index 0000000000..c0e200439e --- /dev/null +++ b/src/cycles_ledger/pic/src/lib.rs @@ -0,0 +1 @@ +//! TODO: Generate pic bindings.