-
Notifications
You must be signed in to change notification settings - Fork 6
/
IPantosToken.sol
81 lines (73 loc) · 2.84 KB
/
IPantosToken.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// SPDX-License-Identifier: GPL-3.0
// slither-disable-next-line solc-version
pragma solidity 0.8.26;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import {IBEP20} from "./IBEP20.sol";
/**
* @title Pantos token interface
*
* @notice The IPantosToken contract is an interfance for all Pantos token
* contracts, containing functions which are expected by the Pantos
* multi-blockchain system.
*/
interface IPantosToken is IERC20, IBEP20, IERC165 {
event PantosForwarderSet(address pantosForwarder);
event PantosForwarderUnset();
/**
* @notice Called by the Pantos Forwarder to transfer tokens on a
* blockchain.
*
* @param sender The address of the sender of the tokens.
* @param recipient The address of the recipient of the tokens.
* @param amount The amount of tokens to mint.
*
* @dev The function is only callable by a trusted Pantos Forwarder
* contract and thefore can't be invoked by a user. The function is used
* to transfer tokens on a blockchain between the sender and recipient.
*
* Revert if anything prevents the transfer from happening.
*/
function pantosTransfer(
address sender,
address recipient,
uint256 amount
) external;
/**
* @notice Called by the Pantos Forwarder to debit tokens on the source
* blockchain during a cross-chain transfer.
*
* @param sender The address of the sender of the tokens.
* @param amount The amount of tokens to send/burn.
*
* @dev The function is only callable by a trusted Pantos Forwarder
* contract and thefore can't be invoked by a user. The function is used
* to burn tokens on the source blockchain to initiate a cross-chain
* transfer.
*
* Revert if anything prevents the transfer from happening.
*/
function pantosTransferFrom(address sender, uint256 amount) external;
/**
* @notice Called by the Pantos Forwarder to mint tokens on the destination
* blockchain during a cross-chain transfer.
*
* @param recipient The address of the recipient of the tokens.
* @param amount The amount of tokens to mint.
*
* @dev The function is only callable by a trusted Pantos Forwarder
* contract and thefore can't be invoked by a user. The function is used
* to mint tokens on the destination blockchain to finish a cross-chain
* transfer.
*
* Revert if anything prevents the transfer from happening.
*/
function pantosTransferTo(address recipient, uint256 amount) external;
/**
* @notice Returns the address of the Pantos Forwarder contract.
*
* @return Address of the Pantos Forwarder.
*
*/
function getPantosForwarder() external view returns (address);
}