-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathBridge.sol
More file actions
132 lines (72 loc) · 5.59 KB
/
Bridge.sol
File metadata and controls
132 lines (72 loc) · 5.59 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
interface IBridge {
receive() external payable;
function registerBtcTransaction(bytes calldata atx, int256 height, bytes calldata pmt) external;
function addSignature(bytes calldata pubkey, bytes[] calldata signatures, bytes calldata txhash) external;
function receiveHeaders(bytes[] calldata blocks) external;
function receiveHeader(bytes calldata ablock) external returns (int256);
function createFederation() external returns (int256);
function addFederatorPublicKey(bytes calldata key) external returns (int256);
function addFederatorPublicKeyMultikey(bytes calldata btcKey, bytes calldata rskKey,
bytes calldata mstKey) external returns (int256);
function commitFederation(bytes calldata hash) external returns (int256);
function rollbackFederation() external returns (int256);
function addLockWhitelistAddress(string calldata aaddress, int256 maxTransferValue) external returns (int256);
function addOneOffLockWhitelistAddress(string calldata aaddress, int256 maxTransferValue)
external returns (int256);
function addUnlimitedLockWhitelistAddress(string calldata aaddress) external returns (int256);
function removeLockWhitelistAddress(string calldata aaddress) external returns (int256);
function setLockWhitelistDisableBlockDelay(int256 disableDelay) external returns (int256);
function voteFeePerKbChange(int256 feePerKb) external returns (int256);
function updateCollections() external;
function increaseLockingCap(int256 newLockingCap) external returns (bool);
function registerBtcCoinbaseTransaction(bytes calldata btcTxSerialized, bytes32 blockHash,
bytes calldata pmtSerialized, bytes32 witnessMerkleRoot, bytes32 witnessReservedValue) external;
function registerFastBridgeBtcTransaction(bytes calldata btcTxSerialized, uint256 height,
bytes calldata pmtSerialized, bytes32 derivationArgumentsHash,
bytes calldata userRefundBtcAddress, address payable liquidityBridgeContractAddress,
bytes calldata liquidityProviderBtcAddress, bool shouldTransferToContract) external returns (int256);
function getBtcBlockchainBestChainHeight() external view returns (int);
function getStateForBtcReleaseClient() external view returns (bytes memory);
function getStateForDebugging() external view returns (bytes memory);
function getBtcBlockchainInitialBlockHeight() external view returns (int);
function getBtcBlockchainBlockHashAtDepth(int256 depth) external view returns (bytes memory);
function getBtcTxHashProcessedHeight(string calldata hash) external view returns (int64);
function isBtcTxHashAlreadyProcessed(string calldata hash) external view returns (bool);
function getFederationAddress() external view returns (string memory);
function getFederationSize() external view returns (int256);
function getFederationThreshold() external view returns (int256);
function getFederatorPublicKey(int256 index) external view returns (bytes memory);
function getFederatorPublicKeyOfType(int256 index, string calldata atype) external view returns (bytes memory);
function getFederationCreationTime() external view returns (int256);
function getFederationCreationBlockNumber() external view returns (int256);
function getRetiringFederationAddress() external view returns (string memory);
function getRetiringFederationSize() external view returns (int256);
function getRetiringFederationThreshold() external view returns (int256);
function getRetiringFederatorPublicKey(int256 index) external view returns (bytes memory);
function getRetiringFederatorPublicKeyOfType(int256 index, string calldata atype)
external view returns (bytes memory);
function getRetiringFederationCreationTime() external view returns (int256);
function getRetiringFederationCreationBlockNumber() external view returns (int256);
function getPendingFederationHash() external view returns (bytes memory);
function getPendingFederationSize() external view returns (int256);
function getPendingFederatorPublicKey(int256 index) external view returns (bytes memory);
function getPendingFederatorPublicKeyOfType(int256 index, string calldata atype)
external view returns (bytes memory);
function getLockWhitelistSize() external view returns (int256);
function getLockWhitelistAddress(int256 index) external view returns (string memory);
function getLockWhitelistEntryByAddress(string calldata aaddress) external view returns (int256);
function getFeePerKb() external view returns (int256);
function getMinimumLockTxValue() external view returns (int256);
function getBtcTransactionConfirmations(bytes32 txHash, bytes32 blockHash,
uint256 merkleBranchPath, bytes32[] calldata merkleBranchHashes) external view returns (int256);
function getLockingCap() external view returns (int256);
function hasBtcBlockCoinbaseTransactionInformation(bytes32 blockHash) external view returns (bool);
function getActiveFederationCreationBlockHeight() external view returns (uint256);
function getActivePowpegRedeemScript() external view returns (bytes memory);
function getBtcBlockchainBestBlockHeader() external view returns (bytes memory);
function getBtcBlockchainBlockHeaderByHash(bytes32 btcBlockHash) external view returns (bytes memory);
function getBtcBlockchainBlockHeaderByHeight(uint256 btcBlockHeight) external view returns (bytes memory);
function getBtcBlockchainParentBlockHeaderByHash(bytes32 btcBlockHash) external view returns (bytes memory);
}