Markm make exo not far#29
Conversation
| "@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.
This dapp uses packages from agoric-upgrade-14. The version there seems to be "@endo/exo@0.2.2".
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.
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.
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.
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.
This dapp uses packages from agoric-upgrade-14. The version there seems to be "@endo/exo@0.2.2".
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?
| * @param {Brand} brand | ||
| */ | ||
| async function* purseUpdates(brand) { | ||
| async function* purseUpdatesInternal(brand) { |
There was a problem hiding this comment.
If this change turns out to be pointless, revert it.
| produce.priceAuthority.resolve(Far('NullPriceAuthority', {})); | ||
| produce.priceAuthority.resolve( | ||
| makeExo( |
There was a problem hiding this comment.
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.
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.
repeating the 'NameHub' string is tedious
refs: #26
Doesn't work yet. Putting up for now for reference.