Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable test #153

Merged
merged 146 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
ac84a58
Added new information to Liquidity provider
gsoares85 Jan 16, 2023
b520a23
Fixed sonar
gsoares85 Jan 17, 2023
9eaa619
Removed critical sonar issues
gsoares85 Jan 17, 2023
88647df
Merge pull request #78 from rsksmart/feature/GBI-981-extend-LP-Data
gsoares85 Jan 17, 2023
8006e16
GBI-1112
Dominikkq Feb 16, 2023
f09e9b5
Merge pull request #81 from Dominikkq/QA-Test
MaximStanciu8 Feb 17, 2023
88c0ac8
Fixed deploy script
gsoares85 Feb 27, 2023
942bd42
Removing one provider per address requirement (Resubmit))
Dominikkq Mar 7, 2023
fed4cfb
Merge pull request #85 from Dominikkq/QA-Test
MaximStanciu8 Mar 7, 2023
d19384f
GBI-1143 Owner and change providers status implementation
Dominikkq Mar 8, 2023
caff3e3
Merge pull request #86 from Dominikkq/QA-Test
MaximStanciu8 Mar 8, 2023
5751e8c
Merge pull request #88 from rsksmart/QA-Test
MaximStanciu8 Mar 15, 2023
bb32f2a
Added validation scripts
gsoares85 Mar 16, 2023
5aae527
Changed gitignore
gsoares85 Mar 16, 2023
1583de6
Changed contract to be upgreadable
gsoares85 Mar 20, 2023
0c4db2d
Comment upgrade script
gsoares85 Mar 20, 2023
02ea7a6
GBI-1190
Dominikkq Mar 21, 2023
74d7215
Removing error
gsoares85 Mar 21, 2023
a89d48c
Merge pull request #89 from Dominikkq/QA-Test
MaximStanciu8 Mar 21, 2023
d0cfc5c
Fixed sonar issues
gsoares85 Mar 21, 2023
69d654f
Sonar issue
gsoares85 Mar 21, 2023
f346f09
Merge pull request #90 from rsksmart/feature/GBI-1180-CreateUpgreadab…
gsoares85 Mar 21, 2023
3d55905
Changed pegout quote structure
gsoares85 Mar 23, 2023
7c59093
Updated pegout quote structure and fixed unit tests
gsoares85 Mar 23, 2023
be2ecd5
Merge pull request #91 from rsksmart/feature/GBI-1192-updatePegoutQuo…
gsoares85 Mar 23, 2023
5d6e549
Ignore openzeppelin folder
Luisfc68 Mar 23, 2023
43afcc7
Merge pull request #92 from rsksmart/lbc-deploy-fix
gsoares85 Mar 23, 2023
da03b47
Update register and refund pegout
Luisfc68 Mar 30, 2023
e769220
GBI-1098
Dominikkq Mar 31, 2023
5c78b79
Refund pegout send to bridge after decrease balance
Luisfc68 Mar 31, 2023
4fb84db
Merge pull request #93 from rsksmart/feature/GBI-1195
Luisfc68 Mar 31, 2023
0b89bf6
Merge pull request #94 from Dominikkq/QA-Test
MaximStanciu8 Apr 3, 2023
6100670
Separate collateral for pegout and remove bridge call
Luisfc68 Apr 11, 2023
9494647
Merge pull request #95 from rsksmart/feature/GBI-1201
Luisfc68 Apr 11, 2023
7a2aec1
Add temporal collateral partition on register provider
Luisfc68 Apr 13, 2023
5479d62
Merge pull request #97 from rsksmart/QA-Test
Luisfc68 Apr 14, 2023
d663125
Merge pull request #96 from rsksmart/feature/GBI-1205
Luisfc68 Apr 19, 2023
84f8e84
Merge pull request #99 from rsksmart/QA-Test
Luisfc68 Apr 19, 2023
a761db5
Add new pegout deposit method
Luisfc68 Apr 24, 2023
2b84370
Replace literal by constant
Luisfc68 Apr 24, 2023
779dbbf
Replace literal by constant
Luisfc68 Apr 24, 2023
3900aa8
Merge pull request #100 from rsksmart/feature/GBI-1212
MaximStanciu8 Apr 24, 2023
0bc3b38
Merge pull request #101 from rsksmart/QA-Test
MaximStanciu8 Apr 25, 2023
c73f3de
Added refund method
gsoares85 Apr 27, 2023
16032fc
Fixed comments
gsoares85 Apr 27, 2023
4ad1a6d
Merge pull request #102 from rsksmart/feature/pegout-refundPegout
gsoares85 Apr 27, 2023
0b2952a
GBI-1223
Dominikkq Apr 27, 2023
a61c4e0
Merge pull request #104 from rsksmart/QA-Test
MaximStanciu8 Apr 28, 2023
870711e
Update LiquidityBridgeContract.sol
Dominikkq Apr 28, 2023
edc5a1c
Merge pull request #103 from Dominikkq/QA-Test
MaximStanciu8 May 3, 2023
0fca2f0
Add new requires to refundUserPegout
gsoares85 May 8, 2023
ae0ac94
Merge pull request #105 from rsksmart/feature/GBI-1232-changeUserRefund
MaximStanciu8 May 8, 2023
3571a68
Merge pull request #106 from rsksmart/QA-Test
MaximStanciu8 May 9, 2023
a60ecec
Update documentation
Luisfc68 May 9, 2023
9d77d4a
Merge pull request #107 from rsksmart/feature/GBI-1250
MaximStanciu8 May 9, 2023
86dca17
Fix failing tests
Luisfc68 May 10, 2023
21852e2
Add LP limits validation on register
Luisfc68 May 10, 2023
42337ff
Merge pull request #109 from rsksmart/feature/GBI-1251
MaximStanciu8 May 10, 2023
8940a51
Refactor pegout quotes map name
Luisfc68 May 10, 2023
a92c15d
Store quote on register pegout
Luisfc68 May 11, 2023
9729b0f
Delete pegout quote after refund
Luisfc68 May 11, 2023
794f961
Merge pull request #110 from rsksmart/feature/GBI-1258
MaximStanciu8 May 11, 2023
0f678ac
Merge pull request #111 from rsksmart/QA-Test
MaximStanciu8 May 11, 2023
598d50b
Update LiquidityBridgeContract.sol
Dominikkq May 11, 2023
5936d47
Merge pull request #112 from Dominikkq/QA-Test
MaximStanciu8 May 11, 2023
dd60d1d
Merge pull request #113 from rsksmart/QA-Test
MaximStanciu8 May 11, 2023
2aa1476
Change variable visibility
Luisfc68 May 11, 2023
fccc96d
Merge pull request #114 from rsksmart/deploy-fix
MaximStanciu8 May 11, 2023
f7d4eb6
reduce compiler runs
Luisfc68 May 11, 2023
f96c510
Merge pull request #115 from rsksmart/deploy-fix
MaximStanciu8 May 11, 2023
f694332
remove call to the bridge
Luisfc68 May 11, 2023
26da8c4
Merge pull request #116 from rsksmart/provider-limit-fix
MaximStanciu8 May 11, 2023
938f30b
save quote in deposit pegout instead of register pegout
Luisfc68 May 12, 2023
66ed5f7
Merge pull request #117 from rsksmart/feature/GBI-1258-fix
MaximStanciu8 May 12, 2023
5608283
Merge pull request #118 from rsksmart/QA-Test
MaximStanciu8 May 12, 2023
6006c4b
Fix VULN-335
Luisfc68 May 22, 2023
5ab50e2
Fix VULN-332
Luisfc68 May 22, 2023
7a65740
Fix VULN-330
Luisfc68 May 22, 2023
f809bc4
Merge pull request #119 from rsksmart/fix-vulnerabilities
MaximStanciu8 May 23, 2023
cccd653
Fixed contract size
gsoares85 May 25, 2023
c32aee4
Merge pull request #121 from rsksmart/feature/contract-size
MaximStanciu8 May 25, 2023
9e75b8b
GBI-1277
Dominikkq May 29, 2023
d04f53b
Update Mock.sol
Dominikkq May 29, 2023
c1114c8
VULN-327: remove registerPegout and pegoutQuoteStates
Luisfc68 May 29, 2023
50b4b85
Merge pull request #122 from Dominikkq/feature/security-audit-fix
MaximStanciu8 May 30, 2023
fccff9f
Merge pull request #123 from rsksmart/feature/GBI-1278
Luisfc68 May 30, 2023
ab46316
Add completed pegout map
Luisfc68 May 30, 2023
22e1737
Merge branch 'QA-Test' into security-audit-QA-sync
Luisfc68 May 30, 2023
fa0672b
Merge branch 'feature/GBI-1278' into security-audit-QA-sync
Luisfc68 May 30, 2023
a32fcf9
Merge pull request #125 from rsksmart/security-audit-QA-sync
MaximStanciu8 May 30, 2023
f886814
Removing-acceptedQuoteExpiration
Dominikkq May 30, 2023
b18701b
Merge pull request #126 from Dominikkq/QA-Test
MaximStanciu8 May 30, 2023
607b0f6
Redesign shouldPenalizePegoutLP
Luisfc68 May 31, 2023
1f0b2d8
Merge pull request #127 from rsksmart/feature/GBI-1281
Luisfc68 May 31, 2023
8acfa59
Add quotes library
Luisfc68 May 31, 2023
d0d07eb
Merge pull request #128 from rsksmart/feature/quotes-lib
MaximStanciu8 May 31, 2023
1088ef5
fix vVULN-334
Luisfc68 May 31, 2023
76d0807
Merge pull request #129 from rsksmart/feature/GBI-1283
MaximStanciu8 May 31, 2023
75296e7
Fixed conflicts
gsoares85 Jun 1, 2023
b289332
Removing leftover parameter
Dominikkq Jun 1, 2023
db4634c
Merge pull request #130 from Dominikkq/param-fix
MaximStanciu8 Jun 1, 2023
712225d
Start decode
gsoares85 Jun 1, 2023
04d1274
Check Status when returning getProviders
Dominikkq Jun 5, 2023
b5fe7f1
Merge pull request #131 from rsksmart/status-false-no-return
MaximStanciu8 Jun 5, 2023
309c858
Create errorCodes.json
Dominikkq Jun 5, 2023
e768234
Merge pull request #132 from rsksmart/error-codes
MaximStanciu8 Jun 5, 2023
a00d8ff
Revert "Fixed conflicts"
Luisfc68 Jun 5, 2023
021e424
Start decode
Luisfc68 Jun 5, 2023
402ac8f
Revert "Start decode"
Luisfc68 Jun 5, 2023
d873f36
Add btc utils and raw tx parsing
Luisfc68 Jun 5, 2023
0897511
Merge branch 'feature/security-audit-fix' into feature/GBI-1279
Luisfc68 Jun 5, 2023
cf5f91c
Merge pull request #133 from rsksmart/feature/GBI-1279
MaximStanciu8 Jun 6, 2023
695e597
Add btc tx parsing test
Luisfc68 Jun 6, 2023
404ab8e
fix input count position
Luisfc68 Jun 7, 2023
c6a7e8d
Merge pull request #134 from rsksmart/feature/GBI-1279
Luisfc68 Jun 7, 2023
f0d55ef
Merge pull request #135 from rsksmart/feature/security-audit-fix
MaximStanciu8 Jun 7, 2023
43fe32a
Remove validation from set status
Luisfc68 Jun 7, 2023
3784460
Merge pull request #136 from rsksmart/VULN-325
MaximStanciu8 Jun 7, 2023
fc40fd5
Index PegoutDeposit
Dominikkq Jun 8, 2023
f4fc13b
Merge pull request #137 from rsksmart/index
MaximStanciu8 Jun 8, 2023
9d10e94
Update readme
Luisfc68 Jun 8, 2023
a258767
Merge pull request #138 from rsksmart/VULN-324
MaximStanciu8 Jun 8, 2023
ebef11c
Merge pull request #139 from rsksmart/QA-Test
MaximStanciu8 Jun 8, 2023
12d54c3
fixes on refundPegout
Luisfc68 Jun 16, 2023
2e48bae
Merge pull request #141 from rsksmart/feature/GBI-1273
MaximStanciu8 Jun 19, 2023
4f39cf0
Added no Reentrancy
gsoares85 Jun 19, 2023
7f9680f
Merge pull request #142 from rsksmart/feature/GBI-1297-reentrance
MaximStanciu8 Jun 19, 2023
8d65381
Merge pull request #144 from rsksmart/QA-Test
MaximStanciu8 Jun 20, 2023
ba81367
Added solhint
gsoares85 Jun 20, 2023
655bdae
Added linter to unit tests
gsoares85 Jun 20, 2023
14344ae
Added linter before deploy
gsoares85 Jun 20, 2023
e469368
Merge pull request #145 from rsksmart/feature/solidity-linter
MaximStanciu8 Jun 20, 2023
e637d96
update btc utils to parse segwit transactions
Luisfc68 Jun 21, 2023
89dfa97
Merge pull request #146 from rsksmart/segwit-tx-parsing
MaximStanciu8 Jun 21, 2023
0f40445
fix VULN-338
Luisfc68 Jun 22, 2023
aaec44f
fix VULN-337
Luisfc68 Jun 22, 2023
29f1674
fix VULN-331
Luisfc68 Jun 22, 2023
798fc59
update mock
Luisfc68 Jun 22, 2023
f0ab096
Merge pull request #147 from rsksmart/security-fixes-v3
MaximStanciu8 Jun 22, 2023
802dd72
Fix VULN-326
Luisfc68 Jun 22, 2023
32e1fa1
remove magic numbers
Luisfc68 Jun 22, 2023
90adc4f
Merge pull request #148 from rsksmart/feature/GBI-1285
MaximStanciu8 Jun 22, 2023
f251f51
Merge pull request #149 from rsksmart/QA-Test
Dominikkq Jun 23, 2023
2fca1c4
Fix compact size calculation
Luisfc68 Jun 26, 2023
05d9b58
Merge pull request #151 from rsksmart/compact-size-calc
Luisfc68 Jun 26, 2023
d384cab
Merge pull request #152 from rsksmart/QA-Test
MaximStanciu8 Jun 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.openzeppelin
node_modules
build
.vscode
.idea
coverage
coverage.json
.secret
.DS_Store
26 changes: 26 additions & 0 deletions .solhint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extends": "solhint:recommended",
"rules": {
"avoid-throw": "off",
"compiler-version": [
"error",
"^0.8.3"
],
"max-line-length": ["error", 120],
"max-states-count": ["error", 20],
"avoid-tx-origin": "off",
"not-rely-on-time": "off",
"func-visibility": [
"warn",
{
"ignoreConstructors": true
}
],
"no-global-import": "off",
"no-inline-assembly": "off",
"var-name-mixedcase": "off",
"reason-string": "off",
"no-unused-vars": "error",
"no-empty-blocks": "off"
}
}
2 changes: 1 addition & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports.deploy = async (name, network, act) => {
return testConfig;
}

if (!oldConfig[network][name].deployed) {
if (!oldConfig[network][name].deployed || network === "rskRegtest") {
await act(oldConfig[network][name]);
oldConfig[network][name].deployed = true;
this.write(oldConfig)
Expand Down
46 changes: 42 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,60 @@
"rskTestnet": {
"SafeMath": {
"address": "0x343714bf746AcaF55BC1BAF93D2C47E42A762eC1",
"deployed": false
},
"SignatureValidator": {
"address": "0xFe2746b892fFFf26E9a8F45935E7510d72028416",
"deployed": true
},
"LiquidityBridgeContractAdmin": {
"address": "0x1de4FF655DC7BC289cCa9D232755005265B4C94b",
"deployed": false
},
"LiquidityBridgeContract": {
"address": "0x890D3AFD0F14D870DE24798329bf36ce8939D0b4",
"deployed": true
},
"LiquidityBridgeContractProxy": {
"address": "0x81e0038E7b88496cf3CdDd684f74711e5451870B",
"deployed": false
},
"Migrations": {
"address": "0x9574a4972320d9988C110dAF950c89CC638B3b75",
"deployed": true
}
},
"rskRegtest": {
"Migrations": {
"address": "0xdac5481925A298B95Bf5b54c35b68FC6fc2eF423",
"deployed": true
},
"SafeMath": {
"address": "",
"deployed": false
},
"SignatureValidator": {
"address": "0xEE0e4fb6b967D3eAC2E2Af188eDAE5E319C0CD74",
"address": "0xeFb80DB9E2d943A492Bd988f4c619495cA815643",
"deployed": true
},
"LiquidityBridgeContractAdmin": {
"address": "0x0Cf562069E64aB810963F017F560c021F298aa40",
"address": "0x73ec81da0C72DD112e06c09A6ec03B5544d26F05",
"deployed": true
},
"LiquidityBridgeContract": {
"address": "0x6C69D66AF194b5b7c484E86765a95F6160b8b767",
"address": "0xA66939ac57893C2E65425a5D66099Bc20C76D4CD",
"deployed": true
},
"LiquidityBridgeContractProxy": {
"address": "0x1007D87b2Ee25768bC9A58b4A0B564e12Be554bF",
"address": "0x1eD614cd3443EFd9c70F04b6d777aed947A4b0c4",
"deployed": true
},
"Quotes": {
"address": "0x463F29B11503e198f6EbeC9903b4e5AaEddf6D29",
"deployed": true
},
"BtcUtils": {
"address": "0x987c1f13d417F7E04d852B44badc883E4E9782e1",
"deployed": true
}
}
Expand Down
181 changes: 124 additions & 57 deletions contracts/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,128 @@ pragma solidity ^0.8.3;

interface Bridge {

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 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 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 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 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 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 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 getFeePerKb ( ) external view returns ( int256 );
function voteFeePerKbChange ( int256 feePerKb ) external returns ( int256 );
function updateCollections ( ) external;
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 increaseLockingCap ( int256 newLockingCap ) external returns ( bool );
function registerBtcCoinbaseTransaction ( bytes calldata btcTxSerialized, bytes32 blockHash, bytes calldata pmtSerialized, bytes32 witnessMerkleRoot, bytes32 witnessReservedValue ) external;
function hasBtcBlockCoinbaseTransactionInformation ( bytes32 blockHash ) external returns ( bool );
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 getActiveFederationCreationBlockHeight ( ) external view returns ( uint256 );
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);
receive() external payable;

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 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 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 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 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 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 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 getFeePerKb() external view returns (int256);

function voteFeePerKbChange(int256 feePerKb) external returns (int256);

function updateCollections() external;

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 increaseLockingCap(int256 newLockingCap) external returns (bool);

function registerBtcCoinbaseTransaction(bytes calldata btcTxSerialized, bytes32 blockHash,
bytes calldata pmtSerialized, bytes32 witnessMerkleRoot, bytes32 witnessReservedValue) external;

function hasBtcBlockCoinbaseTransactionInformation(bytes32 blockHash) external returns (bool);

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 getActiveFederationCreationBlockHeight() external view returns (uint256);

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);
}
Loading