Created
February 23, 2022 18:55
-
-
Save dckc/9382f78397fd431567c5ade0a59ce5cb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome to Agoric! | |
command[0] | |
1+1 | |
history[0] | |
2 | |
command[1] | |
home.LOADING | |
history[1] | |
["agoric","wallet"] | |
command[2] | |
({keys} = Object) | |
history[2] | |
[Function Object] | |
command[3] | |
keys(local) | |
history[3] | |
["http","localTimerService","network","plugin","scratch","spawner","vattp"] | |
command[4] | |
keys(agoric) | |
history[4] | |
[] | |
command[5] | |
E(local.localTimerService).getCurrentTimestamp() | |
history[5] | |
1645640449578n | |
command[6] | |
new Date() | |
history[6] | |
{} | |
command[7] | |
E(home.scratch).entries() | |
history[7] | |
Promise.reject("TypeError: target has no method \"entries\", has [\"delete\",\"get\",\"init\",\"keys\",\"list\",\"set\"]") | |
command[8] | |
E(home.scratch).keys() | |
history[8] | |
[] | |
command[9] | |
home.LOADING | |
history[9] | |
["wallet"] | |
command[10] | |
keys(agoric) | |
history[10] | |
["agoricNames","bank","behaviors","board","chainTimerService","faucet","governanceActions","ibcport","myAddressNameAdmin","namesByAddress","zoe"] | |
command[11] | |
note = { proposedName: 'Note', issuer: '1107051844', brand: '177231517' } | |
history[11] | |
{"proposedName":"Note","issuer":"1107051844","brand":"177231517"} | |
command[12] | |
E(home.scratch).get('noteMint') | |
history[12] | |
[Object Alleged: Note mint]{} | |
command[13] | |
note.mint = history[12] | |
history[13] | |
[Object Alleged: Note mint]{} | |
command[14] | |
E(home.board).getValue(note.issuer) | |
history[14] | |
[Object Alleged: Note issuer]{} | |
command[15] | |
note.issuer = history[14] | |
history[15] | |
[Object Alleged: Note issuer]{} | |
command[16] | |
E(home.board).getValue(note.brand) | |
history[16] | |
[Object Alleged: Note brand]{} | |
command[17] | |
note.brand = history[16] | |
history[17] | |
[Object Alleged: Note brand]{} | |
command[18] | |
note.unit = 100n | |
history[18] | |
100n | |
command[19] | |
note.makeAmount = n => harden({ brand: note.brand, value: note.unit * n }) | |
history[19] | |
[Function <anon>] | |
command[20] | |
note.makeAmount(10n) | |
history[20] | |
{"brand":[Object Alleged: Note brand]{},"value":1000n} | |
command[21] | |
E(note.mint).mintPayment(note.makeAmount(1000n)) | |
history[21] | |
[Object Alleged: Note payment]{} | |
command[22] | |
E(note.issuer).getAmountOf(history[21]) | |
history[22] | |
{"brand":[Object Alleged: Note brand]{},"value":100000n} | |
command[23] | |
note.pmt1000 = history[21] | |
history[23] | |
[Object Alleged: Note payment]{} | |
command[24] | |
E(E(home.wallet).getAdminFacet()).addPaysldjflkjsd() | |
history[24] | |
Promise.reject("TypeError: target has no method \"addPaysldjflkjsd\", has [\"acceptOffer\",\"addContact\",\"addInstallation\",\"addInstance\",\"addIssuer\",\"addOffer\",\"addPayment\",\"cancelOffer\",\"declineOffer\",\"deposit\",\"disableAutoDeposit\",\"enableAutoDeposit\",\"getAgoricNames\",\"getAttenuatedPursesNotifier\",\"getBoard\",\"getBrand\",\"getBrandPetnames\",\"getContactsNotifier\",\"getDappsNotifier\",\"getDepositFacetId\",\"getInboxNotifier\",\"getInstallation\",\"getInstallationManager\",\"getInstallations\",\"getInstance\",\"getInstanceManager\",\"getIssuer\",\"getIssuerManager\",\"getIssuers\",\"getIssuersNotifier\",\"getNamesByAddress\",\"getOfferResult\",\"getOffers\",\"getOffersNotifier\",\"getPaymentsNotifier\",\"getPurse\",\"getPurseIssuer\",\"getPurses\",\"getPursesNotifier\",\"getSeat\",\"getSeats\",\"getSelfContact\",\"getUINotifier\",\"getZoe\",\"makeEmptyPurse\",\"publishIssuer\",\"renameInstallation\",\"renameInstance\",\"renameIssuer\",\"saveOfferResult\",\"suggestInstallation\",\"suggestInstance\",\"suggestIssuer\",\"waitForDappApproval\"]") | |
command[25] | |
E(E(home.wallet).getAdminFacet()).addPayment(note.pmt1000) | |
history[25] | |
unresolved Promise | |
command[26] | |
E(E(home.wallet).getAdminFacet()).addPayment(note.pmt1000) | |
history[26] | |
undefined | |
command[27] | |
E(home.agoricNames).help() | |
history[27] | |
Promise.reject("TypeError: target has no method \"help\", has [\"entries\",\"keys\",\"lookup\",\"values\"]") | |
command[28] | |
E(home.agoricNames).lookup('instance', 'amm') | |
history[28] | |
[Object Alleged: InstanceHandle]{} | |
command[29] | |
E(home.zoe).getPublicFacet(history[28]) | |
history[29] | |
[Object Alleged: publicFacet]{} | |
command[30] | |
ammAPI=history[29] | |
history[30] | |
[Object Alleged: publicFacet]{} | |
command[31] | |
E(ammAPI).help() | |
history[31] | |
Promise.reject("TypeError: target has no method \"help\", has [\"addPool\",\"getAllPoolBrands\",\"getAmount\",\"getBrand\",\"getContractGovernor\",\"getGovernedParams\",\"getInputPrice\",\"getInstallation\",\"getInstance\",\"getInvitationAmount\",\"getLiquidityIssuer\",\"getLiquiditySupply\",\"getNat\",\"getOutputPrice\",\"getPoolAllocation\",\"getPriceAuthorities\",\"getProtocolPoolBalance\",\"getQuoteIssuer\",\"getRatio\",\"getString\",\"getSubscription\",\"getUnknown\",\"makeAddLiquidityAtRateInvitation\",\"makeAddLiquidityInvitation\",\"makeRemoveLiquidityInvitation\",\"makeSwapInInvitation\",\"makeSwapInvitation\",\"makeSwapOutInvitation\"]") | |
command[32] | |
E(ammAPI).addPool() | |
history[32] | |
Promise.reject("Error: keyword \"undefinedLiquidity\" must be an ascii identifier starting with upper case.") | |
command[33] | |
E(ammAPI).addPool('Note', note.issuer) | |
history[33] | |
Promise.reject("Error: keyword \"[[object Alleged: Note issuer]Liquidity]\" must be an ascii identifier starting with upper case.") | |
command[34] | |
E(ammAPI).addPool(note.issuer, 'Note') | |
history[34] | |
[Object Alleged: NoteLiquidity issuer]{} | |
command[35] | |
note.liquidity = { issuer: history[34] } | |
history[35] | |
{"issuer":[Object Alleged: NoteLiquidity issuer]{}} | |
command[36] | |
E(ammAPI).makeAddLiquidityInvitation() | |
history[36] | |
[Object Alleged: Zoe Invitation payment]{} | |
command[37] | |
proposal = { give: { Central: RUN.makeAmount(50), Secondary: note.makeAmount(100), }, want: { Liquidity: { brand: liquidityBrand, value: 0n } }, } | |
history[37] | |
exception: [TypeError: ?: cannot coerce undefined to object] | |
command[38] | |
E(home.wallet).getPurses() | |
history[38] | |
[["Agoric RUN currency",[Object Alleged: RUN purse]{}],["Agoric staking token",[Object Alleged: BLD purse]{}],["Default Zoe invite purse",[Object Alleged: Zoe Invitation purse]{}],["NoteP1",[Object Alleged: Note purse]{}],["Oracle fee",[Object Alleged: LINK purse]{}],["USD Coin",[Object Alleged: USDC purse]{}]] | |
command[39] | |
history[38][0][1] | |
history[39] | |
[Object Alleged: RUN purse]{} | |
command[40] | |
RUN = { purse: history[39] } | |
history[40] | |
{"purse":[Object Alleged: RUN purse]{}} | |
command[41] | |
E(RUN.purse).withdraw() | |
history[41] | |
Promise.reject("Error: \"amount\" (an undefined) must be a pass-by-copy record, not \"undefined\"") | |
command[42] | |
E(home.wallet).getIssuers() | |
history[42] | |
[["BLD",[Object Alleged: BLD issuer]{}],["LINK",[Object Alleged: LINK issuer]{}],["Note1",[Object Alleged: Note issuer]{}],["RUN",[Object Alleged: RUN issuer]{}],["USDC",[Object Alleged: USDC issuer]{}],["zoe invite",[Object Alleged: Zoe Invitation issuer]{}]] | |
command[43] | |
history[42][3][1] | |
history[43] | |
[Object Alleged: RUN issuer]{} | |
command[44] | |
RUN.issuer = history[43] | |
history[44] | |
[Object Alleged: RUN issuer]{} | |
command[45] | |
E(RUN.issuer).getBrand() | |
history[45] | |
[Object Alleged: RUN brand]{} | |
command[46] | |
RUN.brand = history[45] | |
history[46] | |
[Object Alleged: RUN brand]{} | |
command[47] | |
RUN.unit = 1_000_000n | |
history[47] | |
1000000n | |
command[48] | |
RUN.makeAmount = n => {brand: RUN.brand, value: RUN.unit * n} | |
history[48] | |
exception: [SyntaxError: missing ;] | |
command[49] | |
RUN.makeAmount = n => harden({brand: RUN.brand, value: RUN.unit * n}) | |
history[49] | |
[Function <anon>] | |
command[50] | |
proposal = { give: { Central: RUN.makeAmount(5), Secondary: note.makeAmount(10), }, want: { Liquidity: { brand: liquidityBrand, value: 0n } }, } | |
history[50] | |
exception: [TypeError: ?: Cannot coerce right operand to bigint] | |
command[51] | |
proposal = { give: { Central: RUN.makeAmount(5n), Secondary: note.makeAmount(10n), }, want: { Liquidity: { brand: liquidityBrand, value: 0n } }, } | |
history[51] | |
{"give":{"Central":{"brand":[Object Alleged: RUN brand]{},"value":5000000n},"Secondary":{"brand":[Object Alleged: Note brand]{},"value":1000n}},"want":{"Liquidity":{"brand":undefined,"value":0n}}} | |
command[52] | |
E(note.liquidity.issuer).getBrand() | |
history[52] | |
[Object Alleged: NoteLiquidity brand]{} | |
command[53] | |
note.liquidity.brand = history[52] | |
history[53] | |
[Object Alleged: NoteLiquidity brand]{} | |
command[54] | |
proposal = { give: { Central: RUN.makeAmount(5n), Secondary: note.makeAmount(10n), }, want: { Liquidity: { brand: note.liquidity.brand, value: 0n } }, } | |
history[54] | |
{"give":{"Central":{"brand":[Object Alleged: RUN brand]{},"value":5000000n},"Secondary":{"brand":[Object Alleged: Note brand]{},"value":1000n}},"want":{"Liquidity":{"brand":[Object Alleged: NoteLiquidity brand]{},"value":0n}}} | |
command[55] | |
E(RUN.purse).withdraw(RUN.makeAmount(5n)) | |
history[55] | |
[Object Alleged: RUN payment]{} | |
command[56] | |
E(note.mint).mintPayment(note.makeAmount(10n)) | |
history[56] | |
[Object Alleged: Note payment]{} | |
command[57] | |
payments = { Central: history[55], Secondary: history[56] } | |
history[57] | |
{"Central":[Object Alleged: RUN payment]{},"Secondary":[Object Alleged: Note payment]{}} | |
command[58] | |
#E(zoe).offer(invitation, proposal, payments); | |
history[58] | |
exception: [SyntaxError: invalid character 69] | |
command[59] | |
invitation=history[36] | |
history[59] | |
[Object Alleged: Zoe Invitation payment]{} | |
command[60] | |
E(zoe).offer(invitation, proposal, payments) | |
history[60] | |
Promise.reject("TypeError: Cannot deliver \"offer\" to target; typeof target is \"undefined\"") | |
command[61] | |
zoe=home.zoe | |
history[61] | |
[Object Alleged: zoeService]{} | |
command[62] | |
E(zoe).offer(invitation, proposal, payments) | |
history[62] | |
[Object Alleged: userSeat]{} | |
command[63] | |
seat = history[62] | |
history[63] | |
[Object Alleged: userSeat]{} | |
command[64] | |
E(seat).getPayout('Liquidity') | |
history[64] | |
[Object Alleged: NoteLiquidity payment]{} | |
command[65] | |
liq = history[64] | |
history[65] | |
[Object Alleged: NoteLiquidity payment]{} | |
command[66] | |
E(note.liquidity.issuer).getAmountOf(liq) | |
history[66] | |
{"brand":[Object Alleged: NoteLiquidity brand]{},"value":5000000n} | |
command[67] | |
Source: @agoric/solo v0.5.5+81d51f7-dirty |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment