Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(agoric-cli): Add agoric publish subcommand #6147

Merged
merged 1 commit into from
Sep 13, 2022

Conversation

kriskowal
Copy link
Member

closes: #6087

Description

This is an agoric publish command that can post directly to the chain and return a hash bundle JSON blob, suitable for passing to zoe~.install.

Security Considerations

Documentation Considerations

This will be useful for documenting governance #6086

Testing Considerations

Works on my machine. To make work on your machine:

In cosmic-swingset:

make scenario2-run-chain

In another cosmic-swingset, use an ag-solo to provision an account. You may then turn off the ag-solo: it is not needed, and later commands must not depend on it.

make scenario2-run-client

In dapp-fungible-faucet, prepare a bundle.json:

yarn bundle-source --to bundles contract/src/contract.js contract

By whatever string-carving you prefer, convert the generated bundles/bundle-contract.js to bundles/bundle-contract.json. A small Node script that imports the JS and writes out JSON will suffice, or just removing the export default prefix and ; suffix in an editor will work too.

Continue:

agoric publish bundles/bundle-contract.json --node localhost:26657 --home ~/agoric-sdk/packages/cosmic-swingset/t1/8000/ 2>/dev/null

You can verify the publish with agoric follow: (the flags just provide block height published, block height observed, and ensure one line per publish).

agoric follow :bundles -bco jsonlines

You can also confirm with agd:

watch agd query vstorage data bundles

@Chris-Hibbert
Copy link
Contributor

Ack. I defer to other reviewers. Glad to see progress here.

@kriskowal kriskowal removed the request for review from Chris-Hibbert September 7, 2022 01:00
Copy link
Member

@dckc dckc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kriskowal kriskowal added the force:integration Force integration tests to run on PR label Sep 12, 2022
@kriskowal kriskowal changed the base branch from 5618-publish-bundle-helper to master September 13, 2022 20:57
@kriskowal kriskowal added the automerge:rebase Automatically rebase updates, then merge label Sep 13, 2022
@mergify mergify bot merged commit 165db93 into master Sep 13, 2022
@mergify mergify bot deleted the 6087-agoric-publish-command branch September 13, 2022 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge:rebase Automatically rebase updates, then merge force:integration Force integration tests to run on PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create agoric publish command
3 participants