-
Notifications
You must be signed in to change notification settings - Fork 10
Multi-seize feature #99
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
base: main
Are you sure you want to change the base?
Conversation
j-mueller
left a comment
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.
Looks good, couple of minor comments. The documentation on multi-seize is good, but I think this would be a great feature for some property tests.
| ensure that the specific issuer logic stake script witness is included in the | ||
| final transaction. | ||
| NOTE: Seems the issuer is only able to seize 1 UTxO at a time. |
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.
This note can be deleted 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.
Done, thanks.
| MonadBuildTx era m | ||
| ) => | ||
| UTxODat era ProgrammableLogicGlobalParams -> | ||
| [UTxODat era a] -> |
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.
Haddocks on the parameters would be nice
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.
added
| -- Finds the index of the first output to the programmable logic base credential | ||
| firstSeizeContinuationOutputIndex txBody = | ||
| fromIntegral @Int @Integer $ | ||
| fromJust $ |
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.
If this returns Nothing then tx balancing will fail with a weird error. We could use fromMaybe (error "seizingInputIndex not found") instead of fromJust to make it slightly better
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.
Fixed as suggested.
| addOutput $ payToAddressTxOut destinationAddress seizedVal | ||
|
|
||
| -- This function should probably accept the programmable token policy which we want to seize as a parameter. | ||
| -- As of now, it just assumes that the first non-ada token in the seizing inputs is the token we want to seize. |
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.
Isn't toSeizePolicyId the policy which we want to seize?
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.
Yes, removed.
| } | ||
|
|
||
| -- TODO: Implement efficient comparison of all fields of TxOut except value. | ||
| -- pconstructExpectedOutputWithOutputDatum :: Term s PAddress -> Term s (PAsData (PValue 'Sorted 'Positive)) -> Term s POutputDatum -> Term s (PAsData PTxOut) |
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.
Delete dead code
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.
Added more details, left as a future optimization.
|
|
||
|
|
||
|
|
||
| -- pif (pfromData inputValueEntryCS #== pfromData (pfstBuiltin # outputValueEntry)) |
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.
dead code
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.
Fixed.
|
Expanded the web-app to allow anyone to mint, transfer, and manage their own programmable token under the freeze & seize substandard. |
|
One of the use case for bulk seize was for instance, in case the programmable token was a security, to pay dividends w/o having to spend minutxo, does the current implementation support that? |
Yes, the contracts as implemented should support that. The programmable token example used in the frontend currently (freeze & seize) does not have this functionality; however, I'll try to add it to the frontend demo as-well. |
|
I updated the generated files, but there are still some Typescript errors in frontend/src/app/store/store.tsx (the |
On-chain implementation that introduces support for third party transfer logic across multiple UTxOs in a single transaction.