"jsonPermits":"{
"consume": {
"agoricNamesAdmin": true,
"bankManager": true,
"board": true,
"chainStorage": true,
"zoe": "zoe",
"feeMintAccess": "zoe",
"economicCommitteeCreatorFacet": "economicCommittee",
"provisionPoolStartResult": true,
"psmCharterCreatorFacet": "psmCharter",
"psmFacets": true,
"chainTimerService": "timer"
},
"produce": {
"testFirstAnchorKit": true
},
"installation": {
"consume": {
"contractGovernor": true,
"psm": true,
"mintHolder": true
}
},
"instance": {
"consume": {
"economicCommittee": true
}
},
"brand": { "consume": { "DAI": true, "IST": true } }
}
"
"jsCode":"/* global startPSM */
// @ts-check
/**
* @typedef {{
* denom: string,
* keyword?: string,
* proposedName?: string,
* decimalPlaces?: number
* }} AnchorOptions
*/
/** @type {AnchorOptions[]} */
const assetDetails = [
{
keyword: 'DAI_axl',
proposedName: 'DAI',
decimalPlaces: 18,
denom:
'ibc/3914BDEF46F429A26917E4D8D434620EC4817DC6B6E68FB327E190902F1E9242',
},
{
keyword: 'DAI_grv',
proposedName: 'DAI',
decimalPlaces: 18,
denom:
'ibc/3D5291C23D776C3AA7A7ABB34C7B023193ECD2BC42EA19D3165B2CF9652117E7',
},
];
const initParams = {
WantMintedFeeBP: 0n,
GiveMintedFeeBP: 0n,
MINT_LIMIT: 1_000_000000n, // 1000 IST
};
/** @param {*} permittedPowers see gov-add-psm-permit.json */
const main = async permittedPowers => {
const {
consume: { feeMintAccess: _, ...restC },
...restP
} = permittedPowers;
const noMinting = { consume: restC, ...restP };
await Promise.all(
assetDetails.map(async anchorOptions => {
console.log('starting PSM:', anchorOptions);
const config = { ...initParams, options: { anchorOptions } };
await Promise.all([
startPSM.makeAnchorAsset(noMinting, { options: { anchorOptions } }),
startPSM.startPSM(permittedPowers, config),
]);
console.log('started PSM:', config);
}),
);
};
// "export" from script
main;
"