Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Cooked.Attack.AddToken
Description
This module provides an automated attack to mint and give extra tokens to a certain wallet.
Synopsis
- addTokenAttack :: MonadTweak m => (Versioned MintingPolicy -> [(TokenName, Integer)]) -> Wallet -> m Value
- newtype AddTokenLbl = AddTokenLbl TokenName
Documentation
Arguments
:: MonadTweak m | |
=> (Versioned MintingPolicy -> [(TokenName, Integer)]) | For each policy that occurs in some For each of the elements of the returned list, one modified transaction with the additional tokens will be generated. (This means for example that, if there were three minting policies on the original transaction, and the lists returned for each of them have n,m, and o elements, respectively, there'll be n*m*o modified transactions.) The redeemer will be unchanged |
-> Wallet | The wallet of the attacker where extra tokens will be paid to |
-> m Value |
This attack adds extra tokens, depending on the minting policy. It is
different from the dupTokenAttack
in that it does not merely try to
increase the amount of tokens minted: It tries to mint tokens of asset
classes that were not necessarily present on the unmodified transaction.
This attack adds an AddTokenLbl
with the token name of the additional
minted token(s). It returns additional value minted.
newtype AddTokenLbl Source #
Constructors
AddTokenLbl TokenName |
Instances
Show AddTokenLbl Source # | |
Defined in Cooked.Attack.AddToken Methods showsPrec :: Int -> AddTokenLbl -> ShowS # show :: AddTokenLbl -> String # showList :: [AddTokenLbl] -> ShowS # | |
Eq AddTokenLbl Source # | |
Defined in Cooked.Attack.AddToken |