Proposal details

#55 Enable stATOM Vault

Passed

Evaluate add-stATOM.js add-stATOM-oracles.js. See https://community.agoric.com/t/onboard-statom-as-collateral-on-chain-proposal/506

Submit time: 16 Oct 2023, 19:14

Details

Voting period

100.00%
16 Oct 2023, 19:2519 Oct 2023, 19:25

Core Eval Proposal

  • Title

    Enable stATOM Vault

  • Type

    CoreEvalProposal

  • Data
    {
    "evals":[
    0:{
    "jsonPermits":"{ "consume": { "bankManager": true, "agoricNamesAdmin": "makeCoreProposalBehavior", "reserveKit": true, "startUpgradable": true, "priceAuthorityAdmin": true, "priceAuthority": true, "auctioneerKit": "auctioneer", "vaultFactoryKit": "vaultFactory", "chainTimerService": true, "vatAdminSvc": "makeCoreProposalBehavior", "zoe": "makeCoreProposalBehavior" }, "produce": { "bankMints": true, "vBankKits": true }, "installation": { "consume": { "mintHolder": true, "scaledPriceAuthority": true } }, "instance": { "produce": true, "consume": true }, "brand": { "consume": { "IST": true } }, "evaluateBundleCap": "makeCoreProposalBehavior", "modules": { "utils": { "runModuleBehaviors": "makeCoreProposalBehavior" } } }"
    "jsCode":"// This is generated by writeCoreProposal; please edit! /* eslint-disable */ const manifestBundleRef = { bundleID: "b1-903e41a7c448a41b456298404a1c32c69302574209c6a5228723ed19e2dd99f2a693641196445bc27a90e19e1dfadfe6b3d9c9a93f080ffa33a70908e5af4fff", }; const getManifestCall = harden([ "getManifestForAddAssetToVault", { debtLimitValue: undefined, interchainAssetOptions: { decimalPlaces: 6, denom: "ibc/B1E6288B5A0224565D915D1F66716486F16D8A44BF33A9EC323DD6BA30764C35", initialPrice: undefined, issuerBoardId: undefined, issuerName: "stATOM", keyword: "STATOM", oracleBrand: "stATOM", proposedName: "stATOM", }, interestRateValue: undefined, }, ]); const overrideManifest = { addAssetToVault: { brand: { consume: { IST: true, }, }, consume: { agoricNamesAdmin: true, auctioneerKit: "auctioneer", chainTimerService: true, vaultFactoryKit: "vaultFactory", }, instance: { consume: true, }, }, publishInterchainAssetFromBank: { consume: { agoricNamesAdmin: true, bankManager: true, reserveKit: true, startUpgradable: true, }, installation: { consume: { mintHolder: true, }, }, produce: { bankMints: true, vBankKits: true, }, }, registerScaledPriceAuthority: { consume: { agoricNamesAdmin: true, priceAuthority: true, priceAuthorityAdmin: true, startUpgradable: true, }, installation: { consume: { scaledPriceAuthority: true, }, }, instance: { produce: true, }, }, }; // Make the behavior the completion value. (({ manifestBundleRef, getManifestCall, overrideManifest, E, log = console.info, restoreRef: overrideRestoreRef, }) => { const { entries, fromEntries } = Object; // deeplyFulfilled is a bit overkill for what we need. const shallowlyFulfilled = async obj => { if (!obj) { return obj; } const ents = await Promise.all( entries(obj).map(async ([key, valueP]) => { const value = await valueP; return [key, value]; }), ); return fromEntries(ents); }; /** @param {ChainBootstrapSpace & BootstrapPowers & { evaluateBundleCap: any }} allPowers */ const behavior = async allPowers => { // NOTE: If updating any of these names extracted from `allPowers`, you must // change `permits` above to reflect their accessibility. const { consume: { vatAdminSvc, zoe, agoricNamesAdmin }, evaluateBundleCap, // NO installation: { ... }, modules: { utils: { runModuleBehaviors }, }, } = allPowers; const [exportedGetManifest, ...manifestArgs] = getManifestCall; /** @type {(ref: import\('./externalTypes.js').ManifestBundleRef) => Promise<Installation<unknown>>} */ const defaultRestoreRef = async ref => { // extract-proposal.js creates these records, and bundleName is // the name under which the bundle was installed into // config.bundles const p = 'bundleName' in ref ? E(vatAdminSvc).getBundleIDByName(ref.bundleName) : ref.bundleID; const bundleID = await p; const label = bundleID.slice(0, 8); return E(zoe).installBundleID(bundleID, label); }; const restoreRef = overrideRestoreRef || defaultRestoreRef; // Get the on-chain installation containing the manifest and behaviors. console.info('evaluateBundleCap', { manifestBundleRef, exportedGetManifest, vatAdminSvc, }); let bcapP; if ('bundleName' in manifestBundleRef) { bcapP = E(vatAdminSvc).getNamedBundleCap(manifestBundleRef.bundleName); } else { bcapP = E(vatAdminSvc).getBundleCap(manifestBundleRef.bundleID); } const bundleCap = await bcapP; const manifestNS = await evaluateBundleCap(bundleCap); console.error('execute', { exportedGetManifest, behaviors: Object.keys(manifestNS), }); const { manifest, options: rawOptions, installations: rawInstallations, } = await manifestNS[exportedGetManifest]( harden({ restoreRef }), ...manifestArgs, ); // Await references in the options or installations. const [options, installations] = await Promise.all( [rawOptions, rawInstallations].map(shallowlyFulfilled), ); // DON'T Publish the installations for behavior dependencies. // ... // produceInstallations[key].resolve(value); // Evaluate the manifest for our behaviors. return runModuleBehaviors({ allPowers, behaviors: manifestNS, manifest: overrideManifest || manifest, makeConfig: (name, _permit) => { log('coreProposal:', name); return { options }; }, }); }; // Make the behavior the completion value. return behavior; })({ manifestBundleRef, getManifestCall, overrideManifest, E }); "
    }
    1:{
    "jsonPermits":"{ "consume": { "agoricNamesAdmin": "priceFeed", "board": "priceFeed", "chainStorage": "priceFeed", "chainTimerService": "priceFeed", "client": "priceFeed", "econCharterKit": "priceFeed", "highPrioritySendersManager": "priceFeed", "namesByAddressAdmin": "priceFeed", "priceAuthority": "priceFeed", "priceAuthorityAdmin": "priceFeed", "startGovernedUpgradable": "priceFeed", "vatAdminSvc": "makeCoreProposalBehavior", "zoe": "makeCoreProposalBehavior" }, "installation": {}, "instance": { "produce": "priceFeed" }, "namedVat": { "consume": { "agoricNames": "agoricNames" } }, "oracleBrand": { "produce": "priceFeed" }, "evaluateBundleCap": "makeCoreProposalBehavior", "modules": { "utils": { "runModuleBehaviors": "makeCoreProposalBehavior" } } }"
    "jsCode":"// This is generated by writeCoreProposal; please edit! /* eslint-disable */ const manifestBundleRef = { bundleID: "b1-80e6fe68b299c82c2d26802c312bc37966a559f7b28f87d058887a79a9db48ad97da2240e71e3f98986071da8fc3c5d02358bec577b17a89cee2b1cb3cd23958" }; const getManifestCall = harden([ "getManifestForPriceFeed", { AGORIC_INSTANCE_NAME: "stATOM-USD price feed", IN_BRAND_DECIMALS: 6, IN_BRAND_LOOKUP: ["agoricNames", "oracleBrand", "stATOM"], IN_BRAND_NAME: "stATOM", OUT_BRAND_DECIMALS: 4, OUT_BRAND_LOOKUP: ["agoricNames", "oracleBrand", "USD"], OUT_BRAND_NAME: "USD", brandInRef: undefined, brandOutRef: undefined, contractTerms: { POLL_INTERVAL: 30n, maxSubmissionCount: 1000, maxSubmissionValue: 115792089237316195423570985008687907853269984665640564039457584007913129639936n, minSubmissionCount: 2, minSubmissionValue: 1n, restartDelay: 1, timeout: 10, }, oracleAddresses: [ "agoric1krunjcqfrf7la48zrvdfeeqtls5r00ep68mzkr", "agoric19uscwxdac6cf6z7d5e26e0jm0lgwstc47cpll8", "agoric144rrhh4m09mh7aaffhm6xy223ym76gve2x7y78", "agoric19d6gnr9fyp6hev4tlrg87zjrzsd5gzr5qlfq2p", "agoric1n4fcxsnkxe4gj6e24naec99hzmc4pjfdccy5nj", ], }, ]); const overrideManifest = { createPriceFeed: { consume: { agoricNamesAdmin: "priceFeed", board: "priceFeed", chainStorage: "priceFeed", chainTimerService: "priceFeed", client: "priceFeed", econCharterKit: "priceFeed", highPrioritySendersManager: "priceFeed", namesByAddressAdmin: "priceFeed", priceAuthority: "priceFeed", priceAuthorityAdmin: "priceFeed", startGovernedUpgradable: "priceFeed", }, instance: { produce: "priceFeed", }, }, ensureOracleBrands: { namedVat: { consume: { agoricNames: "agoricNames", }, }, oracleBrand: { produce: "priceFeed", }, }, }; // Make the behavior the completion value. (({ manifestBundleRef, getManifestCall, overrideManifest, E, log = console.info, restoreRef: overrideRestoreRef, }) => { const { entries, fromEntries } = Object; // deeplyFulfilled is a bit overkill for what we need. const shallowlyFulfilled = async obj => { if (!obj) { return obj; } const ents = await Promise.all( entries(obj).map(async ([key, valueP]) => { const value = await valueP; return [key, value]; }), ); return fromEntries(ents); }; /** @param {ChainBootstrapSpace & BootstrapPowers & { evaluateBundleCap: any }} allPowers */ const behavior = async allPowers => { // NOTE: If updating any of these names extracted from `allPowers`, you must // change `permits` above to reflect their accessibility. const { consume: { vatAdminSvc, zoe, agoricNamesAdmin }, evaluateBundleCap, // NO installation: { ... }, modules: { utils: { runModuleBehaviors }, }, } = allPowers; const [exportedGetManifest, ...manifestArgs] = getManifestCall; /** @type {(ref: import\('./externalTypes.js').ManifestBundleRef) => Promise<Installation<unknown>>} */ const defaultRestoreRef = async ref => { // extract-proposal.js creates these records, and bundleName is // the name under which the bundle was installed into // config.bundles const p = 'bundleName' in ref ? E(vatAdminSvc).getBundleIDByName(ref.bundleName) : ref.bundleID; const bundleID = await p; const label = bundleID.slice(0, 8); return E(zoe).installBundleID(bundleID, label); }; const restoreRef = overrideRestoreRef || defaultRestoreRef; // Get the on-chain installation containing the manifest and behaviors. console.info('evaluateBundleCap', { manifestBundleRef, exportedGetManifest, vatAdminSvc, }); let bcapP; if ('bundleName' in manifestBundleRef) { bcapP = E(vatAdminSvc).getNamedBundleCap(manifestBundleRef.bundleName); } else { bcapP = E(vatAdminSvc).getBundleCap(manifestBundleRef.bundleID); } const bundleCap = await bcapP; const manifestNS = await evaluateBundleCap(bundleCap); console.error('execute', { exportedGetManifest, behaviors: Object.keys(manifestNS), }); const { manifest, options: rawOptions, installations: rawInstallations, } = await manifestNS[exportedGetManifest]( harden({ restoreRef }), ...manifestArgs, ); // Await references in the options or installations. const [options, installations] = await Promise.all( [rawOptions, rawInstallations].map(shallowlyFulfilled), ); // DON'T Publish the installations for behavior dependencies. // const installAdmin = E(agoricNamesAdmin).lookupAdmin('installation'); // ... // Evaluate the manifest for our behaviors. return runModuleBehaviors({ allPowers, behaviors: manifestNS, manifest: overrideManifest || manifest, makeConfig: (name, _permit) => { log('coreProposal:', name); return { options }; }, }); }; // Make the behavior the completion value. return behavior; })({ manifestBundleRef, getManifestCall, overrideManifest, E }); "
    }
    ]
    "@type":"/agoric.swingset.CoreEvalProposal"
    }