-
Notifications
You must be signed in to change notification settings - Fork 11.9k
/
Copy pathERC20Mock.sol
41 lines (34 loc) · 893 Bytes
/
ERC20Mock.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../token/ERC20/ERC20.sol";
// mock class using ERC20
contract ERC20Mock is ERC20 {
constructor(
string memory name,
string memory symbol,
address initialAccount,
uint256 initialBalance
) payable ERC20(name, symbol) {
_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);
}
}