Consider this helper function in the money piece:
|
pub fn mint<V, OV, OC>(amt: u128, v: V) -> Transaction<OV, OC> |
|
where |
|
V: Verifier, |
|
OV: Verifier + From<V>, |
|
OC: tuxedo_core::ConstraintChecker<OV> + From<MoneyConstraintChecker<ID>>, |
|
{ |
|
Transaction { |
|
inputs: vec![], |
|
peeks: vec![], |
|
outputs: vec![(Self::new(amt), v).into()], |
|
checker: MoneyConstraintChecker::Mint.into(), |
|
} |
|
} |
I believe it's purpose is to allow easily creating mint transactions from the runtime level, for example in the genesis config.
It's trait bounds require the ability to convert between the inner and outer constraint checkers. But these bounds only work if the money piece is a direct descendant of the top-level runtime constraint checker. If it is buried deeper in the tree, does this work?
Consider this helper function in the money piece:
Tuxedo/wardrobe/money/src/lib.rs
Lines 81 to 93 in ec9de09
I believe it's purpose is to allow easily creating mint transactions from the runtime level, for example in the genesis config.
It's trait bounds require the ability to convert between the inner and outer constraint checkers. But these bounds only work if the money piece is a direct descendant of the top-level runtime constraint checker. If it is buried deeper in the tree, does this work?