Skip to content

Commit

Permalink
Bump ic-cdk and fix cycle balance
Browse files Browse the repository at this point in the history
  • Loading branch information
FloorLamp committed Sep 14, 2021
1 parent f1c944e commit 0ae9e43
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/ic_loot_rs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib"]

[dependencies]
ic-types = "0.2.1"
ic-cdk = "0.2.4"
ic-cdk = "0.3.1"
base64 = "0.13.0"
ic-cdk-macros = "0.3.0"
ic-certified-map = "0.1.0"
Expand All @@ -21,4 +21,4 @@ num-traits = "0.2.14"
serde = "1.0.116"
serde_cbor = "0.11"
serde_bytes = "0.11"
serde_with = "1.6.2"
serde_with = "1.6.2"
20 changes: 10 additions & 10 deletions src/ic_loot_rs/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,8 @@ fn get_controllers() -> Vec<Principal> {
}

#[update]
fn get_cycles() -> i64 {
return ic_cdk::api::call::msg_cycles_available();
fn get_cycles() -> u64 {
return ic_cdk::api::canister_balance();
}

#[query]
Expand Down Expand Up @@ -787,17 +787,17 @@ fn export_candid() -> String {
// http://icdrip.io
// STAGING ENVIRONMENT
// ██▓ ▄████▄ ▓█████▄ ██▀███ ██▓ ██▓███
// ██▓ ▄████▄ ▓█████▄ ██▀███ ██▓ ██▓███
// ▓██▒▒██▀ ▀█ ▒██▀ ██▌▓██ ▒ ██▒▓██▒▓██░ ██▒
// ▒██▒▒▓█ ▄ ░██ █▌▓██ ░▄█ ▒▒██▒▓██░ ██▓▒
// ░██░▒▓▓▄ ▄██▒ ░▓█▄ ▌▒██▀▀█▄ ░██░▒██▄█▓▒ ▒
// ░██░▒ ▓███▀ ░ ░▒████▓ ░██▓ ▒██▒░██░▒██▒ ░ ░
// ░▓ ░ ░▒ ▒ ░ ▒▒▓ ▒ ░ ▒▓ ░▒▓░░▓ ▒▓▒░ ░ ░
// ▒ ░ ░ ▒ ░ ▒ ▒ ░▒ ░ ▒░ ▒ ░░▒ ░
// ▒ ░░ ░ ░ ░ ░░ ░ ▒ ░░░
// ░ ░ ░ ░ ░ ░
// ░ ░
// ▒ ░ ░ ▒ ░ ▒ ▒ ░▒ ░ ▒░ ▒ ░░▒ ░
// ▒ ░░ ░ ░ ░ ░░ ░ ▒ ░░░
// ░ ░ ░ ░ ░ ░
// ░ ░
type HeaderField = record { text; text; };
type HttpRequest = record {
Expand Down Expand Up @@ -847,7 +847,7 @@ type DataOfQuery = variant {
Range: record {nat64; nat64};
List: vec nat64;
};
service : {
http_request: (request: HttpRequest) -> (HttpResponse) query;
Expand All @@ -859,7 +859,7 @@ service : {
data_of: (nat64) -> (vec LootData) query;
data_of_many: (DataOfQuery) -> (vec record {nat64; vec LootData;}) query;
get_cycles: () -> (int64);
get_cycles: () -> (nat64);
get_airdrops: () -> (vec record { nat64; bool }) query;
add_airdrops: (vec principal) -> (bool);
name: () -> (text) query;
Expand Down

0 comments on commit 0ae9e43

Please sign in to comment.