Skip to content

Commit

Permalink
Add scripts for submitting proposals to the StorageIndex canister (#6075
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hpeebles authored Jul 19, 2024
1 parent 03d09bf commit c2fa7a8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
Empty file.
20 changes: 20 additions & 0 deletions scripts/proposals/add_storage_bucket.sh
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.
20 changes: 20 additions & 0 deletions scripts/proposals/mark_storage_bucket_full.sh
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"

0 comments on commit c2fa7a8

Please sign in to comment.