@agoric/builders 0.1.1-dev-429a377.0 → 0.1.1-dev-83191e7.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-429a377.0+429a377",
3
+ "version": "0.1.1-dev-83191e7.0+83191e7",
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-429a377.0+429a377",
27
- "@agoric/fast-usdc": "0.1.1-dev-429a377.0+429a377",
28
- "@agoric/internal": "0.3.3-dev-429a377.0+429a377",
29
- "@agoric/notifier": "0.6.3-dev-429a377.0+429a377",
30
- "@agoric/smart-wallet": "0.5.4-dev-429a377.0+429a377",
31
- "@agoric/vat-data": "0.5.3-dev-429a377.0+429a377",
32
- "@agoric/vats": "0.15.2-dev-429a377.0+429a377",
33
- "@agoric/zoe": "0.26.3-dev-429a377.0+429a377",
26
+ "@agoric/ertp": "0.16.3-dev-83191e7.0+83191e7",
27
+ "@agoric/fast-usdc": "0.1.1-dev-83191e7.0+83191e7",
28
+ "@agoric/internal": "0.3.3-dev-83191e7.0+83191e7",
29
+ "@agoric/notifier": "0.6.3-dev-83191e7.0+83191e7",
30
+ "@agoric/smart-wallet": "0.5.4-dev-83191e7.0+83191e7",
31
+ "@agoric/vat-data": "0.5.3-dev-83191e7.0+83191e7",
32
+ "@agoric/vats": "0.15.2-dev-83191e7.0+83191e7",
33
+ "@agoric/zoe": "0.26.3-dev-83191e7.0+83191e7",
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-429a377.0+429a377",
47
- "@agoric/governance": "0.10.4-dev-429a377.0+429a377",
48
- "@agoric/inter-protocol": "0.16.2-dev-429a377.0+429a377",
49
- "@agoric/orchestration": "0.1.1-dev-429a377.0+429a377",
50
- "@agoric/store": "0.9.3-dev-429a377.0+429a377",
51
- "@agoric/swing-store": "0.9.2-dev-429a377.0+429a377",
52
- "@agoric/swingset-liveslots": "0.10.3-dev-429a377.0+429a377",
53
- "@agoric/time": "0.3.3-dev-429a377.0+429a377",
46
+ "@agoric/deploy-script-support": "0.10.4-dev-83191e7.0+83191e7",
47
+ "@agoric/governance": "0.10.4-dev-83191e7.0+83191e7",
48
+ "@agoric/inter-protocol": "0.16.2-dev-83191e7.0+83191e7",
49
+ "@agoric/orchestration": "0.1.1-dev-83191e7.0+83191e7",
50
+ "@agoric/store": "0.9.3-dev-83191e7.0+83191e7",
51
+ "@agoric/swing-store": "0.9.2-dev-83191e7.0+83191e7",
52
+ "@agoric/swingset-liveslots": "0.10.3-dev-83191e7.0+83191e7",
53
+ "@agoric/time": "0.3.3-dev-83191e7.0+83191e7",
54
54
  "@endo/errors": "^1.2.8",
55
55
  "ava": "^5.3.0",
56
56
  "c8": "^9.1.0"
@@ -83,5 +83,5 @@
83
83
  "typeCoverage": {
84
84
  "atLeast": 89.69
85
85
  },
86
- "gitHead": "429a377fb783471d2bf17ac2ef1b71dbaf8894ff"
86
+ "gitHead": "83191e72b348e6b4123c8c60916cd981bb024d0b"
87
87
  }
@@ -19,12 +19,55 @@ import { parseArgs } from 'node:util';
19
19
  * @import {FastUSDCConfig} from '@agoric/fast-usdc/src/fast-usdc.start.js'
20
20
  */
21
21
 
