-
Notifications
You must be signed in to change notification settings - Fork 141
/
ISlpx.sol
83 lines (76 loc) · 2.32 KB
/
ISlpx.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
82
83
// SPDX-License-Identifier: Apache-2.0
pragma solidity 0.8.10;
interface ISlpx {
event Mint(
address minter,
address assetAddress,
uint256 amount,
address receiver,
bytes callcode,
string remark
);
event Redeem(
address redeemer,
address assetAddress,
uint256 amount,
address receiver,
bytes callcode
);
event CreateOrder(
address assetAddress,
uint128 amount,
uint64 dest_chain_id,
bytes receiver,
string remark,
uint32 channel_id
);
/// Minted vNative assets such as vASTR, vGLMR, vMOVR
function mintVNativeAsset(
address receiver,
string memory remark
) external payable;
/// Minted vAssets
function mintVAsset(
address assetAddress,
uint256 amount,
address receiver,
string memory remark
) external;
/// Minted vNative assets such as vASTR, vGLMR, vMOVR
function mintVNativeAssetWithChannelId(
address receiver,
string memory remark,
uint32 channel_id
) external payable;
/// Minted vAssets
function mintVAssetWithChannelId(
address assetAddress,
uint256 amount,
address receiver,
string memory remark,
uint32 channel_id
) external;
/// Redeem assets
function redeemAsset(
address vAssetAddress,
uint256 amount,
address receiver
) external;
/**
* @dev Create order to mint vAsset or redeem vAsset on bifrost chain
* @param assetAddress The address of the asset to mint or redeem
* @param amount The amount of the asset to mint or redeem
* @param dest_chain_id When order is executed on Bifrost, Asset/vAsset will be transferred to this chain
* @param receiver The receiver address on the destination chain, 20 bytes for EVM, 32 bytes for Substrate
* @param remark The remark of the order, less than 32 bytes. For example, "OmniLS"
* @param channel_id The channel id of the order, you can set it. Bifrost chain will use it to share reward.
**/
function create_order(
address assetAddress,
uint128 amount,
uint64 dest_chain_id,
bytes memory receiver,
string memory remark,
uint32 channel_id
) external payable;
}