-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathIBaseRouterImplementation.sol
75 lines (64 loc) · 2.64 KB
/
IBaseRouterImplementation.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
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.23;
import { IBaseRouter } from "src/interfaces/IBaseRouter.sol";
import { AMBMessage, LiqRequest, TransactionType } from "src/types/DataTypes.sol";
/// @title IBaseRouterImplementation
/// @dev Interface for BaseRouterImplementation
/// @author Zeropoint Labs
interface IBaseRouterImplementation is IBaseRouter {
//////////////////////////////////////////////////////////////
// STRUCTS //
//////////////////////////////////////////////////////////////
/// @dev For local memory variable loading and avoiding stack too deep errors
struct ActionLocalVars {
AMBMessage ambMessage;
LiqRequest liqRequest;
uint64 srcChainId;
uint256 currentPayloadId;
uint256 liqRequestsLen;
}
struct DispatchAMBMessageVars {
TransactionType txType;
bytes ambData;
uint256[] superformIds;
address srcSender;
uint8[] ambIds;
uint8 multiVaults;
uint64 srcChainId;
uint64 dstChainId;
uint256 currentPayloadId;
}
//////////////////////////////////////////////////////////////
// EVENTS //
//////////////////////////////////////////////////////////////
/// @dev is emitted when a cross-chain deposit multi vault transaction is initiated.
event CrossChainInitiatedDepositMulti(
uint256 indexed payloadId,
uint64 indexed dstChainId,
uint256[] superformIds,
uint256[] amountsIn,
uint8[] bridgeIds,
uint8[] ambIds
);
/// @dev is emitted when a cross-chain deposit single vault transaction is initiated.
event CrossChainInitiatedDepositSingle(
uint256 indexed payloadId,
uint64 indexed dstChainId,
uint256 superformIds,
uint256 amountIn,
uint8 bridgeId,
uint8[] ambIds
);
/// @dev is emitted when a cross-chain withdraw multi vault transaction is initiated.
event CrossChainInitiatedWithdrawMulti(
uint256 indexed payloadId, uint64 indexed dstChainId, uint256[] superformIds, uint8[] ambIds
);
/// @dev is emitted when a cross-chain withdraw single vault transaction is initiated.
event CrossChainInitiatedWithdrawSingle(
uint256 indexed payloadId, uint64 indexed dstChainId, uint256 superformIds, uint8[] ambIds
);
/// @dev is emitted when a direct chain action is complete
event Completed();
/// @dev is emitted when dust is forwarded to paymaster
event RouterDustForwardedToPaymaster(address indexed token, uint256 indexed amount);
}