Skip to content

Commit

Permalink
chore: add proposals to update SNS functions
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Nov 12, 2024
1 parent e54e8ae commit 3561fc2
Show file tree
Hide file tree
Showing 9 changed files with 154 additions and 5 deletions.
17 changes: 17 additions & 0 deletions proposals/proposal-220.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Remove the generic function \"admin_set_managers\"";
url = "https://github.com/ldclabs/ic-panda/blob/main/src/ic_panda_luckypool/src/api_admin.rs";
summary = "Remove the generic function \"admin_set_managers\" on ic_panda_luckypool (a7cug-2qaaa-aaaap-ab3la-cai), which validator_method_name is wrong and can not be executed.";
action = opt variant {
RemoveGenericNervousSystemFunction = 1_001
};
}
)' > proposal-message.json

# quill send proposal-message.json
17 changes: 17 additions & 0 deletions proposals/proposal-221.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Remove the generic function \"admin_collect_icp\"";
url = "https://dashboard.internetcomputer.org/sns/d7wvo-iiaaa-aaaaq-aacsq-cai/proposal/5";
summary = "Remove the generic function \"admin_collect_icp\" on ic_panda_luckypool (a7cug-2qaaa-aaaap-ab3la-cai), which validator_method_name is wrong and can not be executed.";
action = opt variant {
RemoveGenericNervousSystemFunction = 1_002
};
}
)' > proposal-message.json

# quill send proposal-message.json
17 changes: 17 additions & 0 deletions proposals/proposal-222.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Remove the generic function \"grant_permission\"";
url = "https://dashboard.internetcomputer.org/sns/d7wvo-iiaaa-aaaaq-aacsq-cai/proposal/10";
summary = "Remove the generic function \"grant_permission\" on ic_panda_frontend (c63a7-6yaaa-aaaap-ab3gq-cai), which is not used.";
action = opt variant {
RemoveGenericNervousSystemFunction = 1_003
};
}
)' > proposal-message.json

# quill send proposal-message.json
17 changes: 17 additions & 0 deletions proposals/proposal-223.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Remove the generic function \"withdraw\"";
url = "https://dashboard.internetcomputer.org/sns/d7wvo-iiaaa-aaaaq-aacsq-cai/proposal/42";
summary = "Remove the generic function \"withdraw\" on ICDex Trader (6sul7-xqaaa-aaaap-ahdsq-cai), which is not used.";
action = opt variant {
RemoveGenericNervousSystemFunction = 1_004
};
}
)' > proposal-message.json

# quill send proposal-message.json
20 changes: 20 additions & 0 deletions proposals/proposal-224.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Deregister ICDex Trader canister";
url = "https://dashboard.internetcomputer.org/sns/d7wvo-iiaaa-aaaaq-aacsq-cai/proposal/40";
summary = "Deregister ICDex Trader canister (6sul7-xqaaa-aaaap-ahdsq-cai), which is not used.";
action = opt variant {
DeregisterDappCanisters = record {
canister_ids = vec {principal "6sul7-xqaaa-aaaap-ahdsq-cai"};
new_controllers = vec { principal "i2gam-uue3y-uxwyd-mzyhb-nirhd-hz3l4-2hw3f-4fzvw-lpvvc-dqdrg-7qe"};
}
};
}
)' > proposal-message.json

# quill send proposal-message.json
29 changes: 29 additions & 0 deletions proposals/proposal-225.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Add a generic function \"admin_collect_tokens\" to transfer PANDA tokens to DAO treasury";
url = "https://github.com/ldclabs/ic-panda/blob/main/src/ic_panda_luckypool/src/api_admin.rs#L39";
summary = "The `admin_collect_tokens` function is used to transfer PANDA tokens from ic_panda_luckypool to DAO treasury.";
action = opt variant {
AddGenericNervousSystemFunction = record {
id = 1_005 : nat64;
name = "`admin_collect_tokens` function";
description = opt "It is used to transfer PANDA tokens to DAO treasury.";
function_type = opt variant {
GenericNervousSystemFunction = record {
validator_canister_id = opt principal "a7cug-2qaaa-aaaap-ab3la-cai";
target_canister_id = opt principal "a7cug-2qaaa-aaaap-ab3la-cai";
validator_method_name = opt "validate_admin_collect_tokens";
target_method_name = opt "admin_collect_tokens";
}
};
}
};
}
)' > proposal-message.json

# quill send proposal-message.json
29 changes: 29 additions & 0 deletions proposals/proposal-226.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal '(
record {
title = "Add a generic function \"admin_collect_icp\" to transfer ICP tokens to DAO treasury";
url = "https://github.com/ldclabs/ic-panda/blob/main/src/ic_panda_luckypool/src/api_admin.rs#L16";
summary = "The `admin_collect_icp` function is used to transfer ICP tokens from ic_panda_luckypool to DAO treasury.";
action = opt variant {
AddGenericNervousSystemFunction = record {
id = 1_006 : nat64;
name = "`admin_collect_tokens` function";
description = opt "It is used to transfer ICP tokens to DAO treasury.";
function_type = opt variant {
GenericNervousSystemFunction = record {
validator_canister_id = opt principal "a7cug-2qaaa-aaaap-ab3la-cai";
target_canister_id = opt principal "a7cug-2qaaa-aaaap-ab3la-cai";
validator_method_name = opt "validate2_admin_collect_icp";
target_method_name = opt "admin_collect_icp";
}
};
}
};
}
)' > proposal-message.json

# quill send proposal-message.json
10 changes: 6 additions & 4 deletions sns_functions.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
1_000 c63a7-6yaaa-aaaap-ab3gq-cai commit_proposed_batch
1_001 a7cug-2qaaa-aaaap-ab3la-cai admin_set_managers
1_002 a7cug-2qaaa-aaaap-ab3la-cai admin_collect_icp
1_003 c63a7-6yaaa-aaaap-ab3gq-cai grant_permission
1_004 6sul7-xqaaa-aaaap-ahdsq-cai withdraw
1_001 a7cug-2qaaa-aaaap-ab3la-cai admin_set_managers // Deprecated
1_002 a7cug-2qaaa-aaaap-ab3la-cai admin_collect_icp // Deprecated
1_003 c63a7-6yaaa-aaaap-ab3gq-cai grant_permission // Deprecated
1_004 6sul7-xqaaa-aaaap-ahdsq-cai withdraw // Deprecated
1_005 a7cug-2qaaa-aaaap-ab3la-cai admin_collect_tokens
1_006 a7cug-2qaaa-aaaap-ab3la-cai admin_collect_icp
1_100 2fvu6-tqaaa-aaaap-akksa-cai commit_proposed_batch
1_101 nscli-qiaaa-aaaaj-qa4pa-cai admin_add_canister
1_102 nscli-qiaaa-aaaaj-qa4pa-cai admin_update_price
Expand Down
3 changes: 2 additions & 1 deletion src/cli_dmsg/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ pub enum Commands {
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
pub struct SendRecords(pub BTreeMap<String, (Principal, u64, u64)>);

// ./target/debug/cli_dmsg send -u zensh -u panda -a 5000 -r debug/records.cbor
// ./target/debug/cli_dmsg blocks -s 0 -l 100 -f any
// ./target/debug/cli_dmsg -i debug/oss.pem send -a 5000 -r debug/records.cbor -u zensh -u panda
#[tokio::main]
async fn main() -> Result<(), String> {
let cli = Cli::parse();
Expand Down

0 comments on commit 3561fc2

Please sign in to comment.