• Overview

  • Overview
  • Blockchain

  • Blockchain
  • BlocksTransactionsTop accounts
  • Validators

  • Validators
  • Proposals

  • Proposals
  • Utilities

  • Utilities
  • ParametersConsensusUptimeAPI
  • Relayers

  • Relayers
  • Nodes

  • Nodes

mainnet

agoric-3

Latest Block

‌
‌

Powered by

STAKEME
Backend: —Frontend: v4.6.0-50bb8e0e

Company

About usStakingFaucetBrand kit

Contribute

Contact usBug reportStatus page

Socials

Proposal details

#104 YMax Alpha 1.3: Delegate Control of ymax0 Contract

Voting period
CoreEvalProposal

For background and discussion, see: [YMax PoC forum thread](https://community.agoric.com/t/ymax-poc-a-step-toward-seamless-defi-control/864/6). Proposal executes code corresponding to commit 65740e1.

Submit time: 19 Aug 2025, 01:15

Details

Voting period

27.54%

19 Aug 2025, 01:1522 Aug 2025, 01:15

Core Eval Proposal

  • Title

    YMax Alpha 1.3: Delegate Control of ymax0 Contract

  • Type

    CoreEvalProposal

  • Data
    {
    "evals":[
    0:{
    "jsonPermits":"{ "consume": { "contractKits": "to upgrade walletFactory using its adminFacet", "governedContractKits": "to get walletReviver from provisionPool.creatorFacet", "chainStorage": "to allow walletFactory to (continue) write to vstorage", "walletBridgeManager": "to handle bridged cosmos SpendAction messages", "agoricNames": true, "board": true, "agoricNamesAdmin": "makeCoreProposalBehavior", "vatAdminSvc": "makeCoreProposalBehavior", "zoe": "makeCoreProposalBehavior" }, "instance": { "consume": { "walletFactory": true, "provisionPool": true } }, "evaluateBundleCap": "makeCoreProposalBehavior", "installation": { "produce": "makeCoreProposalBehavior" }, "modules": { "utils": { "runModuleBehaviors": "makeCoreProposalBehavior" } } }"
    "jsCode":"// This is generated by writeCoreEval; please edit! /* eslint-disable */ const manifestBundleRef = {bundleID:"b1-e28e3d70354bb0f3f4634230792979708a0767e9405fee2bc344d7108dbb53dd8f937ddd93669c004ede91e819c29766caf15306691b0951be06ba5071839df3"}; const getManifestCall = harden([ "getManifestForUpgrade", { walletFactoryRef: { bundleID: "b1-c632e2420615f7091840a0f9bd7e82c250e3e273ee9f8c0172193653a98e06cf279c8debeb0d0a7ac5ea6d476185991aae7593275dff4b02d166c449daf853bf", }, }, ]); const customManifest = { publishAgoricBrandsDisplayInfo: { consume: { agoricNames: true, board: true, chainStorage: true, }, }, upgradeWalletFactory: { consume: { chainStorage: "to allow walletFactory to (continue) write to vstorage", contractKits: "to upgrade walletFactory using its adminFacet", governedContractKits: "to get walletReviver from provisionPool.creatorFacet", walletBridgeManager: "to handle bridged cosmos SpendAction messages", }, instance: { consume: { provisionPool: true, walletFactory: true, }, }, }, }; // Make a behavior function and "export" it by way of script completion value. // It is constructed by an anonymous invocation to ensure the absence of a global binding // for makeCoreProposalBehavior, which may not be necessary but preserves behavior pre-dating // https://github.com/Agoric/agoric-sdk/pull/8712 . const behavior = (({ manifestBundleRef, getManifestCall: [manifestGetterName, ...manifestGetterArgs], customManifest, E, log = console.info, customRestoreRef, }) => { const { entries, fromEntries } = Object; /** * Given an object whose properties may be promise-valued, return a promise * for an analogous object in which each such value has been replaced with its * fulfillment. * This is a non-recursive form of endo `deeplyFulfilled`. * * @template T * @param {{[K in keyof T]: (T[K] | Promise<T[K]>)}} obj * @returns {Promise<T>} */ const shallowlyFulfilled = async obj => { if (!obj) { return obj; } const awaitedEntries = await Promise.all( entries(obj).map(async ([key, valueP]) => { const value = await valueP; return [key, value]; }), ); return fromEntries(awaitedEntries); }; const makeRestoreRef = (vatAdminSvc, zoe) => { /** @type {(ref: import\('./externalTypes.js').ManifestBundleRef) => Promise<Installation<unknown>>} */ const defaultRestoreRef = async bundleRef => { // extract-proposal.js creates these records, and bundleName is // the optional name under which the bundle was installed into // config.bundles const bundleIdP = 'bundleName' in bundleRef ? E(vatAdminSvc).getBundleIDByName(bundleRef.bundleName) : bundleRef.bundleID; const bundleID = await bundleIdP; const label = bundleID.slice(0, 8); return E(zoe).installBundleID(bundleID, label); }; return defaultRestoreRef; }; /** @param {ChainBootstrapSpace & BootstrapPowers & { evaluateBundleCap: any }} powers */ const coreProposalBehavior = async powers => { // NOTE: `powers` is expected to match or be a superset of the above `permits` export, // which should therefore be kept in sync with this deconstruction code. // HOWEVER, do note that this function is invoked with at least the *union* of powers // required by individual moduleBehaviors declared by the manifest getter, which is // necessary so it can use `runModuleBehaviors` to provide the appropriate subset to // each one (see ./writeCoreEvalParts.js). // Handle `powers` with the requisite care. const { consume: { vatAdminSvc, zoe, agoricNamesAdmin }, evaluateBundleCap, installation: { produce: produceInstallations }, modules: { utils: { runModuleBehaviors }, }, } = powers; // Get the on-chain installation containing the manifest and behaviors. log('evaluateBundleCap', { manifestBundleRef, manifestGetterName, vatAdminSvc, }); let bcapP; if ('bundleName' in manifestBundleRef) { bcapP = E(vatAdminSvc).getNamedBundleCap(manifestBundleRef.bundleName); } else if ('bundleID' in manifestBundleRef) { bcapP = E(vatAdminSvc).getBundleCap(manifestBundleRef.bundleID); } else { const keys = Reflect.ownKeys(manifestBundleRef).map(key => typeof key === 'string' ? JSON.stringify(key) : String(key), ); const keysStr = `[${keys.join(', ')}]`; throw Error( `bundleRef must have own bundleName or bundleID, missing in ${keysStr}`, ); } const bundleCap = await bcapP; const proposalNS = await evaluateBundleCap(bundleCap); // Get the manifest and its metadata. log('execute', { manifestGetterName, bundleExports: Object.keys(proposalNS), }); const restoreRef = customRestoreRef || makeRestoreRef(vatAdminSvc, zoe); const { manifest, options: rawOptions, installations: rawInstallations, } = await proposalNS[manifestGetterName]( harden({ restoreRef }), ...manifestGetterArgs, ); // Await promises in the returned options and installations records. const [options, installations] = await Promise.all( [rawOptions, rawInstallations].map(shallowlyFulfilled), ); // Publish the installations for our dependencies. const installationEntries = entries(installations || {}); if (installationEntries.length > 0) { const installAdmin = E(agoricNamesAdmin).lookupAdmin('installation'); await Promise.all( installationEntries.map(([key, value]) => { produceInstallations[key].reset(); produceInstallations[key].resolve(value); return E(installAdmin).update(key, value); }), ); } // Evaluate the manifest. return runModuleBehaviors({ // Remember that `powers` may be arbitrarily broad. allPowers: powers, behaviors: proposalNS, manifest: customManifest || manifest, makeConfig: (name, _permit) => { log('coreProposal:', name); return { options }; }, }); }; return coreProposalBehavior; })({ manifestBundleRef, getManifestCall, customManifest, E }); behavior; "
    }
    1:{
    "jsonPermits":"{ "consume": { "startUpgradable": true, "namesByAddress": true, "localchain": true, "cosmosInterchainService": true, "chainStorage": true, "chainTimerService": true, "agoricNames": true, "board": true, "zoe": "makeCoreProposalBehavior", "agoricNamesAdmin": "makeCoreProposalBehavior", "getDepositFacet": true, "ymax0Kit": true, "vatAdminSvc": "makeCoreProposalBehavior" }, "installation": { "consume": { "postalService": true }, "produce": "makeCoreProposalBehavior" }, "instance": { "produce": { "postalService": true }, "consume": { "postalService": true } }, "evaluateBundleCap": "makeCoreProposalBehavior", "modules": { "utils": { "runModuleBehaviors": "makeCoreProposalBehavior" } } }"
    "jsCode":"// This is generated by writeCoreEval; please edit! /* eslint-disable */ const manifestBundleRef = {bundleID:"b1-3882b7567ceb6fea0f8901d9329756bae3694b0b55bd36ca60bbf9f1e360df470aa9b059e8dff3f75afd460fd01b9fe4d6e3f6eca6ccde1e8832d51d0c574b7c"}; const getManifestCall = harden([ "getManifestForPortfolioControl", { installKeys: { postalService: { bundleID: "b1-9486f1a9b190fd5aebaeb371674567e03813d7e63f16f1c94e8ea4722eeb8d696dac171b7ed144edc2520eb49ede449205f5866835249f75ca940547665e9073", }, }, options: { ymaxControlAddress: "agoric1e80twfutmrm3wrk3fysjcnef4j82mq8dn6nmcq", }, }, ]); const customManifest = { delegatePortfolioContract: { consume: { agoricNames: true, agoricNamesAdmin: true, board: true, chainStorage: true, chainTimerService: true, cosmosInterchainService: true, getDepositFacet: true, localchain: true, startUpgradable: true, ymax0Kit: true, zoe: true, }, instance: { consume: { postalService: true, }, }, }, deployPostalService: { consume: { namesByAddress: true, startUpgradable: true, }, installation: { consume: { postalService: true, }, }, instance: { produce: { postalService: true, }, }, }, }; // Make a behavior function and "export" it by way of script completion value. // It is constructed by an anonymous invocation to ensure the absence of a global binding // for makeCoreProposalBehavior, which may not be necessary but preserves behavior pre-dating // https://github.com/Agoric/agoric-sdk/pull/8712 . const behavior = (({ manifestBundleRef, getManifestCall: [manifestGetterName, ...manifestGetterArgs], customManifest, E, log = console.info, customRestoreRef, }) => { const { entries, fromEntries } = Object; /** * Given an object whose properties may be promise-valued, return a promise * for an analogous object in which each such value has been replaced with its * fulfillment. * This is a non-recursive form of endo `deeplyFulfilled`. * * @template T * @param {{[K in keyof T]: (T[K] | Promise<T[K]>)}} obj * @returns {Promise<T>} */ const shallowlyFulfilled = async obj => { if (!obj) { return obj; } const awaitedEntries = await Promise.all( entries(obj).map(async ([key, valueP]) => { const value = await valueP; return [key, value]; }), ); return fromEntries(awaitedEntries); }; const makeRestoreRef = (vatAdminSvc, zoe) => { /** @type {(ref: import\('./externalTypes.js').ManifestBundleRef) => Promise<Installation<unknown>>} */ const defaultRestoreRef = async bundleRef => { // extract-proposal.js creates these records, and bundleName is // the optional name under which the bundle was installed into // config.bundles const bundleIdP = 'bundleName' in bundleRef ? E(vatAdminSvc).getBundleIDByName(bundleRef.bundleName) : bundleRef.bundleID; const bundleID = await bundleIdP; const label = bundleID.slice(0, 8); return E(zoe).installBundleID(bundleID, label); }; return defaultRestoreRef; }; /** @param {ChainBootstrapSpace & BootstrapPowers & { evaluateBundleCap: any }} powers */ const coreProposalBehavior = async powers => { // NOTE: `powers` is expected to match or be a superset of the above `permits` export, // which should therefore be kept in sync with this deconstruction code. // HOWEVER, do note that this function is invoked with at least the *union* of powers // required by individual moduleBehaviors declared by the manifest getter, which is // necessary so it can use `runModuleBehaviors` to provide the appropriate subset to // each one (see ./writeCoreEvalParts.js). // Handle `powers` with the requisite care. const { consume: { vatAdminSvc, zoe, agoricNamesAdmin }, evaluateBundleCap, installation: { produce: produceInstallations }, modules: { utils: { runModuleBehaviors }, }, } = powers; // Get the on-chain installation containing the manifest and behaviors. log('evaluateBundleCap', { manifestBundleRef, manifestGetterName, vatAdminSvc, }); let bcapP; if ('bundleName' in manifestBundleRef) { bcapP = E(vatAdminSvc).getNamedBundleCap(manifestBundleRef.bundleName); } else if ('bundleID' in manifestBundleRef) { bcapP = E(vatAdminSvc).getBundleCap(manifestBundleRef.bundleID); } else { const keys = Reflect.ownKeys(manifestBundleRef).map(key => typeof key === 'string' ? JSON.stringify(key) : String(key), ); const keysStr = `[${keys.join(', ')}]`; throw Error( `bundleRef must have own bundleName or bundleID, missing in ${keysStr}`, ); } const bundleCap = await bcapP; const proposalNS = await evaluateBundleCap(bundleCap); // Get the manifest and its metadata. log('execute', { manifestGetterName, bundleExports: Object.keys(proposalNS), }); const restoreRef = customRestoreRef || makeRestoreRef(vatAdminSvc, zoe); const { manifest, options: rawOptions, installations: rawInstallations, } = await proposalNS[manifestGetterName]( harden({ restoreRef }), ...manifestGetterArgs, ); // Await promises in the returned options and installations records. const [options, installations] = await Promise.all( [rawOptions, rawInstallations].map(shallowlyFulfilled), ); // Publish the installations for our dependencies. const installationEntries = entries(installations || {}); if (installationEntries.length > 0) { const installAdmin = E(agoricNamesAdmin).lookupAdmin('installation'); await Promise.all( installationEntries.map(([key, value]) => { produceInstallations[key].reset(); produceInstallations[key].resolve(value); return E(installAdmin).update(key, value); }), ); } // Evaluate the manifest. return runModuleBehaviors({ // Remember that `powers` may be arbitrarily broad. allPowers: powers, behaviors: proposalNS, manifest: customManifest || manifest, makeConfig: (name, _permit) => { log('coreProposal:', name); return { options }; }, }); }; return coreProposalBehavior; })({ manifestBundleRef, getManifestCall, customManifest, E }); behavior; "
    }
    ]
    "@type":"/agoric.swingset.CoreEvalProposal"
    }