deal
Signature
Section titled “Signature”function deal(address who, uint256 newBalance) external;Description
Section titled “Description”Sets the balance of an address who to newBalance.
If the alternative signature of deal is used (defined in StdCheats.sol), then we can additionally specify ERC20 token address, as well as an option to update totalSupply.
Examples
Section titled “Examples”address alice = makeAddr("alice");emit log_address(alice);vm.deal(alice, 1 ether);log_uint256(alice.balance); // 1000000000000000000address alice = makeAddr("alice");emit log_address(alice);deal(address(DAI), alice, 1 ether); // import StdUtils.sol firstlog_uint256(address(DAI).balanceOf(alice)); // 1000000000000000000SEE ALSO
Section titled “SEE ALSO”Forge Standard Library