@agoric/inter-protocol 0.16.2-other-dev-3eb1a1d.0 → 0.16.2-other-dev-d15096d.0.d15096d
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 +36 -35
- package/src/auction/auctionBook.d.ts +9 -7
- package/src/auction/auctionBook.d.ts.map +1 -1
- package/src/auction/auctionBook.js +58 -32
- package/src/auction/auctionMath.d.ts +1 -1
- package/src/auction/auctionMath.d.ts.map +1 -1
- package/src/auction/auctioneer.d.ts +19 -13
- package/src/auction/auctioneer.d.ts.map +1 -1
- package/src/auction/auctioneer.js +25 -12
- package/src/auction/offerBook.d.ts +3 -2
- package/src/auction/offerBook.d.ts.map +1 -1
- package/src/auction/offerBook.js +5 -1
- package/src/auction/params.d.ts +16 -7
- package/src/auction/params.d.ts.map +1 -1
- package/src/auction/params.js +12 -4
- package/src/auction/scheduleMath.d.ts +5 -3
- package/src/auction/scheduleMath.d.ts.map +1 -1
- package/src/auction/scheduleMath.js +11 -7
- package/src/auction/scheduler.d.ts +9 -4
- package/src/auction/scheduler.d.ts.map +1 -1
- package/src/auction/scheduler.js +14 -6
- package/src/auction/util.d.ts +2 -1
- package/src/auction/util.d.ts.map +1 -1
- package/src/auction/util.js +4 -1
- package/src/clientSupport.d.ts +29 -73
- package/src/clientSupport.d.ts.map +1 -1
- package/src/clientSupport.js +29 -128
- package/src/contractSupport.d.ts +2 -2
- package/src/contractSupport.d.ts.map +1 -1
- package/src/econCommitteeCharter.d.ts +15 -8
- package/src/econCommitteeCharter.d.ts.map +1 -1
- package/src/econCommitteeCharter.js +14 -8
- package/src/feeDistributor.d.ts +43 -49
- package/src/feeDistributor.d.ts.map +1 -1
- package/src/feeDistributor.js +7 -3
- package/src/index.js +1 -1
- package/src/interest-math.d.ts +1 -0
- package/src/interest-math.d.ts.map +1 -1
- package/src/interest-math.js +5 -1
- package/src/interest.d.ts +3 -1
- package/src/interest.d.ts.map +1 -1
- package/src/interest.js +2 -5
- package/src/price/README.md +1 -1
- package/src/price/fluxAggregatorContract.d.ts +20 -11
- package/src/price/fluxAggregatorContract.d.ts.map +1 -1
- package/src/price/fluxAggregatorContract.js +17 -9
- package/src/price/fluxAggregatorKit.d.ts +15 -9
- package/src/price/fluxAggregatorKit.d.ts.map +1 -1
- package/src/price/fluxAggregatorKit.js +15 -9
- package/src/price/priceOracleKit.d.ts +4 -2
- package/src/price/priceOracleKit.d.ts.map +1 -1
- package/src/price/priceOracleKit.js +7 -2
- package/src/price/roundsManager.d.ts +8 -6
- package/src/price/roundsManager.d.ts.map +1 -1
- package/src/price/roundsManager.js +5 -2
- package/src/proposals/add-auction.js +38 -4
- package/src/proposals/addAssetToVault.js +8 -4
- package/src/proposals/committee-proposal.js +10 -5
- package/src/proposals/core-proposal.js +9 -3
- package/src/proposals/deploy-price-feeds.js +35 -7
- package/src/proposals/econ-behaviors.js +33 -12
- package/src/proposals/price-feed-proposal.js +10 -3
- package/src/proposals/replace-fee-distributor.js +12 -6
- package/src/proposals/replaceElectorate.js +105 -16
- package/src/proposals/startEconCommittee.js +5 -1
- package/src/proposals/startPSM.js +7 -4
- package/src/proposals/upgrade-vaults.js +15 -5
- package/src/proposals/utils.d.ts +8 -4
- package/src/proposals/utils.d.ts.map +1 -1
- package/src/proposals/utils.js +32 -9
- package/src/proposals/withdraw-reserve-proposal.js +63 -0
- package/src/provisionPool.d.ts +34 -120
- package/src/provisionPool.d.ts.map +1 -1
- package/src/provisionPool.js +43 -21
- package/src/provisionPoolKit.d.ts +43 -328
- package/src/provisionPoolKit.d.ts.map +1 -1
- package/src/provisionPoolKit.js +210 -120
- package/src/psm/psm.d.ts +20 -13
- package/src/psm/psm.d.ts.map +1 -1
- package/src/psm/psm.js +18 -12
- package/src/reserve/assetReserve.d.ts +18 -6
- package/src/reserve/assetReserve.d.ts.map +1 -1
- package/src/reserve/assetReserve.js +26 -23
- package/src/reserve/assetReserveKit.d.ts +38 -6
- package/src/reserve/assetReserveKit.d.ts.map +1 -1
- package/src/reserve/assetReserveKit.js +117 -7
- package/src/reserve/params.d.ts +9 -3
- package/src/reserve/params.d.ts.map +1 -1
- package/src/reserve/params.js +8 -2
- package/src/vaultFactory/burn.d.ts +1 -1
- package/src/vaultFactory/burn.d.ts.map +1 -1
- package/src/vaultFactory/burn.js +1 -1
- package/src/vaultFactory/liquidation.d.ts +7 -3
- package/src/vaultFactory/liquidation.d.ts.map +1 -1
- package/src/vaultFactory/liquidation.js +14 -12
- package/src/vaultFactory/math.d.ts +1 -1
- package/src/vaultFactory/math.d.ts.map +1 -1
- package/src/vaultFactory/math.js +1 -1
- package/src/vaultFactory/orderedVaultStore.d.ts +21 -20
- package/src/vaultFactory/orderedVaultStore.d.ts.map +1 -1
- package/src/vaultFactory/orderedVaultStore.js +4 -2
- package/src/vaultFactory/params.d.ts +25 -9
- package/src/vaultFactory/params.d.ts.map +1 -1
- package/src/vaultFactory/params.js +29 -11
- package/src/vaultFactory/prioritizedVaults.d.ts +70 -69
- package/src/vaultFactory/prioritizedVaults.d.ts.map +1 -1
- package/src/vaultFactory/prioritizedVaults.js +5 -2
- package/src/vaultFactory/storeUtils.d.ts +2 -2
- package/src/vaultFactory/storeUtils.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.d.ts +2 -2
- package/src/vaultFactory/types-ambient.d.ts.map +1 -1
- package/src/vaultFactory/types-ambient.js +6 -2
- package/src/vaultFactory/vault.d.ts +34 -30
- package/src/vaultFactory/vault.d.ts.map +1 -1
- package/src/vaultFactory/vault.js +19 -15
- package/src/vaultFactory/vaultDirector.d.ts +81 -63
- package/src/vaultFactory/vaultDirector.d.ts.map +1 -1
- package/src/vaultFactory/vaultDirector.js +38 -24
- package/src/vaultFactory/vaultFactory.d.ts +35 -22
- package/src/vaultFactory/vaultFactory.d.ts.map +1 -1
- package/src/vaultFactory/vaultFactory.js +27 -17
- package/src/vaultFactory/vaultHolder.d.ts +77 -29
- package/src/vaultFactory/vaultHolder.d.ts.map +1 -1
- package/src/vaultFactory/vaultHolder.js +12 -4
- package/src/vaultFactory/vaultKit.d.ts +12 -8
- package/src/vaultFactory/vaultKit.d.ts.map +1 -1
- package/src/vaultFactory/vaultKit.js +12 -5
- package/src/vaultFactory/vaultManager.d.ts +102 -88
- package/src/vaultFactory/vaultManager.d.ts.map +1 -1
- package/src/vaultFactory/vaultManager.js +86 -53
- package/src/proposals/add-auction.d.ts +0 -109
- package/src/proposals/add-auction.d.ts.map +0 -1
- package/src/proposals/addAssetToVault.d.ts +0 -173
- package/src/proposals/addAssetToVault.d.ts.map +0 -1
- package/src/proposals/committee-proposal.d.ts +0 -113
- package/src/proposals/committee-proposal.d.ts.map +0 -1
- package/src/proposals/core-proposal.d.ts +0 -149
- package/src/proposals/core-proposal.d.ts.map +0 -1
- package/src/proposals/deploy-price-feeds.d.ts +0 -76
- package/src/proposals/deploy-price-feeds.d.ts.map +0 -1
- package/src/proposals/econ-behaviors.d.ts +0 -541
- package/src/proposals/econ-behaviors.d.ts.map +0 -1
- package/src/proposals/price-feed-proposal.d.ts +0 -84
- package/src/proposals/price-feed-proposal.d.ts.map +0 -1
- package/src/proposals/replace-fee-distributor.d.ts +0 -48
- package/src/proposals/replace-fee-distributor.d.ts.map +0 -1
- package/src/proposals/replace-scaledPriceAuthorities.d.ts +0 -30
- package/src/proposals/replace-scaledPriceAuthorities.d.ts.map +0 -1
- package/src/proposals/replaceElectorate.d.ts +0 -55
- package/src/proposals/replaceElectorate.d.ts.map +0 -1
- package/src/proposals/startEconCommittee.d.ts +0 -34
- package/src/proposals/startEconCommittee.d.ts.map +0 -1
- package/src/proposals/startPSM.d.ts +0 -59
- package/src/proposals/startPSM.d.ts.map +0 -1
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts +0 -24
- package/src/proposals/upgrade-scaledPriceAuthorities.d.ts.map +0 -1
- package/src/proposals/upgrade-vaults.d.ts +0 -41
- package/src/proposals/upgrade-vaults.d.ts.map +0 -1
package/src/provisionPoolKit.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// @ts-check
|
|
2
2
|
import { X, q, Fail } from '@endo/errors';
|
|
3
3
|
import { E } from '@endo/far';
|
|
4
|
-
import { Far } from '@endo/marshal';
|
|
5
4
|
|
|
6
5
|
import { AmountMath, BrandShape } from '@agoric/ertp';
|
|
7
6
|
import { deeplyFulfilledObject, makeTracer } from '@agoric/internal';
|
|
@@ -15,8 +14,8 @@ import {
|
|
|
15
14
|
M,
|
|
16
15
|
makeScalarBigMapStore,
|
|
17
16
|
makeScalarBigSetStore,
|
|
18
|
-
prepareExoClassKit,
|
|
19
17
|
} from '@agoric/vat-data';
|
|
18
|
+
import { makeAtomicProvider, makeScalarMapStore } from '@agoric/store';
|
|
20
19
|
import { PowerFlags } from '@agoric/vats/src/walletFlags.js';
|
|
21
20
|
import {
|
|
22
21
|
PublicTopicShape,
|
|
@@ -25,31 +24,53 @@ import {
|
|
|
25
24
|
import { InstanceHandleShape } from '@agoric/zoe/src/typeGuards.js';
|
|
26
25
|
import { isUpgradeDisconnection } from '@agoric/internal/src/upgrade-api.js';
|
|
27
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @import {EReturn} from '@endo/far';
|
|
29
|
+
* @import {BridgeMessage} from '@agoric/cosmic-swingset/src/types.js';
|
|
30
|
+
* @import {Amount, Brand, Payment, Purse} from '@agoric/ertp';
|
|
31
|
+
* @import {ERemote, Remote} from '@agoric/internal';
|
|
32
|
+
* @import {StorageNode} from '@agoric/internal/src/lib-chainStorage.js';
|
|
33
|
+
* @import {ZCF} from '@agoric/zoe';
|
|
34
|
+
* @import {ERef} from '@endo/far'
|
|
35
|
+
* @import {Bank, BankManager} from '@agoric/vats/src/vat-bank.js'
|
|
36
|
+
* @import {MapStore, SetStore} from '@agoric/store';
|
|
37
|
+
* @import {Instance} from '@agoric/zoe/src/zoeService/utils.js';
|
|
38
|
+
* @import {start as psmStart} from '@agoric/inter-protocol/src/psm/psm.js';
|
|
39
|
+
* @import {NameAdmin} from '@agoric/vats';
|
|
40
|
+
* @import {WalletFactoryStartResult} from '@agoric/vats/src/core/startWalletFactory.js';
|
|
41
|
+
* @import {Zone} from '@agoric/zone';
|
|
42
|
+
* @import {start as StartWalletFactory} from '@agoric/smart-wallet/src/walletFactory.js';
|
|
43
|
+
* @import {MakeRecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
44
|
+
* @import {RecorderKit} from '@agoric/zoe/src/contractSupport/recorder.js';
|
|
45
|
+
* @import {BridgeHandler} from '@agoric/vats';
|
|
46
|
+
* @import {AssetDescriptor} from '@agoric/vats/src/vat-bank.js';
|
|
47
|
+
*/
|
|
48
|
+
|
|
28
49
|
const trace = makeTracer('ProvPool');
|
|
29
50
|
|
|
30
51
|
const FIRST_UPPER_KEYWORD = /^[A-Z][a-zA-Z0-9_$]*$/;
|
|
31
52
|
// see https://github.com/Agoric/agoric-sdk/issues/8238
|
|
32
53
|
const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/;
|
|
33
54
|
|
|
55
|
+
// XXX when inferred, error TS2742: cannot be named without a reference to '../../../node_modules/@endo/exo/src/get-interface.js'. This is likely not portable. A type annotation is necessary.
|
|
34
56
|
/**
|
|
35
|
-
* @
|
|
36
|
-
*
|
|
37
|
-
*
|
|
57
|
+
* @typedef {{
|
|
58
|
+
* machine: any;
|
|
59
|
+
* helper: any;
|
|
60
|
+
* forHandler: any;
|
|
61
|
+
* public: any;
|
|
62
|
+
* }} ProvisionPoolKit
|
|
38
63
|
*/
|
|
39
64
|
|
|
40
65
|
/**
|
|
41
|
-
* @typedef {
|
|
42
|
-
* import('@agoric/inter-protocol/src/psm/psm.js').start
|
|
43
|
-
* >} PsmInstance
|
|
66
|
+
* @typedef {Instance<typeof psmStart>} PsmInstance
|
|
44
67
|
*/
|
|
45
68
|
|
|
46
69
|
/**
|
|
47
70
|
* @typedef {object} ProvisionPoolKitReferences
|
|
48
71
|
* @property {ERef<BankManager>} bankManager
|
|
49
|
-
* @property {ERef<
|
|
50
|
-
* @property {ERef<
|
|
51
|
-
* import('@agoric/vats/src/core/startWalletFactory.js').WalletFactoryStartResult['creatorFacet']
|
|
52
|
-
* >} walletFactory
|
|
72
|
+
* @property {ERef<NameAdmin>} namesByAddressAdmin
|
|
73
|
+
* @property {ERef<WalletFactoryStartResult['creatorFacet']>} walletFactory
|
|
53
74
|
*/
|
|
54
75
|
|
|
55
76
|
/**
|
|
@@ -66,28 +87,44 @@ const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/;
|
|
|
66
87
|
* Given attenuated access to the funding purse, handle requests to provision
|
|
67
88
|
* smart wallets.
|
|
68
89
|
*
|
|
69
|
-
* @param {
|
|
70
|
-
* @param {() => void} onProvisioned
|
|
90
|
+
* @param {Zone} zone
|
|
71
91
|
*/
|
|
72
|
-
export const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
92
|
+
export const prepareBridgeProvisionTool = zone =>
|
|
93
|
+
zone.exoClass(
|
|
94
|
+
'smartWalletProvisioningHandler',
|
|
95
|
+
M.interface('ProvisionBridgeHandlerMaker', {
|
|
96
|
+
fromBridge: M.callWhen(M.record()).returns(),
|
|
97
|
+
}),
|
|
98
|
+
/**
|
|
99
|
+
* @param {ERef<BankManager>} bankManager
|
|
100
|
+
* @param {ERef<EReturn<StartWalletFactory>['creatorFacet']>} walletFactory
|
|
101
|
+
* @param {ERef<NameAdmin>} namesByAddressAdmin
|
|
102
|
+
* @param {ProvisionPoolKit['forHandler']} forHandler
|
|
103
|
+
*/
|
|
104
|
+
(bankManager, walletFactory, namesByAddressAdmin, forHandler) => ({
|
|
105
|
+
bankManager,
|
|
106
|
+
walletFactory,
|
|
107
|
+
namesByAddressAdmin,
|
|
108
|
+
forHandler,
|
|
109
|
+
}),
|
|
110
|
+
{
|
|
111
|
+
/** @param {BridgeMessage} obj */
|
|
112
|
+
async fromBridge(obj) {
|
|
113
|
+
if (obj.type !== 'PLEASE_PROVISION')
|
|
114
|
+
throw Fail`Unrecognized request ${obj.type}`;
|
|
83
115
|
trace('PLEASE_PROVISION', obj);
|
|
84
116
|
const { address, powerFlags } = obj;
|
|
117
|
+
// XXX expects powerFlags to be an array, but if it's a string then
|
|
118
|
+
// this allows a string that has 'SMART_WALLET' in it.
|
|
85
119
|
powerFlags.includes(PowerFlags.SMART_WALLET) ||
|
|
86
120
|
Fail`missing SMART_WALLET in powerFlags`;
|
|
87
121
|
|
|
122
|
+
const { bankManager, walletFactory, namesByAddressAdmin, forHandler } =
|
|
123
|
+
this.state;
|
|
124
|
+
|
|
88
125
|
const bank = E(bankManager).getBankForAddress(address);
|
|
89
126
|
// only proceed if we can provide funds
|
|
90
|
-
await sendInitialPayment(bank);
|
|
127
|
+
await forHandler.sendInitialPayment(bank);
|
|
91
128
|
|
|
92
129
|
const [_, created] = await E(walletFactory).provideSmartWallet(
|
|
93
130
|
address,
|
|
@@ -95,31 +132,44 @@ export const makeBridgeProvisionTool = (sendInitialPayment, onProvisioned) => {
|
|
|
95
132
|
namesByAddressAdmin,
|
|
96
133
|
);
|
|
97
134
|
if (created) {
|
|
98
|
-
onProvisioned();
|
|
135
|
+
forHandler.onProvisioned();
|
|
99
136
|
}
|
|
100
137
|
trace(created ? 'provisioned' : 're-provisioned', address);
|
|
101
138
|
},
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
};
|
|
139
|
+
},
|
|
140
|
+
);
|
|
105
141
|
|
|
106
142
|
/**
|
|
107
|
-
* @param {
|
|
143
|
+
* @param {Zone} zone
|
|
108
144
|
* @param {{
|
|
109
|
-
* makeRecorderKit:
|
|
145
|
+
* makeRecorderKit: MakeRecorderKit;
|
|
110
146
|
* params: any;
|
|
111
|
-
* poolBank:
|
|
147
|
+
* poolBank: ERef<Bank>;
|
|
112
148
|
* zcf: ZCF;
|
|
149
|
+
* makeBridgeProvisionTool: ReturnType<typeof prepareBridgeProvisionTool>;
|
|
113
150
|
* }} powers
|
|
114
151
|
*/
|
|
115
152
|
export const prepareProvisionPoolKit = (
|
|
116
|
-
|
|
117
|
-
{ makeRecorderKit, params, poolBank, zcf },
|
|
153
|
+
zone,
|
|
154
|
+
{ makeRecorderKit, params, poolBank, zcf, makeBridgeProvisionTool },
|
|
118
155
|
) => {
|
|
119
156
|
const zoe = zcf.getZoeService();
|
|
157
|
+
const ephemeralPurses = makeScalarMapStore('fundingPurseForBrand');
|
|
158
|
+
const purseProvider = makeAtomicProvider(ephemeralPurses);
|
|
159
|
+
const getFundingPurseForBrand = async poolBrand => {
|
|
160
|
+
await null;
|
|
161
|
+
try {
|
|
162
|
+
const purse = await purseProvider.provideAsync(poolBrand, brand =>
|
|
163
|
+
E(poolBank).getPurse(brand),
|
|
164
|
+
);
|
|
165
|
+
return purse;
|
|
166
|
+
} catch (err) {
|
|
167
|
+
trace(`🚨 could not get purse for brand ${poolBrand}`, err);
|
|
168
|
+
throw err;
|
|
169
|
+
}
|
|
170
|
+
};
|
|
120
171
|
|
|
121
|
-
const makeProvisionPoolKitInternal =
|
|
122
|
-
baggage,
|
|
172
|
+
const makeProvisionPoolKitInternal = zone.exoClassKit(
|
|
123
173
|
'ProvisionPoolKit',
|
|
124
174
|
{
|
|
125
175
|
machine: M.interface('ProvisionPoolKit machine', {
|
|
@@ -142,18 +192,19 @@ export const prepareProvisionPoolKit = (
|
|
|
142
192
|
ackWallet: M.call(M.string()).returns(M.boolean()),
|
|
143
193
|
}),
|
|
144
194
|
helper: UnguardedHelperI,
|
|
195
|
+
forHandler: UnguardedHelperI,
|
|
145
196
|
public: M.interface('ProvisionPoolKit public', {
|
|
146
197
|
getPublicTopics: M.call().returns({ metrics: PublicTopicShape }),
|
|
147
198
|
}),
|
|
148
199
|
},
|
|
149
200
|
/**
|
|
150
201
|
* @param {object} opts
|
|
151
|
-
* @param {Purse<'nat'>} opts.fundPurse
|
|
202
|
+
* @param {Purse<'nat'>} [opts.fundPurse]
|
|
152
203
|
* @param {Brand<'nat'>} opts.poolBrand
|
|
153
|
-
* @param {StorageNode} opts.metricsNode
|
|
204
|
+
* @param {Remote<StorageNode>} opts.metricsNode
|
|
154
205
|
*/
|
|
155
206
|
({ fundPurse, poolBrand, metricsNode }) => {
|
|
156
|
-
/** @type {
|
|
207
|
+
/** @type {RecorderKit<MetricsNotification>} */
|
|
157
208
|
const metricsRecorderKit = makeRecorderKit(metricsNode);
|
|
158
209
|
|
|
159
210
|
/** @type {MapStore<ERef<Brand>, PsmInstance>} */
|
|
@@ -208,23 +259,24 @@ export const prepareProvisionPoolKit = (
|
|
|
208
259
|
const refs = await deeplyFulfilledObject(obj);
|
|
209
260
|
Object.assign(this.state, refs);
|
|
210
261
|
},
|
|
262
|
+
/** @returns {BridgeHandler} */
|
|
211
263
|
makeHandler() {
|
|
212
264
|
const { bankManager, namesByAddressAdmin, walletFactory } =
|
|
213
265
|
this.state;
|
|
214
266
|
if (!bankManager || !namesByAddressAdmin || !walletFactory) {
|
|
215
267
|
throw Fail`must set references before handling requests`;
|
|
216
268
|
}
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
() => helper.onProvisioned(),
|
|
222
|
-
);
|
|
223
|
-
return innerMaker({
|
|
269
|
+
|
|
270
|
+
const { forHandler } = this.facets;
|
|
271
|
+
|
|
272
|
+
const provisionHandler = makeBridgeProvisionTool(
|
|
224
273
|
bankManager,
|
|
225
|
-
namesByAddressAdmin,
|
|
226
274
|
walletFactory,
|
|
227
|
-
|
|
275
|
+
namesByAddressAdmin,
|
|
276
|
+
forHandler,
|
|
277
|
+
);
|
|
278
|
+
|
|
279
|
+
return provisionHandler;
|
|
228
280
|
},
|
|
229
281
|
/**
|
|
230
282
|
* @param {Brand} brand
|
|
@@ -302,66 +354,43 @@ export const prepareProvisionPoolKit = (
|
|
|
302
354
|
);
|
|
303
355
|
facets.helper.publishMetrics();
|
|
304
356
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
const {
|
|
313
|
-
facets: { helper },
|
|
314
|
-
state: { fundPurse, poolBrand },
|
|
315
|
-
} = this;
|
|
316
|
-
const perAccountInitialAmount = /** @type {Amount<'nat'>} */ (
|
|
317
|
-
params.getPerAccountInitialAmount()
|
|
318
|
-
);
|
|
319
|
-
const initialPmt = await E(fundPurse).withdraw(
|
|
320
|
-
perAccountInitialAmount,
|
|
321
|
-
);
|
|
357
|
+
/**
|
|
358
|
+
* @param {Amount} amount
|
|
359
|
+
* @param {ERef<Purse>} srcPurse
|
|
360
|
+
*/
|
|
361
|
+
async onPoolDeposit(amount, srcPurse) {
|
|
362
|
+
const { helper } = this.facets;
|
|
363
|
+
const { brandToPSM, poolBrand } = this.state;
|
|
322
364
|
|
|
323
|
-
const
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
365
|
+
const { brand } = amount;
|
|
366
|
+
if (AmountMath.isEmpty(amount) || brand === poolBrand) {
|
|
367
|
+
return;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// `amount` doesn't match the current `poolBrand`, so we need to swap
|
|
371
|
+
// it.
|
|
372
|
+
if (!brandToPSM.has(brand)) {
|
|
373
|
+
console.error('funds arrived but no PSM instance', brand);
|
|
374
|
+
return;
|
|
375
|
+
}
|
|
376
|
+
const instance = brandToPSM.get(brand);
|
|
377
|
+
const payment = E(srcPurse).withdraw(amount);
|
|
378
|
+
await helper.swap(payment, amount, instance).catch(async reason => {
|
|
379
|
+
console.error(X`swap failed: ${reason}`);
|
|
380
|
+
const resolvedPayment = await payment;
|
|
381
|
+
return E(srcPurse).deposit(resolvedPayment);
|
|
382
|
+
});
|
|
335
383
|
},
|
|
336
384
|
/**
|
|
337
385
|
* @param {ERef<Purse>} exchangePurse
|
|
338
386
|
* @param {ERef<Brand>} brand
|
|
339
387
|
*/
|
|
340
388
|
watchCurrentAmount(exchangePurse, brand) {
|
|
341
|
-
const {
|
|
342
|
-
state: { brandToPSM, poolBrand },
|
|
343
|
-
facets: { helper },
|
|
344
|
-
} = this;
|
|
345
|
-
|
|
389
|
+
const { helper } = this.facets;
|
|
346
390
|
void observeNotifier(E(exchangePurse).getCurrentAmountNotifier(), {
|
|
347
391
|
updateState: async amount => {
|
|
348
392
|
trace('provisionPool balance update', amount);
|
|
349
|
-
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
if (!brandToPSM.has(brand)) {
|
|
353
|
-
console.error('funds arrived but no PSM instance', brand);
|
|
354
|
-
return;
|
|
355
|
-
}
|
|
356
|
-
const instance = brandToPSM.get(brand);
|
|
357
|
-
const payment = E(exchangePurse).withdraw(amount);
|
|
358
|
-
await helper
|
|
359
|
-
.swap(payment, amount, instance)
|
|
360
|
-
.catch(async reason => {
|
|
361
|
-
console.error(X`swap failed: ${reason}`);
|
|
362
|
-
const resolvedPayment = await payment;
|
|
363
|
-
return E(exchangePurse).deposit(resolvedPayment);
|
|
364
|
-
});
|
|
393
|
+
await helper.onPoolDeposit(amount, exchangePurse);
|
|
365
394
|
},
|
|
366
395
|
fail: reason => {
|
|
367
396
|
if (isUpgradeDisconnection(reason)) {
|
|
@@ -376,7 +405,7 @@ export const prepareProvisionPoolKit = (
|
|
|
376
405
|
const { facets } = this;
|
|
377
406
|
const { helper } = facets;
|
|
378
407
|
|
|
379
|
-
/** @param {
|
|
408
|
+
/** @param {AssetDescriptor} desc */
|
|
380
409
|
const repairDesc = desc => {
|
|
381
410
|
if (desc.issuerName.match(FIRST_UPPER_KEYWORD)) {
|
|
382
411
|
trace(`Saving Issuer ${desc.issuerName}`);
|
|
@@ -427,40 +456,50 @@ export const prepareProvisionPoolKit = (
|
|
|
427
456
|
);
|
|
428
457
|
},
|
|
429
458
|
/**
|
|
459
|
+
* @param {Brand<'nat'>} poolBrand
|
|
430
460
|
* @param {object} [options]
|
|
431
461
|
* @param {MetricsNotification} [options.metrics]
|
|
432
462
|
*/
|
|
433
|
-
start({ metrics } = {}) {
|
|
434
|
-
const {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
} = this;
|
|
463
|
+
start(poolBrand, { metrics } = {}) {
|
|
464
|
+
const { facets, state } = this;
|
|
465
|
+
const { helper } = facets;
|
|
466
|
+
const lastPoolBrand = state.poolBrand;
|
|
438
467
|
|
|
439
|
-
//
|
|
440
|
-
//
|
|
441
|
-
// That would be a severe bug.
|
|
468
|
+
// The PerAccountInitialAmount param must use the correct brand for
|
|
469
|
+
// this incarnation.
|
|
442
470
|
AmountMath.coerce(poolBrand, params.getPerAccountInitialAmount());
|
|
443
471
|
|
|
444
|
-
|
|
445
|
-
|
|
472
|
+
// Restore old metrics.
|
|
446
473
|
if (metrics) {
|
|
447
|
-
// Restore state.
|
|
448
|
-
// we publishMetrics() below
|
|
449
474
|
const {
|
|
450
475
|
walletsProvisioned,
|
|
451
476
|
totalMintedProvided,
|
|
452
477
|
totalMintedConverted,
|
|
453
478
|
} = metrics;
|
|
454
479
|
assert.typeof(walletsProvisioned, 'bigint');
|
|
455
|
-
AmountMath.coerce(
|
|
456
|
-
AmountMath.coerce(
|
|
457
|
-
Object.assign(
|
|
480
|
+
AmountMath.coerce(lastPoolBrand, totalMintedProvided);
|
|
481
|
+
AmountMath.coerce(lastPoolBrand, totalMintedConverted);
|
|
482
|
+
Object.assign(state, {
|
|
458
483
|
walletsProvisioned,
|
|
459
484
|
totalMintedProvided,
|
|
460
485
|
totalMintedConverted,
|
|
461
486
|
});
|
|
462
487
|
helper.publishMetrics();
|
|
463
488
|
}
|
|
489
|
+
|
|
490
|
+
// Update as needed when `poolBrand` changes.
|
|
491
|
+
if (poolBrand !== lastPoolBrand) {
|
|
492
|
+
state.poolBrand = poolBrand;
|
|
493
|
+
state.fundPurse = undefined;
|
|
494
|
+
void getFundingPurseForBrand(poolBrand).then(purse =>
|
|
495
|
+
helper.updateFundPurse(purse, poolBrand),
|
|
496
|
+
);
|
|
497
|
+
state.totalMintedProvided = AmountMath.makeEmpty(poolBrand);
|
|
498
|
+
state.totalMintedConverted = AmountMath.makeEmpty(poolBrand);
|
|
499
|
+
helper.publishMetrics();
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
void helper.watchAssetSubscription();
|
|
464
503
|
},
|
|
465
504
|
/**
|
|
466
505
|
* @param {ERef<Payment>} payIn
|
|
@@ -468,10 +507,13 @@ export const prepareProvisionPoolKit = (
|
|
|
468
507
|
* @param {PsmInstance} instance
|
|
469
508
|
*/
|
|
470
509
|
async swap(payIn, amount, instance) {
|
|
510
|
+
await null;
|
|
511
|
+
const { facets, state } = this;
|
|
512
|
+
const { helper } = facets;
|
|
471
513
|
const {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
} =
|
|
514
|
+
poolBrand,
|
|
515
|
+
fundPurse = await getFundingPurseForBrand(poolBrand),
|
|
516
|
+
} = state;
|
|
475
517
|
const psmPub = E(zoe).getPublicFacet(instance);
|
|
476
518
|
const proposal = harden({ give: { In: amount } });
|
|
477
519
|
const invitation = E(psmPub).makeWantMintedInvitation();
|
|
@@ -481,6 +523,52 @@ export const prepareProvisionPoolKit = (
|
|
|
481
523
|
helper.onTrade(rxd);
|
|
482
524
|
return rxd;
|
|
483
525
|
},
|
|
526
|
+
/**
|
|
527
|
+
* @param {Purse<'nat'>} purse
|
|
528
|
+
* @param {Brand<'nat'>} brand
|
|
529
|
+
*/
|
|
530
|
+
updateFundPurse(purse, brand) {
|
|
531
|
+
const { state } = this;
|
|
532
|
+
if (brand !== state.poolBrand || state.fundPurse) return;
|
|
533
|
+
state.fundPurse = purse;
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
forHandler: {
|
|
537
|
+
onProvisioned() {
|
|
538
|
+
const { facets, state } = this;
|
|
539
|
+
state.walletsProvisioned += 1n;
|
|
540
|
+
facets.helper.publishMetrics();
|
|
541
|
+
},
|
|
542
|
+
/** @param {ERef<Bank>} destBank */
|
|
543
|
+
async sendInitialPayment(destBank) {
|
|
544
|
+
await null;
|
|
545
|
+
const { facets, state } = this;
|
|
546
|
+
const { helper } = facets;
|
|
547
|
+
const {
|
|
548
|
+
poolBrand,
|
|
549
|
+
fundPurse = await getFundingPurseForBrand(poolBrand),
|
|
550
|
+
} = state;
|
|
551
|
+
const perAccountInitialAmount = /** @type {Amount<'nat'>} */ (
|
|
552
|
+
params.getPerAccountInitialAmount()
|
|
553
|
+
);
|
|
554
|
+
trace('sendInitialPayment withdrawing', perAccountInitialAmount);
|
|
555
|
+
const initialPmt = await E(fundPurse).withdraw(
|
|
556
|
+
perAccountInitialAmount,
|
|
557
|
+
);
|
|
558
|
+
|
|
559
|
+
const destPurse = E(destBank).getPurse(poolBrand);
|
|
560
|
+
return E(destPurse)
|
|
561
|
+
.deposit(initialPmt)
|
|
562
|
+
.then(amt => {
|
|
563
|
+
helper.onSendFunds(perAccountInitialAmount);
|
|
564
|
+
trace('provisionPool sent', amt);
|
|
565
|
+
})
|
|
566
|
+
.catch(reason => {
|
|
567
|
+
console.error(X`initial deposit failed: ${q(reason)}`);
|
|
568
|
+
void E(fundPurse).deposit(initialPmt);
|
|
569
|
+
throw reason;
|
|
570
|
+
});
|
|
571
|
+
},
|
|
484
572
|
},
|
|
485
573
|
public: {
|
|
486
574
|
getPublicTopics() {
|
|
@@ -505,10 +593,12 @@ export const prepareProvisionPoolKit = (
|
|
|
505
593
|
*
|
|
506
594
|
* @param {object} opts
|
|
507
595
|
* @param {Brand<'nat'>} opts.poolBrand
|
|
508
|
-
* @param {
|
|
596
|
+
* @param {ERemote<StorageNode>} opts.storageNode
|
|
597
|
+
* @returns {Promise<ProvisionPoolKit>}
|
|
509
598
|
*/
|
|
510
599
|
const makeProvisionPoolKit = async ({ poolBrand, storageNode }) => {
|
|
511
|
-
const fundPurse = await
|
|
600
|
+
const fundPurse = await getFundingPurseForBrand(poolBrand);
|
|
601
|
+
/** @type {Remote<StorageNode>} */
|
|
512
602
|
const metricsNode = await E(storageNode).makeChildNode('metrics');
|
|
513
603
|
|
|
514
604
|
return makeProvisionPoolKitInternal({
|
package/src/psm/psm.d.ts
CHANGED
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* economic policies, the fee percentage for trading into and out of the
|
|
6
6
|
* stable token are specified separately.
|
|
7
7
|
*/
|
|
8
|
+
/**
|
|
9
|
+
* @import {EReturn} from '@endo/far';
|
|
10
|
+
* @import {TypedPattern, Remote} from '@agoric/internal';
|
|
11
|
+
* @import {Baggage} from '@agoric/vat-data'
|
|
12
|
+
* @import {ContractMeta, FeeMintAccess, Installation} from '@agoric/zoe';
|
|
13
|
+
*/
|
|
8
14
|
/**
|
|
9
15
|
* @typedef {object} MetricsNotification Metrics naming scheme is that nouns are
|
|
10
16
|
* present values and past-participles are accumulative.
|
|
@@ -19,10 +25,6 @@
|
|
|
19
25
|
* @property {Amount<'nat'>} totalMintedProvided running sum of Minted ever
|
|
20
26
|
* given by this contract
|
|
21
27
|
*/
|
|
22
|
-
/**
|
|
23
|
-
* @import {TypedPattern} from '@agoric/internal';
|
|
24
|
-
* @import {Baggage} from '@agoric/vat-data'
|
|
25
|
-
*/
|
|
26
28
|
/** @type {ContractMeta} */
|
|
27
29
|
export const meta: ContractMeta;
|
|
28
30
|
export function start(zcf: ZCF<GovernanceTerms<{
|
|
@@ -35,8 +37,8 @@ export function start(zcf: ZCF<GovernanceTerms<{
|
|
|
35
37
|
}>, privateArgs: {
|
|
36
38
|
feeMintAccess: FeeMintAccess;
|
|
37
39
|
initialPoserInvitation: Invitation;
|
|
38
|
-
storageNode: StorageNode
|
|
39
|
-
marshaller: Marshaller
|
|
40
|
+
storageNode: Remote<StorageNode>;
|
|
41
|
+
marshaller: Remote<Marshaller>;
|
|
40
42
|
}, baggage: Baggage): Promise<{
|
|
41
43
|
creatorFacet: import("@endo/exo").Guarded<{
|
|
42
44
|
getParamMgrRetriever: () => {
|
|
@@ -47,7 +49,7 @@ export function start(zcf: ZCF<GovernanceTerms<{
|
|
|
47
49
|
} & {
|
|
48
50
|
Electorate: "invitation";
|
|
49
51
|
}>;
|
|
50
|
-
} &
|
|
52
|
+
} & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, {
|
|
51
53
|
get: () => import("@agoric/governance/src/contractGovernance/typedParamManager.js").TypedParamManager<{
|
|
52
54
|
GiveMintedFee: "ratio";
|
|
53
55
|
MintLimit: "amount";
|
|
@@ -56,11 +58,11 @@ export function start(zcf: ZCF<GovernanceTerms<{
|
|
|
56
58
|
Electorate: "invitation";
|
|
57
59
|
}>;
|
|
58
60
|
}>;
|
|
59
|
-
getInvitation: (name: any) => Promise<Invitation
|
|
61
|
+
getInvitation: (name: any) => Promise<globalThis.Invitation>;
|
|
60
62
|
getLimitedCreatorFacet: () => import("@endo/exo").Guarded<{
|
|
61
63
|
getRewardAllocation(): Allocation;
|
|
62
|
-
makeCollectFeesInvitation(): Promise<Invitation<string
|
|
63
|
-
makeRestoreMetricsInvitation(): Promise<Invitation<void, Omit<MetricsNotification, "anchorPoolBalance">>>;
|
|
64
|
+
makeCollectFeesInvitation(): Promise<globalThis.Invitation<string>>;
|
|
65
|
+
makeRestoreMetricsInvitation(): Promise<globalThis.Invitation<void, Omit<MetricsNotification, "anchorPoolBalance">>>;
|
|
64
66
|
}>;
|
|
65
67
|
getGovernedApis: () => GovernedApis;
|
|
66
68
|
getGovernedApiNames: () => string[];
|
|
@@ -85,8 +87,8 @@ export function start(zcf: ZCF<GovernanceTerms<{
|
|
|
85
87
|
getPublicTopics(): {
|
|
86
88
|
metrics: import("@agoric/zoe/src/contractSupport/topics.js").PublicTopic<MetricsNotification>;
|
|
87
89
|
};
|
|
88
|
-
makeWantMintedInvitation(): Promise<Invitation<void, undefined>>;
|
|
89
|
-
makeGiveMintedInvitation(): Promise<Invitation<void, undefined>>;
|
|
90
|
+
makeWantMintedInvitation(): Promise<globalThis.Invitation<void, undefined>>;
|
|
91
|
+
makeGiveMintedInvitation(): Promise<globalThis.Invitation<void, undefined>>;
|
|
90
92
|
}>;
|
|
91
93
|
}>;
|
|
92
94
|
/**
|
|
@@ -120,6 +122,11 @@ export type MetricsNotification = {
|
|
|
120
122
|
*/
|
|
121
123
|
totalMintedProvided: Amount<"nat">;
|
|
122
124
|
};
|
|
123
|
-
export type PsmPublicFacet =
|
|
125
|
+
export type PsmPublicFacet = EReturn<typeof start>["publicFacet"];
|
|
126
|
+
import type { ContractMeta } from '@agoric/zoe';
|
|
127
|
+
import type { FeeMintAccess } from '@agoric/zoe';
|
|
128
|
+
import type { Remote } from '@agoric/internal';
|
|
124
129
|
import type { Baggage } from '@agoric/vat-data';
|
|
130
|
+
import type { Installation } from '@agoric/zoe';
|
|
131
|
+
import type { EReturn } from '@endo/far';
|
|
125
132
|
//# sourceMappingURL=psm.d.ts.map
|
package/src/psm/psm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psm.d.ts","sourceRoot":"","sources":["psm.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"psm.d.ts","sourceRoot":"","sources":["psm.js"],"names":[],"mappings":"AAsCA;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;;;;;;;;;GAaG;AAEH,2BAA2B;AAC3B,mBADW,YAAY,CAkCrB;AAsBK,2BAlBI,GAAG,CACT,eAAe,CAAC;IACd,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,QAAQ,CAAC;CACrB,CAAC,GAAG;IACH,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC1B,eAAe,EAAE,KAAK,CAAC;CACxB,CACF,eACO;IACN,aAAa,EAAE,aAAa,CAAC;IAC7B,sBAAsB,EAAE,UAAU,CAAC;IACnC,WAAW,EAAE,OAAO,WAAW,CAAC,CAAC;IACjC,UAAU,EAAE,OAAO,UAAU,CAAC,CAAC;CAChC,WACO,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqUjB;;;;;;;;;;uBAvYa,MAAM,CAAC,KAAK,CAAC;;;;;uBAEb,MAAM,CAAC,KAAK,CAAC;;;;;oBAEb,MAAM,CAAC,KAAK,CAAC;;;;;yBAEb,MAAM,CAAC,KAAK,CAAC;;;;;yBAEb,MAAM,CAAC,KAAK,CAAC;;6BAkYb,QAAQ,OAAO,KAAK,CAAb,CAAe,aAAa,CAAC;kCAhZU,aAAa;mCAAb,aAAa;4BAFlC,kBAAkB;6BAC/B,kBAAkB;kCACgB,aAAa;6BAH/C,WAAW"}
|
package/src/psm/psm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// @jessie-check
|
|
2
|
-
/// <reference types="@agoric/governance/exported" />
|
|
3
|
-
/// <reference types="@agoric/zoe/exported" />
|
|
2
|
+
/// <reference types="@agoric/governance/exported.js" />
|
|
3
|
+
/// <reference types="@agoric/zoe/exported.js" />
|
|
4
4
|
|
|
5
5
|
import { Fail } from '@endo/errors';
|
|
6
6
|
import { E } from '@endo/eventual-send';
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
publicMixinAPI,
|
|
13
13
|
} from '@agoric/governance';
|
|
14
14
|
import { StorageNodeShape } from '@agoric/internal';
|
|
15
|
+
import { wrapRemoteMarshaller } from '@agoric/internal/src/marshal/wrap-marshaller.js';
|
|
15
16
|
import { M, prepareExo, provide } from '@agoric/vat-data';
|
|
16
17
|
import {
|
|
17
18
|
atomicTransfer,
|
|
@@ -43,6 +44,13 @@ import { makeNatAmountShape } from '../contractSupport.js';
|
|
|
43
44
|
* stable token are specified separately.
|
|
44
45
|
*/
|
|
45
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @import {EReturn} from '@endo/far';
|
|
49
|
+
* @import {TypedPattern, Remote} from '@agoric/internal';
|
|
50
|
+
* @import {Baggage} from '@agoric/vat-data'
|
|
51
|
+
* @import {ContractMeta, FeeMintAccess, Installation} from '@agoric/zoe';
|
|
52
|
+
*/
|
|
53
|
+
|
|
46
54
|
/**
|
|
47
55
|
* @typedef {object} MetricsNotification Metrics naming scheme is that nouns are
|
|
48
56
|
* present values and past-participles are accumulative.
|
|
@@ -58,11 +66,6 @@ import { makeNatAmountShape } from '../contractSupport.js';
|
|
|
58
66
|
* given by this contract
|
|
59
67
|
*/
|
|
60
68
|
|
|
61
|
-
/**
|
|
62
|
-
* @import {TypedPattern} from '@agoric/internal';
|
|
63
|
-
* @import {Baggage} from '@agoric/vat-data'
|
|
64
|
-
*/
|
|
65
|
-
|
|
66
69
|
/** @type {ContractMeta} */
|
|
67
70
|
export const meta = {
|
|
68
71
|
upgradability: 'canUpgrade',
|
|
@@ -114,8 +117,8 @@ harden(meta);
|
|
|
114
117
|
* @param {{
|
|
115
118
|
* feeMintAccess: FeeMintAccess;
|
|
116
119
|
* initialPoserInvitation: Invitation;
|
|
117
|
-
* storageNode: StorageNode
|
|
118
|
-
* marshaller: Marshaller
|
|
120
|
+
* storageNode: Remote<StorageNode>;
|
|
121
|
+
* marshaller: Remote<Marshaller>;
|
|
119
122
|
* }} privateArgs
|
|
120
123
|
* @param {Baggage} baggage
|
|
121
124
|
*/
|
|
@@ -123,9 +126,12 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
123
126
|
const { anchorBrand, anchorPerMinted } = zcf.getTerms();
|
|
124
127
|
console.log('PSM Starting', anchorBrand, anchorPerMinted);
|
|
125
128
|
|
|
129
|
+
const { marshaller: remoteMarshaller } = privateArgs;
|
|
130
|
+
const cachingMarshaller = wrapRemoteMarshaller(remoteMarshaller);
|
|
131
|
+
|
|
126
132
|
const { makeRecorderKit } = prepareRecorderKitMakers(
|
|
127
133
|
baggage,
|
|
128
|
-
|
|
134
|
+
cachingMarshaller,
|
|
129
135
|
);
|
|
130
136
|
|
|
131
137
|
const { stableMint } = await provideAll(baggage, {
|
|
@@ -152,7 +158,7 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
152
158
|
WantMintedFee: ParamTypes.RATIO,
|
|
153
159
|
},
|
|
154
160
|
privateArgs.storageNode,
|
|
155
|
-
|
|
161
|
+
cachingMarshaller,
|
|
156
162
|
);
|
|
157
163
|
|
|
158
164
|
const anchorPool = provideEmptySeat(zcf, baggage, 'anchorPoolSeat');
|
|
@@ -442,4 +448,4 @@ export const start = async (zcf, privateArgs, baggage) => {
|
|
|
442
448
|
};
|
|
443
449
|
harden(start);
|
|
444
450
|
|
|
445
|
-
/** @typedef {
|
|
451
|
+
/** @typedef {EReturn<typeof start>['publicFacet']} PsmPublicFacet */
|