@agoric/builders 0.2.0-u21.0.1 → 0.2.0-u22.1
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 +10 -3
- package/package.json +31 -29
- package/scripts/inter-protocol/withdraw-reserve.build.js +68 -0
- package/scripts/orchestration/axelar-gmp.build.js +8 -1
- package/scripts/orchestration/get-chain-config.js +8 -4
- package/scripts/orchestration/hook-localchain-msg-send.js +30 -0
- package/scripts/bundles/bundle-contractGovernor-js-meta.json +0 -925
- package/scripts/bundles/bundle-contractGovernor.js +0 -1
- package/scripts/bundles/bundle-fluxAggregatorKit-js-meta.json +0 -1085
- package/scripts/bundles/bundle-fluxAggregatorKit.js +0 -1
- package/scripts/bundles/bundle-psm-js-meta.json +0 -920
- package/scripts/bundles/bundle-psm.js +0 -1
- package/scripts/bundles/bundle-scaledPriceAuthority-js-meta.json +0 -995
- package/scripts/bundles/bundle-scaledPriceAuthority.js +0 -1
- package/scripts/bundles/bundle-vaultFactory-js-meta.json +0 -1220
- package/scripts/bundles/bundle-vaultFactory.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,11 +3,15 @@
|
|
|
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
|
-
## 0.2.0-
|
|
6
|
+
## [0.2.0-u22.1](https://github.com/Agoric/agoric-sdk/compare/@agoric/builders@0.2.0-u22.0...@agoric/builders@0.2.0-u22.1) (2025-09-09)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package @agoric/builders
|
|
9
|
+
|
|
10
|
+
## 0.2.0-u22.0 (2025-09-08)
|
|
8
11
|
|
|
9
12
|
### ⚠ BREAKING CHANGES
|
|
10
13
|
|
|
14
|
+
* rm redundant networkConfigs
|
|
11
15
|
* **chainHub:** register and retrieve non-cosmos chains
|
|
12
16
|
* remove orch.makeLocalAccount
|
|
13
17
|
* make Network and IBC vats durable (#8721)
|
|
@@ -49,6 +53,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
49
53
|
* **fast-usdc:** write chain policies to vstorage ([#10532](https://github.com/Agoric/agoric-sdk/issues/10532)) ([9d6cff1](https://github.com/Agoric/agoric-sdk/commit/9d6cff17bb95ce5557758da242ca4646a87ac5b0))
|
|
50
54
|
* fusdc assetInfo and chainInfo by netname ([afb4f34](https://github.com/Agoric/agoric-sdk/commit/afb4f34518124b3809d1df07ea706743fa47f2b1))
|
|
51
55
|
* include issuerKeywordRecord in start-sendAnywhere.js ([0b97916](https://github.com/Agoric/agoric-sdk/commit/0b9791672f91890a9de13511d0a6e7290d30d4d5))
|
|
56
|
+
* **inter-protocol:** Add core-eval builder for depositing reserve withdrawal invitations ([#11678](https://github.com/Agoric/agoric-sdk/issues/11678)) ([754cd9e](https://github.com/Agoric/agoric-sdk/commit/754cd9e5fe69ad4921eb057140c1384f173bb4be)), closes [#11460](https://github.com/Agoric/agoric-sdk/issues/11460) [TypeError#1](https://github.com/Agoric/TypeError/issues/1) [TypeError#1](https://github.com/Agoric/TypeError/issues/1) [TypeError#1](https://github.com/Agoric/TypeError/issues/1) [v39#70001](https://github.com/Agoric/v39/issues/70001) [v39#70001](https://github.com/Agoric/v39/issues/70001) [#1](https://github.com/Agoric/agoric-sdk/issues/1) [v39#70001](https://github.com/Agoric/v39/issues/70001) [#1](https://github.com/Agoric/agoric-sdk/issues/1)
|
|
52
57
|
* make Network and IBC vats durable ([#8721](https://github.com/Agoric/agoric-sdk/issues/8721)) ([3d13c09](https://github.com/Agoric/agoric-sdk/commit/3d13c09363013e23726c2ac5fa299a8e5344fd8c))
|
|
53
58
|
* new 'builders' package ([00c88ab](https://github.com/Agoric/agoric-sdk/commit/00c88ab1615ed55a3928ae52e332be05a173d1f6))
|
|
54
59
|
* **orchestration:** add init-stakeOsmo.js to support .query tests ([b6df6c2](https://github.com/Agoric/agoric-sdk/commit/b6df6c230a902288f11f6217dbd1ca9701a9a8b6))
|
|
@@ -77,7 +82,6 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
77
82
|
* **vats:** upgrade the orchestration core ([c2d9530](https://github.com/Agoric/agoric-sdk/commit/c2d9530e2d891bd9412969a43a9c5728cc3c2721))
|
|
78
83
|
* 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))
|
|
79
84
|
|
|
80
|
-
|
|
81
85
|
### Bug Fixes
|
|
82
86
|
|
|
83
87
|
* **agd:** upgrade all orchestration vats to new liveslots ([59fa82c](https://github.com/Agoric/agoric-sdk/commit/59fa82c4740e1ddace28e1389e3c7c875bcdf93e))
|
|
@@ -91,7 +95,10 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
91
95
|
* validate scriptArgs endowment ([6864614](https://github.com/Agoric/agoric-sdk/commit/68646147d3e95c68b4a90c9e37d888ef00e9d35d))
|
|
92
96
|
* write-chain-info after u17 ([fc1f3ce](https://github.com/Agoric/agoric-sdk/commit/fc1f3ce1fe03bb2018edd4eb55d6561312d5fbe8))
|
|
93
97
|
|
|
94
|
-
|
|
95
98
|
### Reverts
|
|
96
99
|
|
|
97
100
|
* Revert "chore: remove 'encoding' from ChainAddress" ([be9dee2](https://github.com/Agoric/agoric-sdk/commit/be9dee245a04714568a45ae8b328f54b20b43d8a))
|
|
101
|
+
|
|
102
|
+
### Miscellaneous Chores
|
|
103
|
+
|
|
104
|
+
* rm redundant networkConfigs ([8eebb66](https://github.com/Agoric/agoric-sdk/commit/8eebb665132f27f2f3de121f575052d5494e80f9))
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/builders",
|
|
3
|
-
"version": "0.2.0-
|
|
3
|
+
"version": "0.2.0-u22.1",
|
|
4
4
|
"description": "Build scripts for proposals to an Agoric chain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"build:restart-vats-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/restart-vats.js",
|
|
12
12
|
"build:zcf-proposal": "echo This command has been deprecated. Please run this instead: agoric run scripts/vats/replace-zoe.js",
|
|
13
13
|
"prepack": "yarn run -T tsc --build tsconfig.build.json",
|
|
14
|
-
"postpack": "git clean -f '*.d
|
|
14
|
+
"postpack": "git clean -f '*.d.*ts*' '*.tsbuildinfo'",
|
|
15
15
|
"test": "ava",
|
|
16
16
|
"test:xs": "exit 0",
|
|
17
17
|
"lint-fix": "yarn lint:eslint --fix",
|
|
@@ -23,34 +23,36 @@
|
|
|
23
23
|
"author": "Agoric",
|
|
24
24
|
"license": "Apache-2.0",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@agoric/
|
|
27
|
-
"@agoric/
|
|
28
|
-
"@agoric/
|
|
29
|
-
"@agoric/
|
|
30
|
-
"@agoric/
|
|
31
|
-
"@agoric/
|
|
32
|
-
"@agoric/
|
|
33
|
-
"@
|
|
34
|
-
"@endo/
|
|
35
|
-
"@endo/
|
|
36
|
-
"@endo/
|
|
37
|
-
"@endo/
|
|
38
|
-
"@endo/
|
|
39
|
-
"@endo/
|
|
40
|
-
"@endo/
|
|
41
|
-
"@endo/
|
|
26
|
+
"@agoric/client-utils": "0.2.0-u22.1",
|
|
27
|
+
"@agoric/ertp": "0.17.0-u22.1",
|
|
28
|
+
"@agoric/internal": "0.4.0-u22.1",
|
|
29
|
+
"@agoric/notifier": "0.7.0-u22.1",
|
|
30
|
+
"@agoric/smart-wallet": "0.6.0-u22.1",
|
|
31
|
+
"@agoric/vat-data": "0.6.0-u22.1",
|
|
32
|
+
"@agoric/vats": "0.16.0-u22.1",
|
|
33
|
+
"@agoric/zoe": "0.27.0-u22.1",
|
|
34
|
+
"@endo/bundle-source": "^4.1.2",
|
|
35
|
+
"@endo/captp": "^4.4.8",
|
|
36
|
+
"@endo/eventual-send": "^1.3.4",
|
|
37
|
+
"@endo/far": "^1.1.14",
|
|
38
|
+
"@endo/init": "^1.1.12",
|
|
39
|
+
"@endo/marshal": "^1.8.0",
|
|
40
|
+
"@endo/nat": "^5.1.3",
|
|
41
|
+
"@endo/patterns": "^1.7.0",
|
|
42
|
+
"@endo/promise-kit": "^1.1.13",
|
|
43
|
+
"@endo/stream": "^1.2.13",
|
|
42
44
|
"import-meta-resolve": "^4.1.0"
|
|
43
45
|
},
|
|
44
46
|
"devDependencies": {
|
|
45
|
-
"@agoric/deploy-script-support": "0.
|
|
46
|
-
"@agoric/governance": "0.
|
|
47
|
-
"@agoric/inter-protocol": "0.17.0-
|
|
48
|
-
"@agoric/orchestration": "0.2.0-
|
|
49
|
-
"@agoric/store": "0.
|
|
50
|
-
"@agoric/swing-store": "0.10.0-
|
|
51
|
-
"@agoric/swingset-liveslots": "0.
|
|
52
|
-
"@agoric/time": "0.
|
|
53
|
-
"@endo/errors": "^1.2.
|
|
47
|
+
"@agoric/deploy-script-support": "0.11.0-u22.1",
|
|
48
|
+
"@agoric/governance": "0.11.0-u22.1",
|
|
49
|
+
"@agoric/inter-protocol": "0.17.0-u22.1",
|
|
50
|
+
"@agoric/orchestration": "0.2.0-u22.1",
|
|
51
|
+
"@agoric/store": "0.10.0-u22.1",
|
|
52
|
+
"@agoric/swing-store": "0.10.0-u22.1",
|
|
53
|
+
"@agoric/swingset-liveslots": "0.11.0-u22.1",
|
|
54
|
+
"@agoric/time": "0.4.0-u22.1",
|
|
55
|
+
"@endo/errors": "^1.2.13",
|
|
54
56
|
"ava": "^5.3.0",
|
|
55
57
|
"c8": "^10.1.3"
|
|
56
58
|
},
|
|
@@ -80,7 +82,7 @@
|
|
|
80
82
|
"workerThreads": false
|
|
81
83
|
},
|
|
82
84
|
"typeCoverage": {
|
|
83
|
-
"atLeast":
|
|
85
|
+
"atLeast": 89.94
|
|
84
86
|
},
|
|
85
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "83a42d0f343b01448a918631dce159b5bdb69b7e"
|
|
86
88
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
import { parseArgs } from 'node:util';
|
|
3
|
+
import { isNat } from '@endo/nat';
|
|
4
|
+
import { makeHelpers } from '@agoric/deploy-script-support';
|
|
5
|
+
import { getManifestForInviteWithdrawer } from '@agoric/inter-protocol/src/proposals/withdraw-reserve-proposal.js';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @template {{ type: string }} T
|
|
9
|
+
* @typedef { T['type'] extends 'string' ? string : T['type'] extends 'boolean' ? boolean : (string | boolean) } TypeFromParseArgsOptionDescriptor
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @template {Record<string, { type: string, multiple?: boolean }>} T
|
|
14
|
+
* @typedef {{
|
|
15
|
+
* [K in keyof T]: (
|
|
16
|
+
* T[K]['multiple'] extends true
|
|
17
|
+
* ? TypeFromParseArgsOptionDescriptor<T[K]>[]
|
|
18
|
+
* : T[K]['multiple'] extends (false | unknown)
|
|
19
|
+
* ? TypeFromParseArgsOptionDescriptor<T[K]>
|
|
20
|
+
* : (TypeFromParseArgsOptionDescriptor<T[K]>[] | TypeFromParseArgsOptionDescriptor<T[K]>)
|
|
21
|
+
* )
|
|
22
|
+
* }} CliOptions
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const { Fail } = assert;
|
|
26
|
+
|
|
27
|
+
const cliOptions = /** @type {const} */ ({
|
|
28
|
+
address: { type: 'string', multiple: false },
|
|
29
|
+
count: { type: 'string', multiple: false },
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
|
|
33
|
+
export const defaultProposalBuilder = async (
|
|
34
|
+
{ publishRef: _publishRef, install: _install },
|
|
35
|
+
namedArgs = {},
|
|
36
|
+
) => {
|
|
37
|
+
const { address, count } = namedArgs;
|
|
38
|
+
|
|
39
|
+
typeof address === 'string' || Fail`string address is required`;
|
|
40
|
+
if (count !== undefined) {
|
|
41
|
+
isNat(count) || Fail`count must be a safe natural number`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return harden({
|
|
45
|
+
sourceSpec:
|
|
46
|
+
'@agoric/inter-protocol/src/proposals/withdraw-reserve-proposal.js',
|
|
47
|
+
getManifestCall: [getManifestForInviteWithdrawer.name, { address, count }],
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
52
|
+
export default async (homeP, endowments) => {
|
|
53
|
+
const { scriptArgs: argv } = endowments;
|
|
54
|
+
/** @type {{ values: Partial<CliOptions<typeof cliOptions>> }} */
|
|
55
|
+
const { values: rawArgs } = parseArgs({ args: argv, options: cliOptions });
|
|
56
|
+
const { address, count: rawCount } = rawArgs;
|
|
57
|
+
const count = (() => {
|
|
58
|
+
if (rawCount === undefined) return undefined;
|
|
59
|
+
/[0-9]/.test(rawCount) || Fail`--count value must be numeric`;
|
|
60
|
+
return +rawCount;
|
|
61
|
+
})();
|
|
62
|
+
const namedArgs = { address, count };
|
|
63
|
+
|
|
64
|
+
const { writeCoreEval } = await makeHelpers(homeP, endowments);
|
|
65
|
+
await writeCoreEval('withdraw-reserve', utils =>
|
|
66
|
+
defaultProposalBuilder(utils, namedArgs),
|
|
67
|
+
);
|
|
68
|
+
};
|
|
@@ -55,8 +55,15 @@ export default async (homeP, endowments) => {
|
|
|
55
55
|
if (!flags.net) throw Error('--net required');
|
|
56
56
|
if (!flags.peer) throw Error('--peer required');
|
|
57
57
|
|
|
58
|
+
const validNets = ['bootstrap', 'devnet', 'emerynet', 'local'];
|
|
59
|
+
if (!validNets.includes(flags.net)) {
|
|
60
|
+
throw Error(`--net must be one of: ${validNets.join(', ')}`);
|
|
61
|
+
}
|
|
62
|
+
|
|
58
63
|
const chainDetails = await getChainConfig({
|
|
59
|
-
net:
|
|
64
|
+
net: /** @type {'bootstrap' | 'devnet' | 'emerynet' | 'local'} */ (
|
|
65
|
+
flags.net
|
|
66
|
+
),
|
|
60
67
|
peers: flags.peer,
|
|
61
68
|
execFileSync,
|
|
62
69
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IBCConnectionInfoShape } from '@agoric/orchestration/src/typeGuards.js';
|
|
2
2
|
import { mustMatch } from '@endo/patterns';
|
|
3
3
|
import { makeAgd } from '@agoric/orchestration/src/utils/agd-lib.js';
|
|
4
|
-
import { networkConfigs } from '@agoric/orchestration/src/utils/gmp.js';
|
|
5
4
|
import * as childProcess from 'node:child_process';
|
|
6
5
|
import fetchedChainInfo from '@agoric/orchestration/src/fetched-chain-info.js';
|
|
6
|
+
import { fetchNetworkConfig } from '@agoric/client-utils';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @import {IBCChannelID, IBCConnectionID} from '@agoric/vats';
|
|
@@ -24,11 +24,12 @@ const parsePeers = strs => {
|
|
|
24
24
|
return peerParts;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
+
// TODO: Can these be sourced from chain-registry?
|
|
27
28
|
/**
|
|
28
29
|
* Get the IBC chain configuration based on the provided network and peer inputs.
|
|
29
30
|
*
|
|
30
31
|
* @param {object} args - The arguments object.
|
|
31
|
-
* @param {
|
|
32
|
+
* @param {'bootstrap' | 'devnet' |'emerynet' | 'local' } args.net - Agoric network shorthand (e.g., 'emerynet').
|
|
32
33
|
* @param {string[]} args.peers - The peers to connect .
|
|
33
34
|
* @param {childProcess.execFileSync} [args.execFileSync] - Optional execFileSync function.
|
|
34
35
|
* @returns {Promise<Record<string, CosmosChainInfo>>} A promise that resolves to the chain configuration details keyed by chain name.
|
|
@@ -55,8 +56,11 @@ export const getChainConfig = async ({
|
|
|
55
56
|
const connections = {};
|
|
56
57
|
const portId = 'transfer';
|
|
57
58
|
|
|
58
|
-
const { chainId,
|
|
59
|
-
|
|
59
|
+
const { chainName: chainId, rpcAddrs } = await fetchNetworkConfig(net, {
|
|
60
|
+
fetch,
|
|
61
|
+
});
|
|
62
|
+
// XXX execFileSync bad POLA; these queries can be made with `fetch`
|
|
63
|
+
const agd = makeAgd({ execFileSync }).withOpts({ rpcAddrs });
|
|
60
64
|
|
|
61
65
|
for (const [peerName, myConn, myChan, denom] of parsePeers(peers)) {
|
|
62
66
|
console.debug(peerName, { denom });
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
const vatNameToEntrypoint = {
|
|
6
|
+
localchain: '@agoric/vats/src/vat-localchain.js',
|
|
7
|
+
transfer: '@agoric/vats/src/vat-transfer.js',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
return harden({
|
|
11
|
+
sourceSpec: '@agoric/vats/src/proposals/localchain-hook-msg-send.js',
|
|
12
|
+
getManifestCall: [
|
|
13
|
+
'getManifestForMsgSendToTransfer',
|
|
14
|
+
{
|
|
15
|
+
bundleRefs: Object.fromEntries(
|
|
16
|
+
Object.entries(vatNameToEntrypoint).map(
|
|
17
|
+
([name, entrypoint]) =>
|
|
18
|
+
/** @type {const} */ ([name, publishRef(install(entrypoint))]),
|
|
19
|
+
),
|
|
20
|
+
),
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
|
|
27
|
+
export default async (homeP, endowments) => {
|
|
28
|
+
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
|
|
29
|
+
await writeCoreProposal('hook-localchain', defaultProposalBuilder);
|
|
30
|
+
};
|