@agoric/builders 0.1.1-dev-8f9f075.0 → 0.1.1-dev-059601c.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/builders",
3
- "version": "0.1.1-dev-8f9f075.0+8f9f075",
3
+ "version": "0.1.1-dev-059601c.0+059601c",
4
4
  "description": "Build scripts for proposals to an Agoric chain",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -23,14 +23,14 @@
23
23
  "author": "Agoric",
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@agoric/ertp": "0.16.3-dev-8f9f075.0+8f9f075",
27
- "@agoric/fast-usdc": "0.1.1-dev-8f9f075.0+8f9f075",
28
- "@agoric/internal": "0.3.3-dev-8f9f075.0+8f9f075",
29
- "@agoric/notifier": "0.6.3-dev-8f9f075.0+8f9f075",
30
- "@agoric/smart-wallet": "0.5.4-dev-8f9f075.0+8f9f075",
31
- "@agoric/vat-data": "0.5.3-dev-8f9f075.0+8f9f075",
32
- "@agoric/vats": "0.15.2-dev-8f9f075.0+8f9f075",
33
- "@agoric/zoe": "0.26.3-dev-8f9f075.0+8f9f075",
26
+ "@agoric/ertp": "0.16.3-dev-059601c.0+059601c",
27
+ "@agoric/fast-usdc": "0.1.1-dev-059601c.0+059601c",
28
+ "@agoric/internal": "0.3.3-dev-059601c.0+059601c",
29
+ "@agoric/notifier": "0.6.3-dev-059601c.0+059601c",
30
+ "@agoric/smart-wallet": "0.5.4-dev-059601c.0+059601c",
31
+ "@agoric/vat-data": "0.5.3-dev-059601c.0+059601c",
32
+ "@agoric/vats": "0.15.2-dev-059601c.0+059601c",
33
+ "@agoric/zoe": "0.26.3-dev-059601c.0+059601c",
34
34
  "@endo/bundle-source": "^3.5.0",
35
35
  "@endo/captp": "^4.4.3",
36
36
  "@endo/eventual-send": "^1.2.8",
@@ -43,14 +43,14 @@
43
43
  "import-meta-resolve": "^2.2.1"
44
44
  },
45
45
  "devDependencies": {
46
- "@agoric/deploy-script-support": "0.10.4-dev-8f9f075.0+8f9f075",
47
- "@agoric/governance": "0.10.4-dev-8f9f075.0+8f9f075",
48
- "@agoric/inter-protocol": "0.16.2-dev-8f9f075.0+8f9f075",
49
- "@agoric/orchestration": "0.1.1-dev-8f9f075.0+8f9f075",
50
- "@agoric/store": "0.9.3-dev-8f9f075.0+8f9f075",
51
- "@agoric/swing-store": "0.9.2-dev-8f9f075.0+8f9f075",
52
- "@agoric/swingset-liveslots": "0.10.3-dev-8f9f075.0+8f9f075",
53
- "@agoric/time": "0.3.3-dev-8f9f075.0+8f9f075",
46
+ "@agoric/deploy-script-support": "0.10.4-dev-059601c.0+059601c",
47
+ "@agoric/governance": "0.10.4-dev-059601c.0+059601c",
48
+ "@agoric/inter-protocol": "0.16.2-dev-059601c.0+059601c",
49
+ "@agoric/orchestration": "0.1.1-dev-059601c.0+059601c",
50
+ "@agoric/store": "0.9.3-dev-059601c.0+059601c",
51
+ "@agoric/swing-store": "0.9.2-dev-059601c.0+059601c",
52
+ "@agoric/swingset-liveslots": "0.10.3-dev-059601c.0+059601c",
53
+ "@agoric/time": "0.3.3-dev-059601c.0+059601c",
54
54
  "@endo/errors": "^1.2.8",
55
55
  "ava": "^5.3.0",
56
56
  "c8": "^10.1.2"
@@ -83,5 +83,5 @@
83
83
  "typeCoverage": {
84
84
  "atLeast": 90.93
85
85
  },
86
- "gitHead": "8f9f07501c1e5f25103d0a015f2f2817275391f2"
86
+ "gitHead": "059601c7e5961085634c8553c4998dc9043e1792"
87
87
  }
@@ -0,0 +1,126 @@
1
+ import { makeHelpers } from '@agoric/deploy-script-support';
2
+ import { getManifestForUpgradingMintHolder } from '@agoric/vats/src/proposals/upgrade-mintHolder-proposal.js';
3
+
4
+ const configurations = {
5
+ A3P_INTEGRATION: {
6
+ labelList: [
7
+ 'USDC_axl',
8
+ 'USDT_grv',
9
+ 'DAI_axl',
10
+ 'DAI_grv',
11
+ 'stATOM',
12
+ 'USDC_grv',
13
+ 'ATOM',
14
+ 'USDT_axl',
15
+ 'USDC',
16
+ 'BLD',
17
+ ],
18
+ },
19
+ MAINNET: {
20
+ labelList: [
21
+ 'USDT',
22
+ 'USDT_axl',
23
+ 'USDT_grv',
24
+ 'USDC',
25
+ 'USDC_axl',
26
+ 'USDC_grv',
27
+ 'DAI_axl',
28
+ 'DAI_grv',
29
+ 'ATOM',
30
+ 'stATOM',
31
+ 'stkATOM',
32
+ 'stTIA',
33
+ 'stOSMO',
34
+ ],
35
+ },
36
+ DEVNET: {
37
+ labelList: [
38
+ 'stATOM3',
39
+ 'stATOM',
40
+ 'dATOM',
41
+ 'stOSMO',
42
+ 'stkATOM',
43
+ 'stATOM2',
44
+ 'STOSMO',
45
+ 'stTIA',
46
+ 'ATOM',
47
+ 'AUSD',
48
+ 'USDT_grv',
49
+ 'USDC_axl',
50
+ 'USDC_grv',
51
+ 'USDT_axl',
52
+ 'BLD',
53
+ ],
54
+ },
55
+ EMERYNET: {
56
+ labelList: [
57
+ 'ATOM',
58
+ 'USDT',
59
+ 'DAI_axl',
60
+ 'DAI_grv',
61
+ 'USDC_axl',
62
+ 'stOSMO',
63
+ 'stATOM',
64
+ 'stkATOM',
65
+ 'stOSMO2',
66
+ 'ToyUSD',
67
+ 'BLD',
68
+ ],
69
+ },
70
+ };
71
+
72
+ const { keys } = Object;
73
+ const knownVariants = keys(configurations);
74
+
75
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').CoreEvalBuilder} */
76
+ export const defaultProposalBuilder = async ({ publishRef, install }, opts) => {
77
+ const config = opts.config || configurations[opts.variant];
78
+ if (!config) {
79
+ const error = `Unknown variant "${opts.variant}". Expected one of ${knownVariants.join(', ')}`;
80
+ console.error(error);
81
+ throw Error(error);
82
+ }
83
+ const { labelList } = config;
84
+
85
+ return harden({
86
+ sourceSpec: '@agoric/vats/src/proposals/upgrade-mintHolder-proposal.js',
87
+ getManifestCall: [
88
+ getManifestForUpgradingMintHolder.name,
89
+ {
90
+ labelList,
91
+ contractRef: publishRef(install('@agoric/vats/src/mintHolder.js')),
92
+ },
93
+ ],
94
+ });
95
+ };
96
+
97
+ const Usage = `agoric run upgrade-mintHolder.js ${[...knownVariants, '<json-config>'].join(' | ')}`;
98
+
99
+ /** @type {import('@agoric/deploy-script-support/src/externalTypes.js').DeployScriptFunction} */
100
+ export default async (homeP, endowments) => {
101
+ const { scriptArgs } = endowments;
102
+ const variantOrConfig = scriptArgs?.[0];
103
+ console.log('upgrade-mintHolder', variantOrConfig);
104
+
105
+ const opts = {};
106
+
107
+ if (typeof variantOrConfig === 'string') {
108
+ if (variantOrConfig[0] === '{') {
109
+ try {
110
+ opts.config = JSON.parse(variantOrConfig);
111
+ } catch (err) {
112
+ throw Error(`Failed to parse config argument ${variantOrConfig}`);
113
+ }
114
+ } else {
115
+ opts.variant = variantOrConfig;
116
+ }
117
+ } else {
118
+ console.error(Usage);
119
+ throw Error(Usage);
120
+ }
121
+
122
+ const { writeCoreEval } = await makeHelpers(homeP, endowments);
123
+ await writeCoreEval(`upgrade-mintHolder`, utils =>
124
+ defaultProposalBuilder(utils, opts),
125
+ );
126
+ };