-
These under-documented details of permissioned deployment have come up in work with @Chris-Hibbert on #8018 and with @iomekam on #7954. |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
Detail:
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
TODO: more details to explain
|
Beta Was this translation helpful? Give feedback.
-
Cross-posting some findings from Discord:Deploying Bundles
# @see https://github.com/0xpatrickdev/agoric-vault-collateral-proposal/#1-deploy-bundles
NODE=http://localhost:26657
WALLET=dev-local
CHAIN_ID=agoriclocal
B1=b1-903e41a7c448a41b456298404a1c32c69302574209c6a5228723ed19e2dd99f2a693641196445bc27a90e19e1dfadfe6b3d9c9a93f080ffa33a70908e5af4fff.json
B2=b1-80e6fe68b299c82c2d26802c312bc37966a559f7b28f87d058887a79a9db48ad97da2240e71e3f98986071da8fc3c5d02358bec577b17a89cee2b1cb3cd23958.json
agd tx swingset install-bundle @$B1 --node $NODE --from $WALLET --chain-id $CHAIN_ID --gas=auto --gas-adjustment=1.2 -y -b block
agd tx swingset install-bundle @$B2 --node $NODE --from $WALLET --chain-id $CHAIN_ID --gas=auto --gas-adjustment=1.2 -y -b block
# depending on the chain settings, a `--fees=45000ubld` flag may also be needed |
Beta Was this translation helpful? Give feedback.
-
more on ProposalThe proposal is called with export const foo = async (
{
consume: {
...
},
brands: {
...
}
},
options,
) => {
// do the things using powers and options
};
export const getManifestForFoo = (powers, options) => {
manifest: {
[foo.name]: {
consume: {
...
},
options,
)}; ScriptThe script describes how to build the core proposal for "sdk-generate": ["test-localchain"], If there are multiple submissions, each entry has to specify the script name and "sdk-generate": [
"probe-zcf-bundle probe-submission",
"updatePriceFeeds priceFeed-submission",
"add-auction newAuction-submission"
], Script files should export export const defaultProposalBuilder = ({ publishRef, install }) => {
return harden({
sourceSpec: '@agoric/vats/src/proposals/foo.js',
getManifestCall: [
'getManifestForFoo',
{
fooRef: publishRef(install('@agoric/...')),
...otherParams,
},
],
});
};
`
export default async (homeP, endowments) => {
const { writeCoreProposal } = await makeHelpers(homeP, endowments);
await writeCoreProposal('proposalName', defaultProposalBuilder);
}; The first element of The second element of agoric-sdk/a3p-integration/README.md Lines 133 to 219 in 4c47805 |
Beta Was this translation helpful? Give feedback.
agoric run
supports bundling proposal modules withwriteCoreProposal
For example: proposals/restart-vats-proposal.js starts with declarations such as
import { M, mustMatch } from '@agoric/store';
. To bundle itagoric run scripts/restart-vats.js
writeCoreProposal
.The links should go to the ta/deployment-types branch from PR #7895 to show static types. I might have missed in some cases.
The general approach is:
import
other modules as appropriate. This module consists ofpowers
argument.