-
Notifications
You must be signed in to change notification settings - Fork 212
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
[Agoric-cli] Add Zoe contract example for concert/opera seats #543
Comments
@DavidBruant does this sound like a task you could take on? |
I'll work on #545 first, but i feel i can give it a try |
Added Kate to assignees so it's tracked on the board in the scrum. |
This part surprised me a bit. In real life, i imagine the auditorium would first mint the tickets, then escrow them in a simple exchange/autoswap (should tests be added to make sure these contracts work also with non-fungible assets?) But that's okay for now. Here is a comment i added at the top of the contract file:
Here is a comment i added to the contract i'm working on:
Unless there is a strong disagreement, i'm moving forward with this. I'll send a draft PR tomorrow with wherever i'll be at |
Yeah, the surprise is correct. Every piece of code that runs on-chain must be either run by Zoe or the vat spawner. Since we don't have the vat spawner back up to full functionality yet, and don't have plans to have it for the hackathon (this was an executive decision), we can only use Zoe, but Zoe is not intended to be used in this way. So we're doing something that is very odd. Also, yes, we should be adding tests to make sure the contracts work with non-fungible assets. They all should, but we currently have no tests for that. I'll add an issue. Your current plan sounds like a good one to me. Let's keep going with that. Thanks! |
Issue for the non-fungible tests here: #771 |
oh, that makes sense for me now! Thanks for the clarification! |
For Zoe Alpha, we need a basic non-fungible use case. We can start with the documentation that @DavidBruant wrote for event tickets. First, we will need to write up the example in ERTP tests (see precursor issue #545).
Because we only will have Zoe as a contract platform in Zoe Alpha (the generalized contract spawner isn't ready yet), we will need to write an example Zoe contract that is used solely for minting and can be deployed through the agoric-cli to the testnet. To summarize: digital assets are minted in the smart contract on Zoe, then escrowed with Zoe, and then sent to the user through the payout mechanism.
Autoswap happens to have an internal mint that we can copy for this. To send the newly minted assets to users, we will need to create an offer from the smart contact side that offers the assets. A user must also make an offer in order to get the digital assets as a payout from Zoe. Perhaps the contract requires payment in some form for minting.
If we can make this a general purpose minting contract, it could be written inside
packages/zoe/src/contracts
. If we can't easily do that, it should live insidepackages/agoric-cli/template/contract
.The text was updated successfully, but these errors were encountered: