-
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
Add "Oracles" #50
Add "Oracles" #50
Conversation
lib/calculation/record.ak
Outdated
// access to the final state of the order | ||
let remainder = input.value | ||
|> value.add(ada_policy_id, ada_asset_name, -actual_protocol_fee) | ||
|> value.add(policy.1st, policy.2nd, 1) |
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.
maybe rename policy
, since it's more than just a policy ID?
Also, should we check that this is minted, rather than coming from somewhere else for some reason?
fn(output) { | ||
(0, True), | ||
fn(output, state) { | ||
let (oracle_minted_index, no_duplicates) = state | ||
let qty = value.quantity_of(output.value, own_policy_id, oracle_name) |
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 happens if someone mints a token of a different name? do we care? maybe something like
expect [(name, amt)] = value.tokens(output.value, own_policy_id)
expect name == oracle_name
when amt is {
...
}
9d7597c
to
079171f
Compare
A new order type that creates an authenticated UTXO containing the price of the order.
Note: we might want to change the datum structure to match something like an Orcfax or Charli3 datum, or add a "pass through" data field.