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 => (AssetClass -> Integer -> Integer) -> Wallet -> m Value
- data DupTokenLbl = DupTokenLbl
Documentation
Arguments
:: MonadTweak m | |
=> (AssetClass -> Integer -> Integer) | A function describing how the amount of tokens specified by a |
-> Wallet | 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 Mints
-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 addLabel
. Returns the Value
by which the minted value
was increased.
data DupTokenLbl Source #
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 prettyCooked :: DupTokenLbl -> DocCooked Source # prettyCookedOpt :: PrettyCookedOpts -> 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 # |