Skip to content
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

Merged
merged 32 commits into from
Jan 28, 2025
Merged

De-Prize prediction markets #283

merged 32 commits into from
Jan 28, 2025

Conversation

jaderiverstokes
Copy link
Contributor

@jaderiverstokes jaderiverstokes commented Dec 28, 2024

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.

Copy link

netlify bot commented Dec 28, 2024

Deploy Preview for moondao-stc ready!

Name Link
🔨 Latest commit 4751dc7
🔍 Latest deploy log https://app.netlify.com/sites/moondao-stc/deploys/67992c1cb7e7c500085d9dd0
😎 Deploy Preview https://deploy-preview-283--moondao-stc.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 24 (🔴 down 15 from production)
Accessibility: 94 (no change from production)
Best Practices: 83 (no change from production)
SEO: 92 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Dec 28, 2024

Deploy Preview for moondao-ce-demo ready!

Name Link
🔨 Latest commit 4751dc7
🔍 Latest deploy log https://app.netlify.com/sites/moondao-ce-demo/deploys/67992c1c4da4f900085b33bf
😎 Deploy Preview https://deploy-preview-283--moondao-ce-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jaderiverstokes jaderiverstokes changed the title De-Prize prediction markets De-Prize prediction markets (i will split this into 2 PRs) Dec 28, 2024
Copy link
Contributor

@pmoncada pmoncada left a 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'
Copy link
Contributor

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?

prediction/contracts/LMSRWithTWAP.sol Outdated Show resolved Hide resolved
prediction/contracts/LMSRWithTWAPFactory.sol Outdated Show resolved Hide resolved
module.exports = [
{
questionId:
"0x0000000000000000000000000000000000000000000000000000000000000001",
Copy link
Contributor

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?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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

provider: () =>
new HDWalletProvider(
"syrup meadow cradle earth short actor divide odor brush input prison annual",
`https://11155111.rpc.thirdweb.com/${process.env.THIRDWEB_TOKEN}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay to commit?

provider: () =>
new HDWalletProvider(
"syrup meadow cradle earth short actor divide odor brush input prison annual",
`https://42161.rpc.thirdweb.com/${process.env.THIRDWEB_TOKEN}`
Copy link
Contributor

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

<div>
{isConditionLoaded ? (
<>
<p>Who will be the first team to land on the moon?</p>
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep fixed.

ui/const/betting/config.sepolia.json Outdated Show resolved Hide resolved
@jaderiverstokes jaderiverstokes changed the title De-Prize prediction markets (i will split this into 2 PRs) De-Prize prediction markets Jan 6, 2025
@jaderiverstokes jaderiverstokes merged commit 7127b0d into main Jan 28, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants