-
Notifications
You must be signed in to change notification settings - Fork 3
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: add market creation #149
base: main
Are you sure you want to change the base?
Conversation
Deploying presagio with
|
Latest commit: |
8f1e587
|
Status: | ✅ Deploy successful! |
Preview URL: | https://bbd809fd.presagio.pages.dev |
Branch Preview URL: | https://feat-pgio-105-support-for-ma.presagio.pages.dev |
d5dfb01
to
ad358e0
Compare
else setError(null); | ||
}, [amount, category, dateTimeError, outcomes, percentagesError, question]); | ||
|
||
const maxBalance = useCallback(() => { |
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.
Some things I'd like to see on the market creation flow (not necessarily all of them, but any combination of them):
|
fd10e28
to
70d250e
Compare
70d250e
to
8f1e587
Compare
<p className="text-text-med-em">Outcomes</p> | ||
<div className="space-y-2"> | ||
{outcomes.map((outcome, index) => ( | ||
<OutcomeInput |
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 this input has a bug where if you type anything outside numbers, you see a NaN
displayed with the "Sum must equal 100%" error, but you can't delete the NaN so you're forced to refresh the page
It would be nice if we could force these two inputs to only take numbers between 1 and 99, and if you write a number in one, the other one gets autocompleted with the corresponding percentage (this way we could drop the "Sum must equal 100%" error (maybe)
can we change the route for |
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.
lets change the folder structure to be /markets/create/page.tsx
this will make the url without the slash, which is cleaner: /markets/create
In our case we already have the markets folder, we just need a create folder inside with page file.
} | ||
|
||
//TODO create 2 different instances, 1 for token and other for outcomes |
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 handle this comment on this PR? what's the idea here?
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.
We should handle this in a new task. Will delete the comment and create a task.
@@ -0,0 +1 @@ | |||
export const KLEROS_ARBITRATOR_ADDRESS = '0xe40DD83a262da3f56976038F1554Fe541Fa75ecd'; |
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.
can't we use constants file for this? I would not create a file just for this constant.
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.
Also inside hooks, doesn't make sense for me.
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.
Since it's something contract related, I fill like it's on a good spot. It's related to contracts and it's related to kleros, so contracts/kleros
makes sense for me. Having a bunch of different data inside the same constants folder, not sure if it's the best approach, since it's difficult to know what constants are inside that file. This way I can go through the folder structure and easily find data related to kleros contracts. What do you think about this?
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.
it seems a bit confusing, but will let you decide, we can always change later if doesn't stick.
But why inside hooks folder?
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.
Because it's contract related stuff. But will move it from here
export const REALITY_ETH_CONTRACT_ADDRESS = '0x79e32aE03fb27B07C89c0c568F80287C01ca2E57'; | ||
export const ORACLE_ADDRESS = '0xAB16D643bA051C11962DA645f74632d3130c81E2'; | ||
export const REALITY_ETH_TIMEOUT = 86400; | ||
export const SINGLE_SELECT_TEMPLATE_ID = 2; |
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 have inside hooks?
Why all of the constants together in the same file ?
Agree on this, I just created a market and lost all the context. To add on top of this: After creating a market how can I check the markets I created?
Also, how can I create a market? What's the current decision, to omit this for now? I don't mind being out of scope of this PR, but we need to add a task to do this next. Great job, the PR is good, we just need to fine tune things. |
![]() what is context: https://gnosisscan.io/tx/0x79cea12e06ca2435d4526559c6e0b74a48b8d07051c37f29466837258bffe9b8 |
We can redirect the user to the created market. What do you think?
I think we need a path to see created markets, maybe in the same page you can see created markets and LP'd ones.
Currently there is no button on the navbar, I think we need to figure out how to organize the navbar to fit all the links. I would hide it for now and we can add it later. |
I don't see any relevant docs talking about it, but you can see something here https://reality.eth.limo/app/docs/html/dapp_links.html?highlight=template#specifying-the-question-template |
I think redirect to the market works. I'm okay with not having the lists for my LP, and created markets but would be nice to create a task for that. |
Adds support for binary market creation.
Create market route - https://feat-pgio-105-support-for-ma.presagio.pages.dev/create-market
Please create markets with "test" category.