-
Notifications
You must be signed in to change notification settings - Fork 11
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
De-Prize prediction markets #283
Conversation
✅ Deploy Preview for moondao-stc ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for moondao-ce-demo ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
510621e
to
c013d6c
Compare
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.
Alright... I tried my best here. Really basic changes and small things I noticed. Might be good to have Colin give this a pass-over as well. Looks solid though and I imagine some of this is boilerplate / already working production code. Really impressed overall though, this is quite a beast.
prediction/.env
Outdated
@@ -0,0 +1,7 @@ | |||
REACT_APP_OPERATOR_MNEMONIC='myth like bonus scare over problem client lizard pioneer submit female collect' |
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.
Is it okay to publish this on github?
module.exports = [ | ||
{ | ||
questionId: | ||
"0x0000000000000000000000000000000000000000000000000000000000000001", |
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.
What's this do? Do we only need 1 question ID for now?
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.
Read up from the gnosis conditional tokens docs, I guess for our usecase the question is always "who will complete the objective first?" and then we have the objective live separately? not really sure how to best structure that, any thoughts?
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.
as we add new markets we can add here. we also need to supply a max number of outcomes at the start too.
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.
right now i maintain a map from question id to title as a json in the ui directory:
ui/const/betting/config.sepolia.json
prediction/truffle.js
Outdated
provider: () => | ||
new HDWalletProvider( | ||
"syrup meadow cradle earth short actor divide odor brush input prison annual", | ||
`https://11155111.rpc.thirdweb.com/${process.env.THIRDWEB_TOKEN}` |
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.
Okay to commit?
prediction/truffle.js
Outdated
provider: () => | ||
new HDWalletProvider( | ||
"syrup meadow cradle earth short actor divide odor brush input prison annual", | ||
`https://42161.rpc.thirdweb.com/${process.env.THIRDWEB_TOKEN}` |
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.
Same as above, just checking... not 100% what the HDWalletProvider is for
ui/components/betting/Layout.tsx
Outdated
<div> | ||
{isConditionLoaded ? ( | ||
<> | ||
<p>Who will be the first team to land on the moon?</p> |
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.
Should we make this a variable / something we can modify for different deprizes? I guess this is fine for the demo for now though
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.
yep fixed.
Adds /prediction directory for deploying prediction market contracts
This work is based on https://github.com/gnosis/conditional-tokens-tutorial which is built on truffle. Instead of converting to hardhat, I just integrated it here as a separate directory from the hardhat contracts directory.