22
+ const { keys } = Object;
23
+
24
+ /**
25
+ * @type {Record<string, Pick<FastUSDCConfig, 'oracles'>>}
26
+ *
27
+ * TODO: determine OCW operator addresses
28
+ * meanwhile, use price oracle addresses (from updatePriceFeeds.js).
29
+ */
30
+ const configurations = {
31
+ A3P_INTEGRATION: {
32
+ oracles: {
33
+ gov1: 'agoric1ee9hr0jyrxhy999y755mp862ljgycmwyp4pl7q',
34
+ gov2: 'agoric1wrfh296eu2z34p6pah7q04jjuyj3mxu9v98277',
35
+ gov3: 'agoric1ydzxwh6f893jvpaslmaz6l8j2ulup9a7x8qvvq',
36
+ },
37
+ },
38
+ MAINNET: {
39
+ oracles: {
40
+ DSRV: 'agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78',
41
+ Stakin: 'agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p',
42
+ '01node': 'agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8',
43
+ 'Simply Staking': 'agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr',
44
+ P2P: 'agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj',
45
+ },
46
+ },
47
+ DEVNET: {
48
+ oracles: {
49
+ DSRV: 'agoric1lw4e4aas9q84tq0q92j85rwjjjapf8dmnllnft',
50
+ Stakin: 'agoric1zj6vrrrjq4gsyr9lw7dplv4vyejg3p8j2urm82',
51
+ '01node': 'agoric1ra0g6crtsy6r3qnpu7ruvm7qd4wjnznyzg5nu4',
52
+ 'Simply Staking': 'agoric1qj07c7vfk3knqdral0sej7fa6eavkdn8vd8etf',
53
+ P2P: 'agoric10vjkvkmpp9e356xeh6qqlhrny2htyzp8hf88fk',
54
+ },
55
+ },
56
+ EMERYNET: {
57
+ oracles: {
58
+ gov1: 'agoric1ldmtatp24qlllgxmrsjzcpe20fvlkp448zcuce',
59
+ gov2: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang',
60
+ },
61
+ },
62
+ };
63
+
22
64
  /** @type {ParseArgsConfig['options']} */
23
65
  const options = {
24
66
  flatFee: { type: 'string', default: '0.01' },
25
67
  variableRate: { type: 'string', default: '0.01' },
26
68
  maxVariableFee: { type: 'string', default: '5' },
27
69
  contractRate: { type: 'string', default: '0.2' },
70
+ oracleSet: { type: 'string' },
28
71
  oracle: { type: 'string', multiple: true },
29
72
  usdcDenom: {
30
73
  type: 'string',
@@ -32,13 +75,14 @@ const options = {
32
75
  'ibc/FE98AAD68F02F03565E9FA39A5E627946699B2B07115889ED812D8BA639576A9',
33
76
  },
34
77
  };
35
- const oraclesRequiredUsage = 'use --oracle name:address ...';
78
+ const oraclesUsage = 'use --oracle name:address ...';
36
79
  /**
37
80
  * @typedef {{
38
81
  * flatFee: string;
39
82
  * variableRate: string;
40
83
  * maxVariableFee: string;
41
84
  * contractRate: string;
85
+ * oracleSet?: string;
42
86
  * oracle?: string[];
43
87
  * usdcDenom: string;
44
88
  * }} FastUSDCOpts
@@ -82,15 +126,21 @@ export default async (homeP, endowments) => {
82
126
  /** @type {{ values: FastUSDCOpts }} */
83
127
  // @ts-expect-error ensured by options
84
128
  const {
85
- values: { oracle: oracleArgs, usdcDenom, ...fees },
129
+ values: { oracle: oracleArgs, oracleSet, usdcDenom, ...fees },
86
130
  } = parseArgs({ args: scriptArgs, options });
87
131
 
88
132
  const parseOracleArgs = () => {
89
- if (!oracleArgs) throw Error(oraclesRequiredUsage);
133
+ if (oracleSet) {
134
+ if (!(oracleSet in configurations)) {
135
+ throw Error(`${oracleSet} not in ${keys(configurations)}`);
136
+ }
137
+ return configurations[oracleSet].oracles;
138
+ }
139
+ if (!oracleArgs) throw Error(oraclesUsage);
90
140
  return Object.fromEntries(
91
141
  oracleArgs.map(arg => {
92
142
  const result = arg.match(/(?<name>[^:]+):(?<address>.+)/);
93
- if (!(result && result.groups)) throw Error(oraclesRequiredUsage);
143
+ if (!(result && result.groups)) throw Error(oraclesUsage);
94
144
  const { name, address } = result.groups;
95
145
  return [name, address];
96
146
  }),