Closed GeorgeFlerovsky closed 1 year ago
@GeorgeFlerovsky You mean the scope is only timing issues? Then we need to rephrase the title I think.
@GeorgeFlerovsky You mean the scope is only timing issues? Then we need to rephrase the title I think.
Yes, I think it's mostly just about timing issues. Although, we may also want to add error messages like this:
@GeorgeFlerovsky This issue is related: https://github.com/mlabs-haskell/hydra-auction/issues/44
@GeorgeFlerovsky This issue is related: https://github.com/mlabs-haskell/hydra-auction/issues/44
I would differentiate between the two:
@GeorgeFlerovsky #44 is about user errors too. Then you provide wrong nonce UTxO or taking some step then no proper UTxOs for that step is present.
As for code, I think that creating some AuctionTimeframe
datatype may be usable. Like we can associate them to intervals with function and check them uniformingly. Maybe we can even share code with OnChain.
@GeorgeFlerovsky #44 is about user errors too. Then you provide wrong nonce UTxO or taking some step then no proper UTxOs for that step is present.
Actually, for the demo, I would like to remove the need for the CLI user to specify the nonce utxo. (Maybe this should be a separate GH issue)
It would be cleaner to:
utxoNonce
to be the TxOutRef of the utxo that contains the token.The more general mechanism to select arbitrary auction lot tokens will be needed in production, but it's kind of irrelevant to our development for now. On the other, requiring users to copy-paste utxo refs in CLI is really ugly UX — reminds me of the early Alonzo days.
When we do need this general functionality in the future, we'll probably be replacing the CLI interface with a wallet-based web interface, which has a better UX for selecting tokens/utxos.
The more general mechanism to select arbitrary auction lot tokens will be needed in production, but it's kind of irrelevant to our development for now.
We can just make nonce CLI param optional and have both.
On the other, requiring users to copy-paste utxo refs in CLI is really ugly UX — reminds me of the early Alonzo days.
For now I feel searching for UTxO automatically hides the real thing too much.
@GeorgeFlerovsky @nazrhom
Not sure where better to place time check. I can place checks it in CLI actions separately or in check inside Tx.*
functions and return error using Either
.
@GeorgeFlerovsky @nazrhom
Not sure where better to place time check. I can place checks it in CLI actions separately or in check inside
Tx.*
functions and return error usingEither
.
Time checking should be done in CLI actions. We're basically simulating how the frontend web UI would tell a user that certain actions are not available at a particular time (e.g. by graying out the buttons).
For example: