-
Notifications
You must be signed in to change notification settings - Fork 0
/
AOVSender.sol
30 lines (22 loc) · 922 Bytes
/
AOVSender.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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC777/IERC777Sender.sol";
import "@openzeppelin/contracts/utils/introspection/ERC1820Implementer.sol";
contract AOVSender is IERC777Sender, ERC1820Implementer{
bytes32 constant public TOKENS_SENDER_INTERFACE_HASH = keccak256("ERC777TokensSender");
event DoneStuff(address operator, address from, address to, uint256 amount, bytes userData, bytes operatorData);
function senderFor(address account) public {
_registerInterfaceForAddress(TOKENS_SENDER_INTERFACE_HASH, account);
}
function tokensToSend(
address operator,
address from,
address to,
uint256 amount,
bytes calldata userData,
bytes calldata operatorData
) external override {
// do stuff
emit DoneStuff(operator, from, to, amount, userData, operatorData);
}
}