@agoric/builders 0.2.0-upgrade-16-dev-0df76a7.0 → 0.2.0-upgrade-17-dev-a61cdab.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -20
- package/package.json +27 -26
- package/scripts/inter-protocol/add-STARS.js +2 -2
- package/scripts/inter-protocol/manual-price-feed.js +4 -0
- package/scripts/orchestration/init-basic-flows.js +26 -0
- package/scripts/orchestration/init-stakeAtom.js +23 -0
- package/scripts/orchestration/init-stakeBld.js +23 -0
- package/scripts/orchestration/init-stakeOsmo.js +23 -0
- package/scripts/smart-wallet/build-game1-start.js +1 -1
- package/scripts/testing/add-LEMONS.js +23 -0
- package/scripts/testing/add-OLIVES.js +22 -0
- package/scripts/testing/append-chain-info.js +50 -0
- package/scripts/testing/restart-basic-flows.js +100 -0
- package/scripts/testing/restart-send-anywhere.js +100 -0
- package/scripts/testing/restart-stakeAtom.js +90 -0
- package/scripts/testing/restart-valueVow.js +81 -0
- package/scripts/testing/start-auto-stake-it.js +127 -0
- package/scripts/testing/start-query-flows.js +134 -0
- package/scripts/testing/start-send-anywhere.js +135 -0
- package/scripts/testing/start-valueVow.js +92 -0
- package/scripts/testing/tweak-chain-info.js +53 -0
- package/scripts/vats/add-auction.js +12 -2
- package/scripts/vats/init-orchestration.js +20 -0
- package/scripts/vats/upgrade-bank.js +18 -0
- package/scripts/vats/upgrade-orch-core.js +23 -0
- package/scripts/vats/upgrade-provisionPool.js +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,23 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
##
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @agoric/builders
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## [0.2.0-u16.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/builders@0.2.0-u16.0...@agoric/builders@0.2.0-u16.1) (2024-07-10)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @agoric/builders
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
## 0.2.0-u16.0 (2024-07-02)
|
|
6
|
+
## 0.2.0-u17.0 (2024-09-17)
|
|
23
7
|
|
|
24
8
|
|
|
25
9
|
### ⚠ BREAKING CHANGES
|
|
@@ -31,25 +15,32 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
31
15
|
* smartWallet verstion 2 with watchedPromises ([5ed5107](https://github.com/Agoric/agoric-sdk/commit/5ed51078d39e643d91b572d9c50fad4a276d7ded))
|
|
32
16
|
* a proposal to upgrade scaledPriceAuthorities ([e5ed0ff](https://github.com/Agoric/agoric-sdk/commit/e5ed0ff6abcb83f52b32d49125e21e6e41923ed0))
|
|
33
17
|
* add priceFeed for StkAtom ([6a861df](https://github.com/Agoric/agoric-sdk/commit/6a861dfa14f42b4547a24ba31175a3b1a74c97c1))
|
|
18
|
+
* add transfer method to CosmosOrchestrationAccount ([b1fdde1](https://github.com/Agoric/agoric-sdk/commit/b1fdde18b33237d1a2ea6f02938d998f55ce4d01))
|
|
34
19
|
* add upgrade zcf only proposal ([73e0bb8](https://github.com/Agoric/agoric-sdk/commit/73e0bb830e7612e74c8fb510b909db154d2b2219))
|
|
35
20
|
* auctioneer detects failing priceAuthority; requests new one ([#8691](https://github.com/Agoric/agoric-sdk/issues/8691)) ([8604b01](https://github.com/Agoric/agoric-sdk/commit/8604b011b072d7bef43df59c075bcff9582b8804)), closes [#8696](https://github.com/Agoric/agoric-sdk/issues/8696)
|
|
36
|
-
* **builders:** non-ambient `strictPriceFeedProposalBuilder` in `priceFeedSupport.js` ([
|
|
21
|
+
* **builders:** non-ambient `strictPriceFeedProposalBuilder` in `priceFeedSupport.js` ([95174a2](https://github.com/Agoric/agoric-sdk/commit/95174a23671ed16f7497ef6b0edaa63a54f1343d))
|
|
22
|
+
* examples/auto-stake-it.contract.js ([b87ecba](https://github.com/Agoric/agoric-sdk/commit/b87ecba0ea41f1397dbd513d8e4c541f1299fd3f)), closes [#9042](https://github.com/Agoric/agoric-sdk/issues/9042)
|
|
23
|
+
* include issuerKeywordRecord in start-sendAnywhere.js ([0b97916](https://github.com/Agoric/agoric-sdk/commit/0b9791672f91890a9de13511d0a6e7290d30d4d5))
|
|
37
24
|
* make Network and IBC vats durable ([#8721](https://github.com/Agoric/agoric-sdk/issues/8721)) ([3d13c09](https://github.com/Agoric/agoric-sdk/commit/3d13c09363013e23726c2ac5fa299a8e5344fd8c))
|
|
38
25
|
* new 'builders' package ([00c88ab](https://github.com/Agoric/agoric-sdk/commit/00c88ab1615ed55a3928ae52e332be05a173d1f6))
|
|
26
|
+
* **orchestration:** add init-stakeOsmo.js to support .query tests ([b6df6c2](https://github.com/Agoric/agoric-sdk/commit/b6df6c230a902288f11f6217dbd1ca9701a9a8b6))
|
|
39
27
|
* **orchestration:** add stakeAtom example contract ([82f1901](https://github.com/Agoric/agoric-sdk/commit/82f1901ec6ecf5a802a72023d033609deeb053e1))
|
|
40
28
|
* **orchestration:** create ChainAccount ([ba75ed6](https://github.com/Agoric/agoric-sdk/commit/ba75ed692a565aae5c5124ad5220f6901576532e))
|
|
41
29
|
* **orchestration:** stakeAtom query balance ([9f0ae09](https://github.com/Agoric/agoric-sdk/commit/9f0ae09e389f1750c9e550d5e6893460d1e21d07))
|
|
42
|
-
* repair KREAd contract on zoe upgrade ([
|
|
30
|
+
* repair KREAd contract on zoe upgrade ([84dd229](https://github.com/Agoric/agoric-sdk/commit/84dd2297eb74061b809a11bba3c2d2c5c697219f))
|
|
43
31
|
* **smart-wallet:** upgrade walletFactory for non-vbank assets ([a0c4ecf](https://github.com/Agoric/agoric-sdk/commit/a0c4ecf5d6f1e3874828f5b2fcf38f87cb0619ba))
|
|
44
32
|
* stakeBld contract ([a7e30a4](https://github.com/Agoric/agoric-sdk/commit/a7e30a4e43c00b2916d2d57c70063650e726321f))
|
|
45
33
|
* start a new auction in a3p-integration ([969235b](https://github.com/Agoric/agoric-sdk/commit/969235b18abbd15187e343d5f616f12177d224c4))
|
|
46
34
|
* **vat-transfer:** first cut at working proposal ([2864bd5](https://github.com/Agoric/agoric-sdk/commit/2864bd5c12300c3595df9676bcfde894dbe59b29))
|
|
47
35
|
* **vats:** provide init-localchain ([19e5aed](https://github.com/Agoric/agoric-sdk/commit/19e5aed4e8a2aad667c04023e0aea01712ff9b9c))
|
|
36
|
+
* **vats:** upgrade the orchestration core ([c2d9530](https://github.com/Agoric/agoric-sdk/commit/c2d9530e2d891bd9412969a43a9c5728cc3c2721))
|
|
48
37
|
* Zoe use watchPromise() to wait for contract finish ([#8453](https://github.com/Agoric/agoric-sdk/issues/8453)) ([6388a00](https://github.com/Agoric/agoric-sdk/commit/6388a002b53593f17a8d936d4e937efb7d065d97))
|
|
49
38
|
|
|
50
39
|
|
|
51
40
|
### Bug Fixes
|
|
52
41
|
|
|
53
|
-
* **builders:**
|
|
42
|
+
* **builders:** Overlook inspecific home type ([e499fc4](https://github.com/Agoric/agoric-sdk/commit/e499fc4749b24e4f178e43b401410a0e5f06fb17))
|
|
43
|
+
* **builders:** use proper `oracleBrand` subkey case ([52f02b7](https://github.com/Agoric/agoric-sdk/commit/52f02b75b6706ee455a32ff83617dd5afb7342a7))
|
|
44
|
+
* **orchestration:** makeAccount never resolves when icqEnabled: false ([a74b6a2](https://github.com/Agoric/agoric-sdk/commit/a74b6a27d5108c5e014d546b86c695e3fc8bf2e5))
|
|
54
45
|
* repair storage of zcfBundleCap and add a3p test ([72c7574](https://github.com/Agoric/agoric-sdk/commit/72c75740aff920ffb53231441d0f00a8747400f1))
|
|
55
46
|
* support issuerName separate from keyword in add-collateral-core ([f0b1559](https://github.com/Agoric/agoric-sdk/commit/f0b1559374fe67d10e92f20c85d90a6f07e03cf0))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.2.0-upgrade-
|
|
3
|
+
"version": "0.2.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -23,32 +23,33 @@
|
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/ertp": "0.16.3-upgrade-
|
|
27
|
-
"@agoric/internal": "0.4.0-upgrade-
|
|
28
|
-
"@agoric/notifier": "0.7.0-upgrade-
|
|
29
|
-
"@agoric/smart-wallet": "0.5.4-upgrade-
|
|
30
|
-
"@agoric/vat-data": "0.5.3-upgrade-
|
|
31
|
-
"@agoric/vats": "0.16.0-upgrade-
|
|
32
|
-
"@agoric/zoe": "0.26.3-upgrade-
|
|
33
|
-
"@endo/bundle-source": "^3.
|
|
34
|
-
"@endo/captp": "^4.
|
|
35
|
-
"@endo/eventual-send": "^1.2.
|
|
36
|
-
"@endo/far": "^1.1.
|
|
37
|
-
"@endo/init": "^1.1.
|
|
38
|
-
"@endo/marshal": "^1.5.
|
|
39
|
-
"@endo/promise-kit": "^1.1.
|
|
40
|
-
"@endo/stream": "^1.2.
|
|
26
|
+
"@agoric/ertp": "0.16.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
27
|
+
"@agoric/internal": "0.4.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
28
|
+
"@agoric/notifier": "0.7.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
29
|
+
"@agoric/smart-wallet": "0.5.4-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
30
|
+
"@agoric/vat-data": "0.5.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
31
|
+
"@agoric/vats": "0.16.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
32
|
+
"@agoric/zoe": "0.26.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
33
|
+
"@endo/bundle-source": "^3.4.0",
|
|
34
|
+
"@endo/captp": "^4.3.0",
|
|
35
|
+
"@endo/eventual-send": "^1.2.5",
|
|
36
|
+
"@endo/far": "^1.1.5",
|
|
37
|
+
"@endo/init": "^1.1.4",
|
|
38
|
+
"@endo/marshal": "^1.5.3",
|
|
39
|
+
"@endo/promise-kit": "^1.1.5",
|
|
40
|
+
"@endo/stream": "^1.2.5",
|
|
41
41
|
"import-meta-resolve": "^2.2.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@agoric/
|
|
45
|
-
"@agoric/
|
|
46
|
-
"@agoric/
|
|
47
|
-
"@agoric/
|
|
48
|
-
"@agoric/store": "0.9.3-upgrade-
|
|
49
|
-
"@agoric/swing-store": "0.9.2-upgrade-
|
|
50
|
-
"@agoric/swingset-liveslots": "0.10.3-upgrade-
|
|
51
|
-
"@agoric/time": "0.3.3-upgrade-
|
|
44
|
+
"@agoric/deploy-script-support": "0.10.4-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
45
|
+
"@agoric/governance": "0.10.4-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
46
|
+
"@agoric/inter-protocol": "0.17.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
47
|
+
"@agoric/orchestration": "0.2.0-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
48
|
+
"@agoric/store": "0.9.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
49
|
+
"@agoric/swing-store": "0.9.2-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
50
|
+
"@agoric/swingset-liveslots": "0.10.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
51
|
+
"@agoric/time": "0.3.3-upgrade-17-dev-a61cdab.0+a61cdab",
|
|
52
|
+
"@endo/errors": "^1.2.5",
|
|
52
53
|
"ava": "^5.3.0",
|
|
53
54
|
"c8": "^9.1.0"
|
|
54
55
|
},
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"workerThreads": false
|
|
79
80
|
},
|
|
80
81
|
"typeCoverage": {
|
|
81
|
-
"atLeast":
|
|
82
|
+
"atLeast": 81.8
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "a61cdabb23bd2c846e003dee7326018a7462a929"
|
|
84
85
|
}
|
|
@@ -3,7 +3,7 @@ import { defaultProposalBuilder as vaultProposalBuilder } from './add-collateral
|
|
|
3
3
|
import { defaultProposalBuilder as oraclesProposalBuilder } from './price-feed-core.js';
|
|
4
4
|
|
|
5
5
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
6
|
-
|
|
6
|
+
const starsVaultProposalBuilder = async powers => {
|
|
7
7
|
return vaultProposalBuilder(powers, {
|
|
8
8
|
interchainAssetOptions: {
|
|
9
9
|
// Values for the Stargaze token on Osmosis
|
|
@@ -18,7 +18,7 @@ export const starsVaultProposalBuilder = async powers => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
21
|
-
|
|
21
|
+
const starsOraclesProposalBuilder = async powers => {
|
|
22
22
|
return oraclesProposalBuilder(powers, {
|
|
23
23
|
AGORIC_INSTANCE_NAME: `STARS-USD price feed`,
|
|
24
24
|
IN_BRAND_LOOKUP: ['agoricNames', 'oracleBrand', 'STARS'],
|
|
@@ -48,6 +48,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
48
48
|
|
|
49
49
|
if (!aggregatorInstance) {
|
|
50
50
|
console.log('Autodetecting aggregator instance...');
|
|
51
|
+
// @ts-expect-error inspecific Home type
|
|
51
52
|
const purse = E(home.wallet).getPurse('Default Zoe invite purse');
|
|
52
53
|
const { value } = await E(purse).getCurrentAmount();
|
|
53
54
|
const invitations = value.filter(
|
|
@@ -81,6 +82,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
81
82
|
};
|
|
82
83
|
|
|
83
84
|
console.log('Getting wallet bridge...');
|
|
85
|
+
// @ts-expect-error inspecific Home type
|
|
84
86
|
const bridge = await E(home.wallet).getBridge();
|
|
85
87
|
|
|
86
88
|
// Consume an aggregator invitation for this instance.
|
|
@@ -94,6 +96,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
94
96
|
() => {},
|
|
95
97
|
);
|
|
96
98
|
|
|
99
|
+
// @ts-expect-error inspecific Home type
|
|
97
100
|
const walletAdmin = E(home.wallet).getAdminFacet();
|
|
98
101
|
|
|
99
102
|
console.log('=====================================================');
|
|
@@ -111,6 +114,7 @@ export default async function priceAuthorityFromNotifier(
|
|
|
111
114
|
const orKey = `offerResult ${id}`;
|
|
112
115
|
await E(home.scratch).set(
|
|
113
116
|
orKey,
|
|
117
|
+
// @ts-expect-error inspecific Home type
|
|
114
118
|
E(home.wallet).lookup('offerResult', id),
|
|
115
119
|
);
|
|
116
120
|
console.log(
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { startBasicFlows } from '@agoric/orchestration/src/proposals/start-basic-flows.js';
|
|
3
|
+
|
|
4
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
5
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
6
|
+
return harden({
|
|
7
|
+
sourceSpec: '@agoric/orchestration/src/proposals/start-basic-flows.js',
|
|
8
|
+
getManifestCall: [
|
|
9
|
+
'getManifestForContract',
|
|
10
|
+
{
|
|
11
|
+
installKeys: {
|
|
12
|
+
basicFlows: publishRef(
|
|
13
|
+
install(
|
|
14
|
+
'@agoric/orchestration/src/examples/basic-flows.contract.js',
|
|
15
|
+
),
|
|
16
|
+
),
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default async (homeP, endowments) => {
|
|
24
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
25
|
+
await writeCoreEval(startBasicFlows.name, defaultProposalBuilder);
|
|
26
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
|
|
3
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
4
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
5
|
+
return harden({
|
|
6
|
+
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeAtom.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForStakeAtom',
|
|
9
|
+
{
|
|
10
|
+
installKeys: {
|
|
11
|
+
stakeIca: publishRef(
|
|
12
|
+
install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
|
|
13
|
+
),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default async (homeP, endowments) => {
|
|
21
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
22
|
+
await writeCoreEval('start-stakeAtom', defaultProposalBuilder);
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
|
+
|
|
4
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
5
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) =>
|
|
6
|
+
harden({
|
|
7
|
+
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeBld.js',
|
|
8
|
+
getManifestCall: [
|
|
9
|
+
'getManifestForStakeBld',
|
|
10
|
+
{
|
|
11
|
+
installKeys: {
|
|
12
|
+
stakeBld: publishRef(
|
|
13
|
+
install('@agoric/orchestration/src/examples/stakeBld.contract.js'),
|
|
14
|
+
),
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export default async (homeP, endowments) => {
|
|
21
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
22
|
+
await writeCoreEval('start-stakeBld', defaultProposalBuilder);
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
|
|
3
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
4
|
+
export const defaultProposalBuilder = async ({ publishRef, install }) => {
|
|
5
|
+
return harden({
|
|
6
|
+
sourceSpec: '@agoric/orchestration/src/proposals/start-stakeOsmo.js',
|
|
7
|
+
getManifestCall: [
|
|
8
|
+
'getManifestForStakeOsmo',
|
|
9
|
+
{
|
|
10
|
+
installKeys: {
|
|
11
|
+
stakeIca: publishRef(
|
|
12
|
+
install('@agoric/orchestration/src/examples/stakeIca.contract.js'),
|
|
13
|
+
),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default async (homeP, endowments) => {
|
|
21
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
22
|
+
await writeCoreEval('start-stakeOsmo', defaultProposalBuilder);
|
|
23
|
+
};
|
|
@@ -9,7 +9,7 @@ import { makeHelpers } from '@agoric/deploy-script-support';
|
|
|
9
9
|
import { getManifestForGame1 } from '@agoric/smart-wallet/test/start-game1-proposal.js';
|
|
10
10
|
|
|
11
11
|
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
12
|
-
|
|
12
|
+
const game1ProposalBuilder = async ({ publishRef, install }) => {
|
|
13
13
|
return harden({
|
|
14
14
|
sourceSpec: '@agoric/smart-wallet/test/start-game1-proposal.js',
|
|
15
15
|
getManifestCall: [
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { defaultProposalBuilder as vaultProposalBuilder } from '../inter-protocol/add-collateral-core.js';
|
|
3
|
+
|
|
4
|
+
/** @file This is for use in tests in a3p-integration */
|
|
5
|
+
|
|
6
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
7
|
+
const starsVaultProposalBuilder = async powers => {
|
|
8
|
+
return vaultProposalBuilder(powers, {
|
|
9
|
+
interchainAssetOptions: {
|
|
10
|
+
denom: 'ibc/000C0FFEECAFE000',
|
|
11
|
+
decimalPlaces: 6,
|
|
12
|
+
keyword: 'LEMONS',
|
|
13
|
+
|
|
14
|
+
oracleBrand: 'LEMONS',
|
|
15
|
+
proposedName: 'LEMONS',
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default async (homeP, endowments) => {
|
|
21
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
22
|
+
await writeCoreEval('add-STARS-collateral', starsVaultProposalBuilder);
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
2
|
+
import { defaultProposalBuilder as vaultProposalBuilder } from '../inter-protocol/add-collateral-core.js';
|
|
3
|
+
|
|
4
|
+
/** @file This is for use in tests in a3p-integration */
|
|
5
|
+
|
|
6
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
7
|
+
const stars2VaultProposalBuilder = async powers => {
|
|
8
|
+
return vaultProposalBuilder(powers, {
|
|
9
|
+
interchainAssetOptions: {
|
|
10
|
+
denom: 'ibc/111C0FFEECAFE111',
|
|
11
|
+
decimalPlaces: 6,
|
|
12
|
+
keyword: 'OLIVES',
|
|
13
|
+
oracleBrand: 'OLIVES',
|
|
14
|
+
proposedName: 'OLIVES',
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default async (homeP, endowments) => {
|
|
20
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
21
|
+
await writeCoreEval('add-STARS2-collateral', stars2VaultProposalBuilder);
|
|
22
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/// <reference types="ses" />
|
|
2
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
3
|
+
|
|
4
|
+
/** @type {Record<string, import('@agoric/orchestration/src/chain-info.js').ChainInfo>} */
|
|
5
|
+
const chainInfo = {
|
|
6
|
+
hot: {
|
|
7
|
+
allegedName: 'Hot New Chain',
|
|
8
|
+
chainId: 'hot-1',
|
|
9
|
+
connections: {
|
|
10
|
+
'cosmoshub-4': {
|
|
11
|
+
id: 'connection-99',
|
|
12
|
+
client_id: '07-tendermint-3',
|
|
13
|
+
counterparty: {
|
|
14
|
+
client_id: '07-tendermint-2',
|
|
15
|
+
connection_id: 'connection-1',
|
|
16
|
+
prefix: {
|
|
17
|
+
key_prefix: '',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
state: 3 /* IBCConnectionState.STATE_OPEN */,
|
|
21
|
+
transferChannel: {
|
|
22
|
+
portId: 'transfer',
|
|
23
|
+
channelId: 'channel-1',
|
|
24
|
+
counterPartyChannelId: 'channel-1',
|
|
25
|
+
counterPartyPortId: 'transfer',
|
|
26
|
+
ordering: 1 /* Order.ORDER_UNORDERED */,
|
|
27
|
+
state: 3 /* IBCConnectionState.STATE_OPEN */,
|
|
28
|
+
version: 'ics20-1',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
36
|
+
export const defaultProposalBuilder = async () =>
|
|
37
|
+
harden({
|
|
38
|
+
sourceSpec: '@agoric/orchestration/src/proposals/revise-chain-info.js',
|
|
39
|
+
getManifestCall: [
|
|
40
|
+
'getManifestForReviseChains',
|
|
41
|
+
{
|
|
42
|
+
chainInfo,
|
|
43
|
+
},
|
|
44
|
+
],
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export default async (homeP, endowments) => {
|
|
48
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
49
|
+
await writeCoreEval('revise-chain-info', defaultProposalBuilder);
|
|
50
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This is for use in tests.
|
|
3
|
+
* Unlike most builder scripts, this one includes the proposal exports as well.
|
|
4
|
+
*/
|
|
5
|
+
import {
|
|
6
|
+
deeplyFulfilledObject,
|
|
7
|
+
makeTracer,
|
|
8
|
+
NonNullish,
|
|
9
|
+
} from '@agoric/internal';
|
|
10
|
+
import { E } from '@endo/far';
|
|
11
|
+
|
|
12
|
+
/// <reference types="@agoric/vats/src/core/types-ambient"/>
|
|
13
|
+
|
|
14
|
+
const trace = makeTracer('RestartBasicFlows', true);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @import {start as StartFn} from '@agoric/orchestration/src/examples/basic-flows.contract.js';
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {BootstrapPowers} powers
|
|
22
|
+
*/
|
|
23
|
+
export const restartBasicFlows = async ({
|
|
24
|
+
consume: {
|
|
25
|
+
agoricNames,
|
|
26
|
+
board,
|
|
27
|
+
chainStorage,
|
|
28
|
+
chainTimerService,
|
|
29
|
+
cosmosInterchainService,
|
|
30
|
+
localchain,
|
|
31
|
+
|
|
32
|
+
contractKits,
|
|
33
|
+
},
|
|
34
|
+
instance: instances,
|
|
35
|
+
}) => {
|
|
36
|
+
trace(restartBasicFlows.name);
|
|
37
|
+
|
|
38
|
+
// @ts-expect-error unknown instance
|
|
39
|
+
const instance = await instances.consume.basicFlows;
|
|
40
|
+
trace('instance', instance);
|
|
41
|
+
/** @type {StartedInstanceKit<StartFn>} */
|
|
42
|
+
const kit = /** @type {any} */ (await E(contractKits).get(instance));
|
|
43
|
+
|
|
44
|
+
const marshaller = await E(board).getReadonlyMarshaller();
|
|
45
|
+
|
|
46
|
+
const privateArgs = await deeplyFulfilledObject(
|
|
47
|
+
harden({
|
|
48
|
+
agoricNames,
|
|
49
|
+
localchain,
|
|
50
|
+
marshaller,
|
|
51
|
+
orchestrationService: cosmosInterchainService,
|
|
52
|
+
storageNode: E(NonNullish(await chainStorage)).makeChildNode(
|
|
53
|
+
'basicFlows',
|
|
54
|
+
),
|
|
55
|
+
timerService: chainTimerService,
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
await E(kit.adminFacet).restartContract(privateArgs);
|
|
60
|
+
trace('done');
|
|
61
|
+
};
|
|
62
|
+
harden(restartBasicFlows);
|
|
63
|
+
|
|
64
|
+
export const getManifest = () => {
|
|
65
|
+
return {
|
|
66
|
+
manifest: {
|
|
67
|
+
[restartBasicFlows.name]: {
|
|
68
|
+
consume: {
|
|
69
|
+
agoricNames: true,
|
|
70
|
+
board: true,
|
|
71
|
+
chainStorage: true,
|
|
72
|
+
chainTimerService: true,
|
|
73
|
+
cosmosInterchainService: true,
|
|
74
|
+
localchain: true,
|
|
75
|
+
|
|
76
|
+
contractKits: true,
|
|
77
|
+
},
|
|
78
|
+
instance: {
|
|
79
|
+
consume: { basicFlows: true },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
87
|
+
export const defaultProposalBuilder = async () =>
|
|
88
|
+
harden({
|
|
89
|
+
// Somewhat unorthodox, source the exports from this builder module
|
|
90
|
+
sourceSpec: '@agoric/builders/scripts/testing/restart-basic-flows.js',
|
|
91
|
+
getManifestCall: [getManifest.name],
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export default async (homeP, endowments) => {
|
|
95
|
+
// import dynamically so the module can work in CoreEval environment
|
|
96
|
+
const dspModule = await import('@agoric/deploy-script-support');
|
|
97
|
+
const { makeHelpers } = dspModule;
|
|
98
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
99
|
+
await writeCoreEval(restartBasicFlows.name, defaultProposalBuilder);
|
|
100
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file This is for use in tests in a3p-integration
|
|
3
|
+
* Unlike most builder scripts, this one includes the proposal exports as well.
|
|
4
|
+
*/
|
|
5
|
+
import {
|
|
6
|
+
deeplyFulfilledObject,
|
|
7
|
+
makeTracer,
|
|
8
|
+
NonNullish,
|
|
9
|
+
} from '@agoric/internal';
|
|
10
|
+
import { E } from '@endo/far';
|
|
11
|
+
|
|
12
|
+
/// <reference types="@agoric/vats/src/core/types-ambient"/>
|
|
13
|
+
|
|
14
|
+
const trace = makeTracer('StartSA', true);
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @import {start as StartFn} from '@agoric/orchestration/src/examples/send-anywhere.contract.js';
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @param {BootstrapPowers} powers
|
|
22
|
+
*/
|
|
23
|
+
export const restartSendAnywhere = async ({
|
|
24
|
+
consume: {
|
|
25
|
+
agoricNames,
|
|
26
|
+
board,
|
|
27
|
+
chainStorage,
|
|
28
|
+
chainTimerService,
|
|
29
|
+
cosmosInterchainService,
|
|
30
|
+
localchain,
|
|
31
|
+
|
|
32
|
+
contractKits,
|
|
33
|
+
},
|
|
34
|
+
instance: instances,
|
|
35
|
+
}) => {
|
|
36
|
+
trace(restartSendAnywhere.name);
|
|
37
|
+
|
|
38
|
+
// @ts-expect-error unknown instance
|
|
39
|
+
const instance = await instances.consume.sendAnywhere;
|
|
40
|
+
trace('instance', instance);
|
|
41
|
+
/** @type {StartedInstanceKit<StartFn>} */
|
|
42
|
+
const kit = /** @type {any} */ (await E(contractKits).get(instance));
|
|
43
|
+
|
|
44
|
+
const marshaller = await E(board).getReadonlyMarshaller();
|
|
45
|
+
|
|
46
|
+
const privateArgs = await deeplyFulfilledObject(
|
|
47
|
+
harden({
|
|
48
|
+
agoricNames,
|
|
49
|
+
localchain,
|
|
50
|
+
marshaller,
|
|
51
|
+
orchestrationService: cosmosInterchainService,
|
|
52
|
+
storageNode: E(NonNullish(await chainStorage)).makeChildNode(
|
|
53
|
+
'sendAnywhere',
|
|
54
|
+
),
|
|
55
|
+
timerService: chainTimerService,
|
|
56
|
+
}),
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
await E(kit.adminFacet).restartContract(privateArgs);
|
|
60
|
+
trace('done');
|
|
61
|
+
};
|
|
62
|
+
harden(restartSendAnywhere);
|
|
63
|
+
|
|
64
|
+
export const getManifest = () => {
|
|
65
|
+
return {
|
|
66
|
+
manifest: {
|
|
67
|
+
[restartSendAnywhere.name]: {
|
|
68
|
+
consume: {
|
|
69
|
+
agoricNames: true,
|
|
70
|
+
board: true,
|
|
71
|
+
chainStorage: true,
|
|
72
|
+
chainTimerService: true,
|
|
73
|
+
cosmosInterchainService: true,
|
|
74
|
+
localchain: true,
|
|
75
|
+
|
|
76
|
+
contractKits: true,
|
|
77
|
+
},
|
|
78
|
+
instance: {
|
|
79
|
+
consume: { sendAnywhere: true },
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
87
|
+
export const defaultProposalBuilder = async () =>
|
|
88
|
+
harden({
|
|
89
|
+
// Somewhat unorthodox, source the exports from this builder module
|
|
90
|
+
sourceSpec: '@agoric/builders/scripts/testing/restart-send-anywhere.js',
|
|
91
|
+
getManifestCall: [getManifest.name],
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
export default async (homeP, endowments) => {
|
|
95
|
+
// import dynamically so the module can work in CoreEval environment
|
|
96
|
+
const dspModule = await import('@agoric/deploy-script-support');
|
|
97
|
+
const { makeHelpers } = dspModule;
|
|
98
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
99
|
+
await writeCoreEval(restartSendAnywhere.name, defaultProposalBuilder);
|
|
100
|
+
};
|