/
ERC777Mock.sol
47 lines (39 loc) · 1.21 KB
/
ERC777Mock.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
42
43
44
45
46
47
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
import "../token/ERC777/ERC777.sol";
contract ERC777Mock is Context, ERC777 {
event BeforeTokenTransfer();
constructor(
address initialHolder,
uint256 initialBalance,
string memory name,
string memory symbol,
address[] memory defaultOperators
) ERC777(name, symbol, defaultOperators) {
_mint(initialHolder, initialBalance, "", "");
}
function mintInternal (
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData
) public {
_mint(to, amount, userData, operatorData);
}
function mintInternalExtended (
address to,
uint256 amount,
bytes memory userData,
bytes memory operatorData,
bool requireReceptionAck
) public {
_mint(to, amount, userData, operatorData, requireReceptionAck);
}
function approveInternal(address holder, address spender, uint256 value) public {
_approve(holder, spender, value);
}
function _beforeTokenTransfer(address, address, address, uint256) internal override {
emit BeforeTokenTransfer();
}
}