Skip to content

Commit 6b909c9

Browse files
committed
Update run.sh for verifiable stuff
1 parent 0c6e458 commit 6b909c9

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

run.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,17 @@ deploy() {
6161
deploy_verifiable() {
6262
PROGRAM_NAME=$1
6363
CLUSTER=$2
64-
solana program deploy --use-rpc -u "$CLUSTER" --program-id ./target/deploy/"$PROGRAM_NAME"-keypair.json ./verifiable-builds/"$PROGRAM_NAME".so --with-compute-unit-price 5 --max-sign-attempts 15 && PROGRAM_ID=$(solana-keygen pubkey ./target/deploy/"$PROGRAM_NAME"-keypair.json) && anchor idl init --filepath ./target/idl/"$PROGRAM_NAME".json $PROGRAM_ID --provider.cluster "$CLUSTER"
64+
FEATURES=$3
65+
solana program deploy --use-rpc -u "$CLUSTER" --program-id ./target/deploy/"$PROGRAM_NAME"-keypair.json ./verifiable-builds/"$PROGRAM_NAME".so --with-compute-unit-price 5 --max-sign-attempts 15 &&
66+
PROGRAM_ID=$(solana-keygen pubkey ./target/deploy/"$PROGRAM_NAME"-keypair.json) &&
67+
anchor idl init --filepath ./target/idl/"$PROGRAM_NAME".json $PROGRAM_ID --provider.cluster "$CLUSTER" &&
68+
solana-verify verify-from-repo --remote -u "$CLUSTER" --program-id $PROGRAM_ID https://github.com/metaDAOproject/futarchy --library-name $PROGRAM_NAME -b ellipsislabs/solana:1.17.16 -y -- --features $FEATURES
69+
}
70+
71+
assign_to_multisig() {
72+
PROGRAM_ID=$1
73+
CLUSTER=$2
74+
solana program set-upgrade-authority -u "$CLUSTER" $PROGRAM_ID --new-upgrade-authority 6awyHMshBGVjJ3ozdSJdyyDE1CTAXUwrpNMaRGMsb4sf --skip-new-upgrade-authority-signer-check
6575
}
6676

6777
write_buffer_verifiable() {
@@ -77,6 +87,13 @@ export_verifiable() {
7787
solana-verify export-pda-tx https://github.com/metaDAOproject/futarchy --program-id "$PROGRAM_ID" --uploader 6awyHMshBGVjJ3ozdSJdyyDE1CTAXUwrpNMaRGMsb4sf -b ellipsislabs/solana:1.17.16 --library-name "$PROGRAM_NAME" -- --features $FEATURES
7888
}
7989

90+
verify_local() {
91+
PROGRAM_NAME=$1
92+
PROGRAM_ID=$2
93+
FEATURES=$3
94+
solana-verify verify-from-repo --remote -um --program-id $PROGRAM_ID https://github.com/metaDAOproject/futarchy --library-name $PROGRAM_NAME -b ellipsislabs/solana:1.17.16 -- --features $FEATURES
95+
}
96+
8097
verify() {
8198
PROGRAM_ID=$1
8299
solana-verify remote submit-job --program-id "$PROGRAM_ID" --uploader 6awyHMshBGVjJ3ozdSJdyyDE1CTAXUwrpNMaRGMsb4sf
@@ -167,7 +184,9 @@ case "$1" in
167184
deploy_verifiable) deploy_verifiable "$2" "$3" ;;
168185
write_buffer_verifiable) write_buffer_verifiable "$2" "$3" ;;
169186
export_verifiable) export_verifiable "$2" "$3" "$4" ;;
187+
verify_local) verify_local "$2" "$3" "$4" ;;
170188
verify) verify "$2" ;;
189+
assign_to_multisig) assign_to_multisig "$2" "$3" ;;
171190
upgrade) upgrade "$2" "$3" "$4" ;;
172191
upgrade_idl) upgrade_idl "$2" "$3" "$4" ;;
173192
bankrun) bankrun ;;

0 commit comments

Comments
 (0)