-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add proposals to upgrade massaging app to v2.5
- Loading branch information
Showing
22 changed files
with
1,700 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
export CANISTERS_PATH="$(pwd)/.dfx/ic/github" | ||
|
||
quill sns make-upgrade-canister-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE --target-canister-id "ijyxz-wyaaa-aaaaj-qa4qa-cai" --wasm-path "$CANISTERS_PATH/ic_message_profile.wasm.gz" $PROPOSAL_NEURON_ID > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_add_canister\" to ic_message_profile service"; | ||
url = "https://internetcomputer.org/docs/current/developer-docs/daos/sns/managing/sns-asset-canister#sns-genericnervoussystemfunctions"; | ||
summary = "The `admin_add_canister` function is used to add more IC-OSS canisters to the messaging cluster."; | ||
action = opt variant { | ||
AddGenericNervousSystemFunction = record { | ||
id = 1_105 : nat64; | ||
name = "`admin_add_canister` function"; | ||
description = opt "It is used to add more IC-OSS canisters to ic_message_profile service."; | ||
function_type = opt variant { | ||
GenericNervousSystemFunction = record { | ||
validator_canister_id = opt principal "ijyxz-wyaaa-aaaaj-qa4qa-cai"; | ||
target_canister_id = opt principal "ijyxz-wyaaa-aaaaj-qa4qa-cai"; | ||
validator_method_name = opt "validate_admin_add_canister"; | ||
target_method_name = opt "admin_add_canister"; | ||
} | ||
}; | ||
} | ||
}; | ||
} | ||
)' > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
export BLOB="$(didc encode --format blob '(variant { OssCluster }, principal "5szpn-tiaaa-aaaaj-qncoq-cai")')" | ||
|
||
quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "( | ||
record { | ||
title = \"Try again: execute admin_add_canister() to add ic_oss_cluster canister to ic_message_profile service\"; | ||
url = \"https://panda.fans/_/messages\"; | ||
summary = \"This proposal executes admin_add_canister() on ijyxz-wyaaa-aaaaj-qa4qa-cai to add ic_oss_cluster canister to ic_message_profile service.\"; | ||
action = opt variant { | ||
ExecuteGenericNervousSystemFunction = record { | ||
function_id = 1_105 : nat64; | ||
payload = ${BLOB}; | ||
} | ||
}; | ||
} | ||
)" > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
export CANISTERS_PATH="$(pwd)/.dfx/ic/github" | ||
|
||
quill sns make-upgrade-canister-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE --target-canister-id "ijyxz-wyaaa-aaaaj-qa4qa-cai" --wasm-path "$CANISTERS_PATH/ic_message_profile.wasm.gz" $PROPOSAL_NEURON_ID > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
export BLOB="$(didc encode --format blob '(variant { OssCluster }, principal "5szpn-tiaaa-aaaaj-qncoq-cai")')" | ||
|
||
quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "( | ||
record { | ||
title = \"Try again: execute admin_add_canister() to add ic_oss_cluster canister to ic_message_profile service\"; | ||
url = \"https://panda.fans/_/messages\"; | ||
summary = \"This proposal executes admin_add_canister() on ijyxz-wyaaa-aaaaj-qa4qa-cai to add ic_oss_cluster canister to ic_message_profile service.\"; | ||
action = opt variant { | ||
ExecuteGenericNervousSystemFunction = record { | ||
function_id = 1_105 : nat64; | ||
payload = ${BLOB}; | ||
} | ||
}; | ||
} | ||
)" > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
export BLOB="$(didc encode --format blob '(variant { OssBucket }, principal "532er-faaaa-aaaaj-qncpa-cai")')" | ||
|
||
quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "( | ||
record { | ||
title = \"Execute admin_add_canister() to add ic_oss_bucket canister to ic_message_profile service\"; | ||
url = \"https://panda.fans/_/messages\"; | ||
summary = \"This proposal executes admin_add_canister() on ijyxz-wyaaa-aaaaj-qa4qa-cai to add ic_oss_bucket canister to ic_message_profile service.\"; | ||
action = opt variant { | ||
ExecuteGenericNervousSystemFunction = record { | ||
function_id = 1_105 : nat64; | ||
payload = ${BLOB}; | ||
} | ||
}; | ||
} | ||
)" > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
# build and get batch_id, evidence: | ||
# dfx deploy ic_message_frontend --ic --by-proposal | ||
|
||
export BLOB="$(didc encode --format blob '(record {batch_id=15:nat; evidence=blob "\e0\a5\44\45\18\ec\f3\bd\c2\dc\0d\79\5d\f1\be\f9\94\16\72\38\6f\bf\d9\6e\26\73\b3\aa\69\f2\fe\29"})')" | ||
|
||
quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "( | ||
record { | ||
title = \"Execute commit_proposed_batch() to release ic_message_frontend v2.5.0\"; | ||
url = \"https://panda.fans/\"; | ||
summary = \"This proposal executes commit_proposed_batch() on 2fvu6-tqaaa-aaaap-akksa-cai to release ic_message_frontend v2.5.0.\n\n1. feat: Add profile image.\n2. feat: Add profile links.\"; | ||
action = opt variant { | ||
ExecuteGenericNervousSystemFunction = record { | ||
function_id = 1100 : nat64; | ||
payload = ${BLOB}; | ||
} | ||
}; | ||
} | ||
)" > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Load the environment variables | ||
source "$(pwd)"/proposals/env.sh | ||
|
||
# build and get batch_id, evidence: | ||
# dfx deploy ic_message_frontend --ic --by-proposal | ||
|
||
export BLOB="$(didc encode --format blob '(record {batch_id=16:nat; evidence=blob "\f8\33\a3\48\19\f6\46\67\b7\29\0a\84\0d\f0\b7\85\55\54\af\ff\bc\bb\d0\a8\dd\7c\fc\31\63\32\b1\af"})')" | ||
|
||
quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "( | ||
record { | ||
title = \"Execute commit_proposed_batch() to release ic_message_frontend v2.5.1\"; | ||
url = \"https://panda.fans/\"; | ||
summary = \"This proposal executes commit_proposed_batch() on 2fvu6-tqaaa-aaaap-akksa-cai to release ic_message_frontend v2.5.1.\n\n1. fix: Fix CSP header for images.\"; | ||
action = opt variant { | ||
ExecuteGenericNervousSystemFunction = record { | ||
function_id = 1100 : nat64; | ||
payload = ${BLOB}; | ||
} | ||
}; | ||
} | ||
)" > proposal-message.json | ||
|
||
# quill send proposal-message.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
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_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 | ||
1_103 nscli-qiaaa-aaaaj-qa4pa-cai admin_collect_token | ||
1_104 nscli-qiaaa-aaaaj-qa4pa-cai admin_update_price | ||
1_105 ijyxz-wyaaa-aaaaj-qa4qa-cai admin_add_canister |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,5 +81,5 @@ | |
"test": "vitest run" | ||
}, | ||
"type": "module", | ||
"version": "2.5.0" | ||
"version": "2.5.1" | ||
} |
194 changes: 194 additions & 0 deletions
194
src/ic_message_frontend/src/declarations/ic_oss_bucket/ic_oss_bucket.did
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,194 @@ | ||
type BucketInfo = record { | ||
status : int8; | ||
total_chunks : nat64; | ||
trusted_eddsa_pub_keys : vec blob; | ||
managers : vec principal; | ||
name : text; | ||
max_custom_data_size : nat16; | ||
auditors : vec principal; | ||
total_files : nat64; | ||
max_children : nat16; | ||
enable_hash_index : bool; | ||
max_file_size : nat64; | ||
folder_id : nat32; | ||
visibility : nat8; | ||
max_folder_depth : nat8; | ||
trusted_ecdsa_pub_keys : vec blob; | ||
total_folders : nat64; | ||
file_id : nat32; | ||
}; | ||
type CanisterArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs }; | ||
type CanisterStatusResponse = record { | ||
status : CanisterStatusType; | ||
memory_size : nat; | ||
cycles : nat; | ||
settings : DefiniteCanisterSettings; | ||
query_stats : QueryStats; | ||
idle_cycles_burned_per_day : nat; | ||
module_hash : opt blob; | ||
reserved_cycles : nat; | ||
}; | ||
type CanisterStatusType = variant { stopped; stopping; running }; | ||
type CreateFileInput = record { | ||
dek : opt blob; | ||
status : opt int8; | ||
content : opt blob; | ||
custom : opt vec record { text; MetadataValue }; | ||
hash : opt blob; | ||
name : text; | ||
size : opt nat64; | ||
content_type : text; | ||
parent : nat32; | ||
}; | ||
type CreateFileOutput = record { id : nat32; created_at : nat64 }; | ||
type CreateFolderInput = record { name : text; parent : nat32 }; | ||
type DefiniteCanisterSettings = record { | ||
freezing_threshold : nat; | ||
controllers : vec principal; | ||
reserved_cycles_limit : nat; | ||
log_visibility : LogVisibility; | ||
wasm_memory_limit : nat; | ||
memory_allocation : nat; | ||
compute_allocation : nat; | ||
}; | ||
type FileInfo = record { | ||
ex : opt vec record { text; MetadataValue }; | ||
id : nat32; | ||
dek : opt blob; | ||
status : int8; | ||
updated_at : nat64; | ||
custom : opt vec record { text; MetadataValue }; | ||
hash : opt blob; | ||
name : text; | ||
size : nat64; | ||
content_type : text; | ||
created_at : nat64; | ||
filled : nat64; | ||
chunks : nat32; | ||
parent : nat32; | ||
}; | ||
type FolderInfo = record { | ||
id : nat32; | ||
files : vec nat32; | ||
status : int8; | ||
updated_at : nat64; | ||
name : text; | ||
folders : vec nat32; | ||
created_at : nat64; | ||
parent : nat32; | ||
}; | ||
type FolderName = record { id : nat32; name : text }; | ||
type InitArgs = record { | ||
name : text; | ||
max_custom_data_size : nat16; | ||
max_children : nat16; | ||
enable_hash_index : bool; | ||
max_file_size : nat64; | ||
visibility : nat8; | ||
max_folder_depth : nat8; | ||
file_id : nat32; | ||
}; | ||
type LogVisibility = variant { controllers; public }; | ||
type MetadataValue = variant { Int : int; Nat : nat; Blob : blob; Text : text }; | ||
type MoveInput = record { id : nat32; to : nat32; from : nat32 }; | ||
type QueryStats = record { | ||
response_payload_bytes_total : nat; | ||
num_instructions_total : nat; | ||
num_calls_total : nat; | ||
request_payload_bytes_total : nat; | ||
}; | ||
type Result = variant { Ok; Err : text }; | ||
type Result_1 = variant { Ok : vec nat32; Err : text }; | ||
type Result_10 = variant { Ok : vec FileInfo; Err : text }; | ||
type Result_11 = variant { Ok : vec FolderInfo; Err : text }; | ||
type Result_12 = variant { Ok : UpdateFileOutput; Err : text }; | ||
type Result_13 = variant { Ok : UpdateFileChunkOutput; Err : text }; | ||
type Result_14 = variant { Ok : text; Err : text }; | ||
type Result_2 = variant { Ok : CreateFileOutput; Err : text }; | ||
type Result_3 = variant { Ok : bool; Err : text }; | ||
type Result_4 = variant { Ok : BucketInfo; Err : text }; | ||
type Result_5 = variant { Ok : CanisterStatusResponse; Err : text }; | ||
type Result_6 = variant { Ok : vec FolderName; Err : text }; | ||
type Result_7 = variant { Ok : vec record { nat32; blob }; Err : text }; | ||
type Result_8 = variant { Ok : FileInfo; Err : text }; | ||
type Result_9 = variant { Ok : FolderInfo; Err : text }; | ||
type UpdateBucketInput = record { | ||
status : opt int8; | ||
trusted_eddsa_pub_keys : opt vec blob; | ||
name : opt text; | ||
max_custom_data_size : opt nat16; | ||
max_children : opt nat16; | ||
enable_hash_index : opt bool; | ||
max_file_size : opt nat64; | ||
visibility : opt nat8; | ||
max_folder_depth : opt nat8; | ||
trusted_ecdsa_pub_keys : opt vec blob; | ||
}; | ||
type UpdateFileChunkInput = record { | ||
id : nat32; | ||
chunk_index : nat32; | ||
content : blob; | ||
}; | ||
type UpdateFileChunkOutput = record { updated_at : nat64; filled : nat64 }; | ||
type UpdateFileInput = record { | ||
id : nat32; | ||
status : opt int8; | ||
custom : opt vec record { text; MetadataValue }; | ||
hash : opt blob; | ||
name : opt text; | ||
size : opt nat64; | ||
content_type : opt text; | ||
}; | ||
type UpdateFileOutput = record { updated_at : nat64 }; | ||
type UpdateFolderInput = record { | ||
id : nat32; | ||
status : opt int8; | ||
name : opt text; | ||
}; | ||
type UpgradeArgs = record { | ||
max_custom_data_size : opt nat16; | ||
max_children : opt nat16; | ||
enable_hash_index : opt bool; | ||
max_file_size : opt nat64; | ||
max_folder_depth : opt nat8; | ||
}; | ||
service : (opt CanisterArgs) -> { | ||
admin_add_auditors : (vec principal) -> (Result); | ||
admin_add_managers : (vec principal) -> (Result); | ||
admin_remove_auditors : (vec principal) -> (Result); | ||
admin_remove_managers : (vec principal) -> (Result); | ||
admin_set_auditors : (vec principal) -> (Result); | ||
admin_set_managers : (vec principal) -> (Result); | ||
admin_update_bucket : (UpdateBucketInput) -> (Result); | ||
api_version : () -> (nat16) query; | ||
batch_delete_subfiles : (nat32, vec nat32, opt blob) -> (Result_1); | ||
create_file : (CreateFileInput, opt blob) -> (Result_2); | ||
create_folder : (CreateFolderInput, opt blob) -> (Result_2); | ||
delete_file : (nat32, opt blob) -> (Result_3); | ||
delete_folder : (nat32, opt blob) -> (Result_3); | ||
get_bucket_info : (opt blob) -> (Result_4) query; | ||
get_canister_status : () -> (Result_5); | ||
get_file_ancestors : (nat32, opt blob) -> (Result_6) query; | ||
get_file_chunks : (nat32, nat32, opt nat32, opt blob) -> (Result_7) query; | ||
get_file_info : (nat32, opt blob) -> (Result_8) query; | ||
get_file_info_by_hash : (blob, opt blob) -> (Result_8) query; | ||
get_folder_ancestors : (nat32, opt blob) -> (Result_6) query; | ||
get_folder_info : (nat32, opt blob) -> (Result_9) query; | ||
list_files : (nat32, opt nat32, opt nat32, opt blob) -> (Result_10) query; | ||
list_folders : (nat32, opt nat32, opt nat32, opt blob) -> (Result_11) query; | ||
move_file : (MoveInput, opt blob) -> (Result_12); | ||
move_folder : (MoveInput, opt blob) -> (Result_12); | ||
update_file_chunk : (UpdateFileChunkInput, opt blob) -> (Result_13); | ||
update_file_info : (UpdateFileInput, opt blob) -> (Result_12); | ||
update_folder_info : (UpdateFolderInput, opt blob) -> (Result_12); | ||
validate2_admin_set_auditors : (vec principal) -> (Result_14); | ||
validate2_admin_set_managers : (vec principal) -> (Result_14); | ||
validate2_admin_update_bucket : (UpdateBucketInput) -> (Result_14); | ||
validate_admin_add_auditors : (vec principal) -> (Result_14); | ||
validate_admin_add_managers : (vec principal) -> (Result_14); | ||
validate_admin_remove_auditors : (vec principal) -> (Result_14); | ||
validate_admin_remove_managers : (vec principal) -> (Result_14); | ||
validate_admin_set_auditors : (vec principal) -> (Result); | ||
validate_admin_set_managers : (vec principal) -> (Result); | ||
validate_admin_update_bucket : (UpdateBucketInput) -> (Result); | ||
} |
Oops, something went wrong.