-
Notifications
You must be signed in to change notification settings - Fork 1
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(launchIt): launch a token (WIP) #7
base: dc-starter
Are you sure you want to change the base?
Conversation
39319ac
to
657f685
Compare
c69d6ff
to
37ebda2
Compare
28f316e
to
67332ee
Compare
separate contract for each launch, using contractStarter13 tests are passing as of 2029597. The launcher Larry, story, so far, is:
|
* @param {string} kw | ||
*/ | ||
const makeZcfIssuerKit = async (zcf, kw) => { | ||
const mint = await zcf.makeZCFMint(kw); |
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 wonder if it's better to throw, than to prepend with KW
. Is ^[A-Z]/
something that could/should be supported by @endo/patterns
?
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.
yeah; that's clearly a KLUDGE
endo/patterns avoids regex stuff.
The core issue is: makeZCFMint conflates issuerName with keyword. I want the brand to print as BRD, but keywords are more naturally for a role played by a brand in the contract; in this case, Minted. IOU an agoric-sdk issue on this.
working in 1 case: Larry launches BRD; market discovers priceLarry minted 1_000_000 BRD. A dozen fans bought shares and the market discovered a price of 0.000379 MNY/BRD. 2024-01-15 15:35 9d88719 test-launchIt: basic scenario complete yarn test test/test-launchIt.js
|
{ want: { Shares: ShapeAmt.Share } }, | ||
), | ||
Withdraw: M.splitRecord({ | ||
want: { Deposit: ShapeAmt.Deposit }, |
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 has different bracing than the previous lines. That seems more like a bug than a difference.
}, | ||
}; | ||
// export these from a client interface module? | ||
const Shape = harden({ |
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.
there's a subtle difference between M.splitRecord({ give: X, want: Y}) and M.splitRecord({ give: X }, { want: Y })
merits a comment
ack: @dtribble
*/ | ||
export const start = async (zcf, _privateArgs, _baggage) => { | ||
const { name, supplyQty, displayInfo = {}, brands } = zcf.getTerms(); | ||
mustMatch(brands, M.splitRecord({ Deposit: BrandShape })); |
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 M.splitRecord(...)
instead of harden({ Deposit: BrandShape })
? Are we expecting brands
to be keyed with anything else?
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.
At the time, I only needed this brand to exist for the code I was writing to be correct.
Stepping back and looking at the whole thing now, no, I don't think there are any others.
start launchIt with contractStarter on a local chain
deploy contract starter: yarn docker:make deploy-contract
yarn docker:make install-launchIt
start launchIt with contractStarter: offer-tool.js bundles/bundle-launchIt.json
|
c79876c
to
2e8dd66
Compare
9d5a04c
to
f08702b
Compare
- use zoe exit for deadline - test-launchIt: start with contractStarter - larry returns instance so others can subscribe / deposit - Larry's wallet needs to know about MNY (recall upcoming HACK to add stuff to agoricNames) - NEEDSTEST: withdraw - NEEDSTEST: unhappy paths, esp timing - test: prune albert dead code tests: ✔ boot, walletFactory, contractStarter ✔ start launchIt instance to launch token
- update tests
goal:
fixes #15
DRAFT until: