-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts for submitting proposals to the StorageIndex canister (#6075
- Loading branch information
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Extract the args or use defaults | ||
CANISTER_ID=$1 | ||
SUMMARY=${2:-"Each image, video and file uploaded to OpenChat is stored in a storage bucket canister, so by adding more bucket canisters we increase the total available storage volume and spread the load across more canisters."} | ||
|
||
# Build the title | ||
TITLE="Add canister $CANISTER_ID as a new storage bucket" | ||
|
||
# Set current directory to the scripts root | ||
SCRIPT=$(readlink -f "$0") | ||
SCRIPT_DIR=$(dirname "$SCRIPT") | ||
cd $SCRIPT_DIR/.. | ||
|
||
# add_platform_moderator args | ||
ARGS="(record { canister_id=principal \"$CANISTER_ID\" })" | ||
FUNCTION_ID=5001 | ||
|
||
# Submit the proposal | ||
./make_custom_function_proposal.sh $FUNCTION_ID "$TITLE" "$SUMMARY" "" "$ARGS" |
Empty file.
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,20 @@ | ||
#!/bin/bash | ||
|
||
# Extract the args or use defaults | ||
CANISTER_ID=$1 | ||
SUMMARY=${2:-"Once a storage bucket canister is marked as full it will no longer be used to store new files, but will continue serving existing files."} | ||
|
||
# Build the title | ||
TITLE="Mark storage bucket $CANISTER_ID as full" | ||
|
||
# Set current directory to the scripts root | ||
SCRIPT=$(readlink -f "$0") | ||
SCRIPT_DIR=$(dirname "$SCRIPT") | ||
cd $SCRIPT_DIR/.. | ||
|
||
# add_platform_moderator args | ||
ARGS="(record { bucket=principal \"$CANISTER_ID\"; full=true })" | ||
FUNCTION_ID=5002 | ||
|
||
# Submit the proposal | ||
./make_custom_function_proposal.sh $FUNCTION_ID "$TITLE" "$SUMMARY" "" "$ARGS" |