cooked-validators-4.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cooked.Attack.AddToken

Description

This module provides an automated attack to mint and give extra tokens to a certain wallet.

Synopsis

Documentation

addTokenAttack Source #

Arguments

:: MonadTweak m 
=> (Versioned MintingPolicy -> [(TokenName, Integer)])

For each policy that occurs in some Mints constraint, return a list of token names together with how many tokens with that name should be minted.

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

Instances details
Show AddTokenLbl Source # 
Instance details

Defined in Cooked.Attack.AddToken

Eq AddTokenLbl Source # 
Instance details

Defined in Cooked.Attack.AddToken