| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | Haskell2010 | 
Cooked.Attack.DupToken
Description
This module provides an automated attack to duplicate tokens minted in a transaction.
Synopsis
- dupTokenAttack :: (MonadTweak m, OwnerConstrs o) => (AssetClass -> Integer -> Integer) -> o -> m Value
- data DupTokenLbl = DupTokenLbl
Documentation
Arguments
| :: (MonadTweak m, OwnerConstrs o) | |
| => (AssetClass -> Integer -> Integer) | A function describing how the amount of tokens specified by a  | 
| -> o | The wallet of the attacker. Any additional tokens that are minted by the modified transaction but were not minted by the original transaction are paid to this wallet. | 
| -> m Value | 
A token duplication attack increases values in Mint constraints of a
 TxSkel according to some conditions, and pays the extra minted value to a
 given recipient wallet. This adds a DupTokenLbl to the labels of the
 transaction using addLabelTweak. Returns the Value by which the minted
 value was increased.
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.DupToken Methods showsPrec :: Int -> DupTokenLbl -> ShowS # show :: DupTokenLbl -> String # showList :: [DupTokenLbl] -> ShowS # | |
| PrettyCooked DupTokenLbl Source # | |
| Defined in Cooked.Attack.DupToken Methods prettyCookedOpt :: PrettyCookedOpts -> DupTokenLbl -> DocCooked Source # prettyCooked :: DupTokenLbl -> DocCooked Source # | |
| Eq DupTokenLbl Source # | |
| Defined in Cooked.Attack.DupToken | |
| Ord DupTokenLbl Source # | |
| Defined in Cooked.Attack.DupToken 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 # | |