This template is for getting started with manipulating token balances. The token template wraps the forge deal
cheatcode to allow IERC20
objects to be passed. The following tokens from EVM based chains are included:
The following attack contract demonstrate a simple token balance manipulation of USDC on a fork of Ethereum mainnet.
Extend the Tokens contract and call deal(IERC20 token, address to, uint256 amount)
to set an accounts balance for the specified token:
deal(EthereumTokens.USDC, address(this), 1 ether);