@agoric/fast-usdc 0.1.1-dev-45d0417.0 → 0.1.1-dev-8a52ddd.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 +14 -14
- package/src/fast-usdc.contract.js +18 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agoric/fast-usdc",
|
|
3
|
-
"version": "0.1.1-dev-
|
|
3
|
+
"version": "0.1.1-dev-8a52ddd.0+8a52ddd",
|
|
4
4
|
"description": "CLI and library for Fast USDC product",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
"lint:eslint": "eslint ."
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@agoric/swingset-liveslots": "0.10.3-dev-
|
|
25
|
-
"@agoric/vats": "0.15.2-dev-
|
|
26
|
-
"@agoric/zone": "0.2.3-dev-
|
|
24
|
+
"@agoric/swingset-liveslots": "0.10.3-dev-8a52ddd.0+8a52ddd",
|
|
25
|
+
"@agoric/vats": "0.15.2-dev-8a52ddd.0+8a52ddd",
|
|
26
|
+
"@agoric/zone": "0.2.3-dev-8a52ddd.0+8a52ddd",
|
|
27
27
|
"@fast-check/ava": "^2.0.1",
|
|
28
28
|
"ava": "^5.3.0",
|
|
29
29
|
"c8": "^10.1.2",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
"ts-blank-space": "^0.4.1"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@agoric/client-utils": "0.1.1-dev-
|
|
35
|
-
"@agoric/ertp": "0.16.3-dev-
|
|
36
|
-
"@agoric/internal": "0.3.3-dev-
|
|
37
|
-
"@agoric/notifier": "0.6.3-dev-
|
|
38
|
-
"@agoric/orchestration": "0.1.1-dev-
|
|
39
|
-
"@agoric/store": "0.9.3-dev-
|
|
40
|
-
"@agoric/vat-data": "0.5.3-dev-
|
|
41
|
-
"@agoric/vow": "0.1.1-dev-
|
|
42
|
-
"@agoric/zoe": "0.26.3-dev-
|
|
34
|
+
"@agoric/client-utils": "0.1.1-dev-8a52ddd.0+8a52ddd",
|
|
35
|
+
"@agoric/ertp": "0.16.3-dev-8a52ddd.0+8a52ddd",
|
|
36
|
+
"@agoric/internal": "0.3.3-dev-8a52ddd.0+8a52ddd",
|
|
37
|
+
"@agoric/notifier": "0.6.3-dev-8a52ddd.0+8a52ddd",
|
|
38
|
+
"@agoric/orchestration": "0.1.1-dev-8a52ddd.0+8a52ddd",
|
|
39
|
+
"@agoric/store": "0.9.3-dev-8a52ddd.0+8a52ddd",
|
|
40
|
+
"@agoric/vat-data": "0.5.3-dev-8a52ddd.0+8a52ddd",
|
|
41
|
+
"@agoric/vow": "0.1.1-dev-8a52ddd.0+8a52ddd",
|
|
42
|
+
"@agoric/zoe": "0.26.3-dev-8a52ddd.0+8a52ddd",
|
|
43
43
|
"@cosmjs/proto-signing": "^0.32.4",
|
|
44
44
|
"@cosmjs/stargate": "^0.32.4",
|
|
45
45
|
"@endo/base64": "^1.0.9",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"publishConfig": {
|
|
79
79
|
"access": "public"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "8a52dddcda0af5eaedeca94bebcffd88bb8eebae"
|
|
82
82
|
}
|
|
@@ -30,12 +30,14 @@ import * as flows from './fast-usdc.flows.js';
|
|
|
30
30
|
const trace = makeTracer('FastUsdc');
|
|
31
31
|
|
|
32
32
|
const STATUS_NODE = 'status';
|
|
33
|
+
const FEE_NODE = 'feeConfig';
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* @import {HostInterface} from '@agoric/async-flow';
|
|
36
37
|
* @import {CosmosChainInfo, Denom, DenomDetail, OrchestrationAccount} from '@agoric/orchestration';
|
|
37
38
|
* @import {OrchestrationPowers, OrchestrationTools} from '@agoric/orchestration/src/utils/start-helper.js';
|
|
38
|
-
* @import {
|
|
39
|
+
* @import {Remote} from '@agoric/internal';
|
|
40
|
+
* @import {Marshaller, StorageNode} from '@agoric/internal/src/lib-chainStorage.js'
|
|
39
41
|
* @import {Zone} from '@agoric/zone';
|
|
40
42
|
* @import {OperatorKit} from './exos/operator-kit.js';
|
|
41
43
|
* @import {CctpTxEvidence, FeeConfig} from './types.js';
|
|
@@ -63,6 +65,17 @@ export const meta = {
|
|
|
63
65
|
};
|
|
64
66
|
harden(meta);
|
|
65
67
|
|
|
68
|
+
/**
|
|
69
|
+
* @param {Remote<StorageNode>} node
|
|
70
|
+
* @param {ERef<Marshaller>} marshaller
|
|
71
|
+
* @param {FeeConfig} feeConfig
|
|
72
|
+
*/
|
|
73
|
+
const publishFeeConfig = async (node, marshaller, feeConfig) => {
|
|
74
|
+
const feeNode = E(node).makeChildNode(FEE_NODE);
|
|
75
|
+
const value = await E(marshaller).toCapData(feeConfig);
|
|
76
|
+
return E(feeNode).setValue(JSON.stringify(value));
|
|
77
|
+
};
|
|
78
|
+
|
|
66
79
|
/**
|
|
67
80
|
* @param {ZCF<FastUsdcTerms>} zcf
|
|
68
81
|
* @param {OrchestrationPowers & {
|
|
@@ -80,14 +93,13 @@ export const contract = async (zcf, privateArgs, zone, tools) => {
|
|
|
80
93
|
assert('USDC' in terms.brands, 'no USDC brand');
|
|
81
94
|
assert('usdcDenom' in terms, 'no usdcDenom');
|
|
82
95
|
|
|
83
|
-
const { feeConfig, marshaller } = privateArgs;
|
|
96
|
+
const { feeConfig, marshaller, storageNode } = privateArgs;
|
|
84
97
|
const { makeRecorderKit } = prepareRecorderKitMakers(
|
|
85
98
|
zone.mapStore('vstorage'),
|
|
86
99
|
marshaller,
|
|
87
100
|
);
|
|
88
101
|
|
|
89
|
-
const makeStatusNode = () =>
|
|
90
|
-
E(privateArgs.storageNode).makeChildNode(STATUS_NODE);
|
|
102
|
+
const makeStatusNode = () => E(storageNode).makeChildNode(STATUS_NODE);
|
|
91
103
|
const statusManager = prepareStatusManager(zone, makeStatusNode);
|
|
92
104
|
|
|
93
105
|
const { USDC } = terms.brands;
|
|
@@ -209,6 +221,8 @@ export const contract = async (zcf, privateArgs, zone, tools) => {
|
|
|
209
221
|
// So we use zone.exoClassKit above to define the liquidity pool kind
|
|
210
222
|
// and pass the shareMint into the maker / init function.
|
|
211
223
|
|
|
224
|
+
void publishFeeConfig(storageNode, marshaller, feeConfig);
|
|
225
|
+
|
|
212
226
|
const shareMint = await provideSingleton(
|
|
213
227
|
zone.mapStore('mint'),
|
|
214
228
|
'PoolShare',
|