| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Cooked.Attack.AddToken
Description
This module provides two automated attacks to mint and give extra tokens to a certain target.
Synopsis
- addTokenAttack :: (MonadTweak m, IsTxSkelOutAllowedOwner o) => (VScript -> [(TokenName, Integer)]) -> o -> m Value
- data AddTokenLbl = AddTokenLbl
- dupTokenAttack :: (MonadTweak m, IsTxSkelOutAllowedOwner o) => (VScript -> TokenName -> Integer -> Integer) -> o -> m Value
- data DupTokenLbl = DupTokenLbl
Documentation
Arguments
| :: (MonadTweak m, IsTxSkelOutAllowedOwner o) | |
| => (VScript -> [(TokenName, Integer)]) | For each policy that occurs in some |
| -> o | The attacker, who receives the extra tokens. |
| -> m Value |
This attack adds extra tokens of any kind for minting policies already present in the minted value. The additional minted value is redirected to a certain owner in a dedicated output.
This attack adds an AddTokenLbl label.
data AddTokenLbl Source #
A label that is added to a TxSkel that has successfully been modified by
addTokenAttack
Constructors
| AddTokenLbl |
Instances
| Show AddTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods showsPrec :: Int -> AddTokenLbl -> ShowS # show :: AddTokenLbl -> String # showList :: [AddTokenLbl] -> ShowS # | |
| PrettyCooked AddTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods prettyCookedOpt :: PrettyCookedOpts -> AddTokenLbl -> DocCooked Source # prettyCooked :: AddTokenLbl -> DocCooked Source # | |
| Eq AddTokenLbl Source # | |
Defined in Cooked.Attack.AddToken | |
| Ord AddTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods compare :: AddTokenLbl -> AddTokenLbl -> Ordering # (<) :: AddTokenLbl -> AddTokenLbl -> Bool # (<=) :: AddTokenLbl -> AddTokenLbl -> Bool # (>) :: AddTokenLbl -> AddTokenLbl -> Bool # (>=) :: AddTokenLbl -> AddTokenLbl -> Bool # max :: AddTokenLbl -> AddTokenLbl -> AddTokenLbl # min :: AddTokenLbl -> AddTokenLbl -> AddTokenLbl # | |
Arguments
| :: (MonadTweak m, IsTxSkelOutAllowedOwner o) | |
| => (VScript -> TokenName -> Integer -> Integer) | A function describing how the amount of tokens specified by a |
| -> o | The target of the extra tokens. Any additional tokens that are minted by the modified transaction but were not minted by the original transaction are paid to this target. |
| -> m Value |
This attack is similar to addTokenAttack with the exception that it only
tampers with token names already present.
This attack adds an DupTokenLbl label
data DupTokenLbl Source #
A label that is added to a TxSkel that has successfully been modified by
the dupTokenAttack
Constructors
| DupTokenLbl |
Instances
| Show DupTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods showsPrec :: Int -> DupTokenLbl -> ShowS # show :: DupTokenLbl -> String # showList :: [DupTokenLbl] -> ShowS # | |
| PrettyCooked DupTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods prettyCookedOpt :: PrettyCookedOpts -> DupTokenLbl -> DocCooked Source # prettyCooked :: DupTokenLbl -> DocCooked Source # | |
| Eq DupTokenLbl Source # | |
Defined in Cooked.Attack.AddToken | |
| Ord DupTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods compare :: DupTokenLbl -> DupTokenLbl -> Ordering # (<) :: DupTokenLbl -> DupTokenLbl -> Bool # (<=) :: DupTokenLbl -> DupTokenLbl -> Bool # (>) :: DupTokenLbl -> DupTokenLbl -> Bool # (>=) :: DupTokenLbl -> DupTokenLbl -> Bool # max :: DupTokenLbl -> DupTokenLbl -> DupTokenLbl # min :: DupTokenLbl -> DupTokenLbl -> DupTokenLbl # | |