-
Notifications
You must be signed in to change notification settings - Fork 4
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
Markm make exo not far #29
base: main
Are you sure you want to change the base?
Conversation
contract/package.json
Outdated
@@ -56,6 +57,7 @@ | |||
"@agoric/vats": "0.15.2-u14.0", | |||
"@agoric/zoe": "^0.26.3-u14.0", | |||
"@endo/bundle-source": "^2.8.0", | |||
"@endo/exo": "^1.3.0", |
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.
This dapp uses packages from agoric-upgrade-14. The version there seems to be "@endo/[email protected]".
https://github.com/Agoric/agoric-sdk/blob/d69c011001d300735546dcb74a9ae21e306e4789/yarn.lock#L1395
I don't know what happens if you mix in this version of exo.
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.
I think I need to wait until I can depend on a more recent endo before proceeding farther. I need at least support for M.raw()
in order to sidestep some of the exceptional cases.
I am surprised to see lots of async generator definitions in this repo. Looks like twelve! This is the cause of some of the special cases I need to sidestep. Where did these come from?
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.
Where did these [async generator definitions] come from?
Async iterators seemed like the natural API for query subscriptions, and async generators seemed like a convenient way to produce them for mocking purposes, as well as consuming them.
for example:
const { stringify: lit } = JSON;
...
const cosmosBalanceUpdates = () =>
dedup(poll(getCosmosBalances, { delay }), (a, b) => lit(a) === lit(b));
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.
In case M.raw()
is blocking progress here, it became available in Agoric SDK on March 20. Please let me know if there’s further Endo work in flight to unblock this draft.
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.
This dapp uses packages from agoric-upgrade-14. The version there seems to be "@endo/[email protected]".
In case M.raw() is blocking progress here,
It is.
it became available in Agoric SDK on March 20. Please let me know if there’s further Endo work in flight to unblock this draft.
What is needed so M.raw()
is available here?
@@ -177,7 +187,7 @@ export const mockWalletFactory = ( | |||
* | |||
* @param {Brand} brand | |||
*/ | |||
async function* purseUpdates(brand) { | |||
async function* purseUpdatesInternal(brand) { |
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.
If this change turns out to be pointless, revert it.
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.
Why did you make it?
produce.priceAuthority.resolve(Far('NullPriceAuthority', {})); | ||
produce.priceAuthority.resolve( | ||
makeExo( |
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.
I suggest skipping everything under test/
.
const deposit = makeExo( | ||
'DepositFacet', | ||
M.interface( | ||
'DepositFacet', | ||
{}, | ||
{ defaultGuards: 'passable', sloppy: true }, | ||
), | ||
{ | ||
receive: async payment => { | ||
const brand = await E(payment).getAllegedBrand(); |
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.
indenting everything further is tedious.
If we factor out the interface, can we avoid that?
const deposit = makeExo( | |
'DepositFacet', | |
M.interface( | |
'DepositFacet', | |
{}, | |
{ defaultGuards: 'passable', sloppy: true }, | |
), | |
{ | |
receive: async payment => { | |
const brand = await E(payment).getAllegedBrand(); | |
const sloppyGuards = { defaultGuards: 'passable', sloppy: true }; | |
const depositI = M.interface('DepositFacet', {}, sloppyGuards); | |
const deposit = makeExo('DepositFacet', depositI, { | |
receive: async payment => { | |
const brand = await E(payment).getAllegedBrand(); |
'NameHub', | ||
M.interface('NameHub', {}, { defaultGuards: 'passable', sloppy: true }), |
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.
repeating the 'NameHub'
string is tedious
refs: #26
Doesn't work yet. Putting up for now for reference.