* Add revert if the bytecode length is not greater than zero * Add value parameter to create2 deploy function Add tests for contract balance revert and depositing funds * Change parameter name to amount for clarity * Fix test for value sending * Fix linter error * Change revert reason * Improve Create2.deploy documentation * Slight test improvement * Add changelog entry Co-authored-by: Nicolás Venturo <nicolas.venturo@gmail.com>
27 lines
708 B
Solidity
27 lines
708 B
Solidity
pragma solidity ^0.6.0;
|
|
|
|
import "../token/ERC20/ERC20.sol";
|
|
|
|
// mock class using ERC20
|
|
contract ERC20Mock is ERC20 {
|
|
constructor (address initialAccount, uint256 initialBalance) public payable {
|
|
_mint(initialAccount, initialBalance);
|
|
}
|
|
|
|
function mint(address account, uint256 amount) public {
|
|
_mint(account, amount);
|
|
}
|
|
|
|
function burn(address account, uint256 amount) public {
|
|
_burn(account, amount);
|
|
}
|
|
|
|
function transferInternal(address from, address to, uint256 value) public {
|
|
_transfer(from, to, value);
|
|
}
|
|
|
|
function approveInternal(address owner, address spender, uint256 value) public {
|
|
_approve(owner, spender, value);
|
|
}
|
|
}
|