-
Notifications
You must be signed in to change notification settings - Fork 39
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
Documentation for the CoreEval feature #799
Changes from 1 commit
79db198
f5ca122
3076b3a
b429cf0
41ea905
398d7e6
647a07c
1d56b80
b22d2dd
fe3040a
c09f748
78aebad
e5492db
ef84da2
ca2b873
0a94fdd
0dbc077
eb90ae7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
You will need to write a proposal script that runs the contract, and possibly does additional things depending on your needs. (Usually these additional things will be dependent on a governance vote.) For example, [gov-add-psm.js](https://github.com/Agoric/agoric-sdk/blob/master/packages/inter-protocol/test/psm/gov-add-psm.js) is a proposal Agoric created for the PSM contract: | ||
|
||
::: details Show example proposal | ||
```jsx | ||
/* global startPSM */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The The global environment for CoreEval scripts is another thing we should document: where Documenting And
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It sounds like you're saying that startPSM isn't a part of CoreEval's global environment anymore. But gov-add-psm.js is checked-in code, it appears to assume that startPSM is part of its global environment, and the code works when I run it. So it seems like startPSM is still in global? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
yes, but there are no automated tests for it
That surprises me. There are no errors in the agd logs? And you can see a new PSM contract started with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @michaelfig , @Tyrosine22 says you were there when it worked for him. Any idea how the global reference to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Suggestion: just say "The script executes in an environment with globals such as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
We verified that the vote passed and that something happened on the chain.
I don't know if the proposal contents were viable or completed successfully, only that they were initiated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The following text was added to the top blurb on proposal.md: "The script executes in an environment with globals such as E and Far provided." |
||
// @ts-nocheck | ||
|
@@ -51,9 +52,4 @@ const main = async permittedPowers => { | |
main; | ||
|
||
``` | ||
|
||
Bundle your contract by navigating to `<agoric-sdk>/packages/vats` and running | ||
|
||
``` | ||
yarn bundle-source --cache-json bundles/ <PATH_TO_CONTRACT> <CONTRACT_NAME> | ||
``` | ||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"How can I tell?" I can imagine our audience asking. I suggest providing an example log entry showing a block being produced.
(suggestion; not critical / important)