Skip to content

Commit 4e3438d

Browse files
committed
chore: patch synthetic-chain
1 parent d713376 commit 4e3438d

File tree

3 files changed

+386
-10
lines changed

3 files changed

+386
-10
lines changed

a3p-integration/package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,17 @@
1313
"lint:types": "find proposals -maxdepth 2 -name package.json -type f -exec ../node_modules/.bin/tsc -p '{}'/.. ';'",
1414
"lint:eslint": "eslint .",
1515
"test": "yarn synthetic-chain test",
16-
"doctor": "yarn synthetic-chain doctor"
16+
"doctor": "yarn synthetic-chain doctor",
17+
"postinstall": "patch-package"
1718
},
1819
"dependencies": {
1920
"@agoric/synthetic-chain": "^0.6.3"
2021
},
2122
"devDependencies": {
2223
"eslint": "^8.57.1",
23-
"npm-run-all": "^4.1.5"
24+
"npm-run-all": "^4.1.5",
25+
"patch-package": "^8.0.1",
26+
"postinstall": "^0.11.2"
2427
},
2528
"packageManager": "[email protected]",
2629
"license": "Apache-2.0"
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
diff --git a/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/env_setup.sh b/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/env_setup.sh
2+
index 8e6a82c..98c9ba9 100755
3+
--- a/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/env_setup.sh
4+
+++ b/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/env_setup.sh
5+
@@ -217,12 +217,16 @@ export SIGN_BROADCAST_OPTS="--keyring-backend=test --chain-id=$CHAINID \
6+
7+
voteLatestProposalAndWait() {
8+
waitForBlock
9+
- proposal=$($binary q gov proposals -o json | jq -r '.proposals | last | if .proposal_id == null then .id else .proposal_id end')
10+
- echo "voteLatestProposalAndWait latest proposal $proposal"
11+
- waitForBlock
12+
- # shellcheck disable=SC2086
13+
- $binary tx gov deposit "$proposal" 50000000ubld $SIGN_BROADCAST_OPTS
14+
+ json=$($binary q gov proposals -o json | jq -r '.proposals | last')
15+
+ proposal=$(echo "$json" | jq -r '.id // .proposal_id')
16+
+ status=$(echo "$json" | jq -r '.proposal.status // .status')
17+
+ echo "voteLatestProposalAndWait latest proposal $proposal (status=$status)"
18+
waitForBlock
19+
+ if [ "$status" = "PROPOSAL_STATUS_DEPOSIT_PERIOD" ]; then
20+
+ # shellcheck disable=SC2086
21+
+ $binary tx gov deposit "$proposal" 50000000ubld $SIGN_BROADCAST_OPTS
22+
+ waitForBlock
23+
+ fi
24+
# shellcheck disable=SC2086
25+
$binary tx gov vote "$proposal" yes $SIGN_BROADCAST_OPTS
26+
waitForBlock
27+
diff --git a/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/run_prepare.sh b/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/run_prepare.sh
28+
index 1307294..850dc12 100755
29+
--- a/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/run_prepare.sh
30+
+++ b/node_modules/@agoric/synthetic-chain/dist/upgrade-test-scripts/run_prepare.sh
31+
@@ -58,10 +58,18 @@ validate_flag=""
32+
if [ "$SKIP_PROPOSAL_VALIDATION" = "true" ]; then
33+
validate_flag="--no-validate"
34+
fi
35+
+if agd tx upgrade | grep -q software-upgrade; then
36+
+ module="upgrade"
37+
+ summary="summary"
38+
+else
39+
+ module="gov submit-proposal"
40+
+ summary="description"
41+
+fi
42+
# shellcheck disable=SC2086
43+
-agd tx gov submit-proposal software-upgrade "$UPGRADE_TO" \
44+
+agd tx $module software-upgrade "$UPGRADE_TO" \
45+
--upgrade-height="$height" --upgrade-info="$info" $validate_flag \
46+
- --title="Upgrade to ${UPGRADE_TO}" --description="upgrades" \
47+
+ --title="Upgrade to ${UPGRADE_TO}" --$summary="upgrades" \
48+
+ --deposit 50000000ubld \
49+
${SIGN_BROADCAST_OPTS="--missing-env-setup"}
50+
waitForBlock
51+

0 commit comments

Comments
 (0)