diff --git a/lib/assertions/fed.js b/lib/assertions/fed.js index d0a53403..238a335f 100644 --- a/lib/assertions/fed.js +++ b/lib/assertions/fed.js @@ -3,7 +3,7 @@ var { wait } = require('../utils'); var bitcoin = require('peglib').bitcoin; var rsk = require('peglib').rsk; const rskUtilsLegacy = require('../rsk-utils-legacy'); -const { getBridge } = require('../precompiled-abi-forks-util'); +const { getBridge } = require('../bridge-provider'); const rskUtils = require('../rsk-utils'); const { getRskTransactionHelpers } = require('../rsk-tx-helper-provider'); diff --git a/lib/rsk-utils-legacy.js b/lib/rsk-utils-legacy.js index 4fdd80cf..12610587 100644 --- a/lib/rsk-utils-legacy.js +++ b/lib/rsk-utils-legacy.js @@ -1,7 +1,7 @@ const expect = require('chai').expect; const btcClientProvider = require('./btc-client-provider'); const { sequentialPromise, wait, interval } = require('./utils'); -const { getBridgeAbi } = require('./precompiled-abi-forks-util'); +const { getBridgeAbi } = require('./bridge-provider'); const waitForBlockAttemptTimeMillis = process.env.WAIT_FOR_BLOCK_ATTEMPT_TIME_MILLIS || 200; const waitForBlockMaxAttempts = process.env. WAIT_FOR_BLOCK_MAX_ATTEMPTS || 600; diff --git a/lib/tests/bridge-calls.js b/lib/tests/bridge-calls.js index 0051e5d2..e17ec66b 100644 --- a/lib/tests/bridge-calls.js +++ b/lib/tests/bridge-calls.js @@ -9,7 +9,7 @@ const solUtils = require('../sol-utils'); const btcEthUnitConverter = require('@rsksmart/btc-eth-unit-converter'); const { getRskTransactionHelpers, getRskTransactionHelper } = require('../rsk-tx-helper-provider'); -const { getBridge } = require('../precompiled-abi-forks-util'); +const { getBridge } = require('../bridge-provider'); const INITIAL_RSK_BALANCE_IN_BTC = 1; const BRIDGE_ADDRESS = '0x0000000000000000000000000000000001000006'; diff --git a/lib/tests/call_receive_header.js b/lib/tests/call_receive_header.js index 391efc10..1f6481ae 100644 --- a/lib/tests/call_receive_header.js +++ b/lib/tests/call_receive_header.js @@ -1,7 +1,7 @@ const expect = require('chai').expect; const { getRskTransactionHelper } = require('../rsk-tx-helper-provider'); const { getBtcClient } = require('../btc-client-provider'); -const { getBridge } = require('../precompiled-abi-forks-util'); +const { getBridge } = require('../bridge-provider'); const { sendTxWithCheck, waitAndUpdateBridge } = require('../rsk-utils'); const { ensure0x } = require('../utils'); diff --git a/lib/tests/call_receive_headers.js b/lib/tests/call_receive_headers.js index 18e10fe1..d093d9ab 100644 --- a/lib/tests/call_receive_headers.js +++ b/lib/tests/call_receive_headers.js @@ -1,7 +1,7 @@ const expect = require('chai').expect; const { getRskTransactionHelper } = require('../rsk-tx-helper-provider'); const { getBtcClient } = require('../btc-client-provider'); -const { getBridge } = require('../precompiled-abi-forks-util'); +const { getBridge } = require('../bridge-provider'); const { sendTxWithCheck, waitAndUpdateBridge } = require('../rsk-utils'); const { ensure0x } = require('../utils'); diff --git a/test.js b/test.js index e1521994..79f6d8e4 100644 --- a/test.js +++ b/test.js @@ -43,7 +43,6 @@ const bookkeepingConfigurations = { }; // ***** GLOBALS ***** // -// If this is updated and more forks are added, remember to update './lib/precompiled-abi-forks-util.js' accordingly. global.Runners = { hosts: {}, common: { diff --git a/tests/00_00_03-vote_for_locking_cap_to_21m.js b/tests/00_00_03-vote_for_locking_cap_to_21m.js index 05deb249..0d942619 100644 --- a/tests/00_00_03-vote_for_locking_cap_to_21m.js +++ b/tests/00_00_03-vote_for_locking_cap_to_21m.js @@ -1,6 +1,6 @@ const rskUtils = require('../lib/rsk-utils'); const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { btcToWeis, btcToSatoshis } = require('@rsksmart/btc-eth-unit-converter'); const { expect } = require('chai'); diff --git a/tests/00_00_04-change-federation.js b/tests/00_00_04-change-federation.js index 4b8bcb08..456d3528 100644 --- a/tests/00_00_04-change-federation.js +++ b/tests/00_00_04-change-federation.js @@ -1,6 +1,6 @@ const rskUtils = require('../lib/rsk-utils'); const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { btcToWeis } = require('@rsksmart/btc-eth-unit-converter'); const { removePrefix0x, ensure0x, splitStringIntoChunks } = require('../lib/utils'); const BridgeTransactionParser = require('@rsksmart/bridge-transaction-parser'); diff --git a/tests/01_01_03-pre_orchid_lock_whitelist_fork.js b/tests/01_01_03-pre_orchid_lock_whitelist_fork.js index 07d56746..eb78d75e 100644 --- a/tests/01_01_03-pre_orchid_lock_whitelist_fork.js +++ b/tests/01_01_03-pre_orchid_lock_whitelist_fork.js @@ -1,5 +1,5 @@ const whitelistingAssertions = require('../lib/assertions/whitelisting'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const contractMethodAssertions = require('../lib/assertions/contractMethods'); const expect = require('chai').expect; const CustomError = require('../lib/CustomError'); diff --git a/tests/01_01_52-post_orchid_lock_whitelist_fork.js b/tests/01_01_52-post_orchid_lock_whitelist_fork.js index 72347102..5e2c3880 100644 --- a/tests/01_01_52-post_orchid_lock_whitelist_fork.js +++ b/tests/01_01_52-post_orchid_lock_whitelist_fork.js @@ -2,7 +2,7 @@ const whitelistingAssertions = require('../lib/assertions/whitelisting'); const contractMethodAssertions = require('../lib/assertions/contractMethods'); const { getBtcClient } = require('../lib/btc-client-provider'); const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const WHITELIST_ADDRESSES = { 'mq4w7mWwCtCURdbB3m3EVXqtJiVBdXcEaK' : 100000000000, diff --git a/tests/01_02_01-pre_wasabi_fed_pubkeys_fork.js b/tests/01_02_01-pre_wasabi_fed_pubkeys_fork.js index 1abf647d..f50f64d6 100644 --- a/tests/01_02_01-pre_wasabi_fed_pubkeys_fork.js +++ b/tests/01_02_01-pre_wasabi_fed_pubkeys_fork.js @@ -3,7 +3,7 @@ const expect = require('chai').expect; const { assertIsPublicKey } = require('../lib/assertions/misc'); const { KEY_TYPE_BTC } = require('../lib/constants/federation-constants'); const CustomError = require('../lib/CustomError'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { getRskTransactionHelper } = require('../lib/rsk-tx-helper-provider'); const RANDOM_PUBLIC_KEY = '0x02f9284f96eb093918a9da825111aec70a51152800e60249ac156ac35d2fa771ba'; diff --git a/tests/01_02_51-post_wasabi_fed_pubkeys_fork.js b/tests/01_02_51-post_wasabi_fed_pubkeys_fork.js index 859e65f1..3ae81481 100644 --- a/tests/01_02_51-post_wasabi_fed_pubkeys_fork.js +++ b/tests/01_02_51-post_wasabi_fed_pubkeys_fork.js @@ -3,7 +3,7 @@ const expect = require('chai').expect; const { assertIsPublicKey } = require('../lib/assertions/misc'); const { KEY_TYPE_BTC } = require('../lib/constants/federation-constants'); const CustomError = require('../lib/CustomError'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { getRskTransactionHelper } = require('../lib/rsk-tx-helper-provider'); const RANDOM_PUBLIC_KEY = '0x02f9284f96eb093918a9da825111aec70a51152800e60249ac156ac35d2fa771ba'; diff --git a/tests/01_03_01-lock_whitelist_pre_papyrus.js b/tests/01_03_01-lock_whitelist_pre_papyrus.js index ebdca226..478d99b1 100644 --- a/tests/01_03_01-lock_whitelist_pre_papyrus.js +++ b/tests/01_03_01-lock_whitelist_pre_papyrus.js @@ -10,7 +10,7 @@ const { const rskUtils = require('../lib/rsk-utils'); const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); let rskTxHelpers; let btcTxHelper; diff --git a/tests/01_03_54-post-papyrus_coinbase_information.js b/tests/01_03_54-post-papyrus_coinbase_information.js index 3d8676be..abe40c62 100644 --- a/tests/01_03_54-post-papyrus_coinbase_information.js +++ b/tests/01_03_54-post-papyrus_coinbase_information.js @@ -3,7 +3,7 @@ const bitcoinJs = require('bitcoinjs-lib'); const rskUtils = require('../lib/rsk-utils'); const { wait, ensure0x, retryWithCheck } = require('../lib/utils'); const CustomError = require('../lib/CustomError'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { getBtcClient } = require('../lib//btc-client-provider'); const btcEthUnitConverter = require('@rsksmart/btc-eth-unit-converter'); const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); diff --git a/tests/01_04_51-post_iris_register_flyover_btc_transaction.js b/tests/01_04_51-post_iris_register_flyover_btc_transaction.js index 083bd6c4..16b59f54 100644 --- a/tests/01_04_51-post_iris_register_flyover_btc_transaction.js +++ b/tests/01_04_51-post_iris_register_flyover_btc_transaction.js @@ -5,7 +5,7 @@ const { fundAddressAndGetData } = require('../lib/btc-utils'); const lbc = require('../lib/liquidity-bridge-contract'); const { sendTxWithCheck, getFedsPubKeys } = require('../lib/rsk-utils'); const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const btcEthUnitConverter = require('@rsksmart/btc-eth-unit-converter'); const { getBtcClient } = require('../lib/btc-client-provider'); const CustomError = require('../lib/CustomError'); diff --git a/tests/01_04_53-post_iris_register_fast_btc_transaction_surpass_locking_cap.js b/tests/01_04_53-post_iris_register_fast_btc_transaction_surpass_locking_cap.js index 05584018..2911f94d 100644 --- a/tests/01_04_53-post_iris_register_fast_btc_transaction_surpass_locking_cap.js +++ b/tests/01_04_53-post_iris_register_fast_btc_transaction_surpass_locking_cap.js @@ -9,7 +9,7 @@ const { getBtcClient } = require('../lib/btc-client-provider'); const btcEthUnitConverter = require('@rsksmart/btc-eth-unit-converter'); const { ensure0x, wait } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction after iris - with release', () => { diff --git a/tests/01_04_56-post_iris_flyover_sending_same_tx_without_witness_twice.js b/tests/01_04_56-post_iris_flyover_sending_same_tx_without_witness_twice.js index 786c0cd3..eb4ba34a 100644 --- a/tests/01_04_56-post_iris_flyover_sending_same_tx_without_witness_twice.js +++ b/tests/01_04_56-post_iris_flyover_sending_same_tx_without_witness_twice.js @@ -9,7 +9,7 @@ const { getBtcClient } = require('../lib/btc-client-provider'); const btcEthUnitConverter = require('@rsksmart/btc-eth-unit-converter'); const { ensure0x } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction post hop - sending same tx without witness twice', () => { diff --git a/tests/01_04_57-post_iris_flyover_sending_same_tx_with_witness_twice.js b/tests/01_04_57-post_iris_flyover_sending_same_tx_with_witness_twice.js index a466f0b2..0b669518 100644 --- a/tests/01_04_57-post_iris_flyover_sending_same_tx_with_witness_twice.js +++ b/tests/01_04_57-post_iris_flyover_sending_same_tx_with_witness_twice.js @@ -9,7 +9,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); const { ensure0x } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction post hop - sending same tx with witness twice', () => { diff --git a/tests/01_04_58-post_iris_flyover_surpassing_locking_cap_sending_same_tx_with_witness_twice.js b/tests/01_04_58-post_iris_flyover_surpassing_locking_cap_sending_same_tx_with_witness_twice.js index da6ad140..fd7074e7 100644 --- a/tests/01_04_58-post_iris_flyover_surpassing_locking_cap_sending_same_tx_with_witness_twice.js +++ b/tests/01_04_58-post_iris_flyover_surpassing_locking_cap_sending_same_tx_with_witness_twice.js @@ -8,7 +8,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); const { ensure0x } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction post hop - surpassing locking cap sending same tx with witness twice', () => { diff --git a/tests/01_04_59-post_iris_flyover_surpassing_locking_cap_sending_same_tx_without_witness_twice.js b/tests/01_04_59-post_iris_flyover_surpassing_locking_cap_sending_same_tx_without_witness_twice.js index 8a7983fb..d9731d5e 100644 --- a/tests/01_04_59-post_iris_flyover_surpassing_locking_cap_sending_same_tx_without_witness_twice.js +++ b/tests/01_04_59-post_iris_flyover_surpassing_locking_cap_sending_same_tx_without_witness_twice.js @@ -8,7 +8,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); const { ensure0x } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction post hop - surpassing locking cap sending same tx without witness twice', () => { diff --git a/tests/01_05_57-post_hop_active_powpeg_redeem_script.js b/tests/01_05_57-post_hop_active_powpeg_redeem_script.js index 52c3127f..13431e82 100644 --- a/tests/01_05_57-post_hop_active_powpeg_redeem_script.js +++ b/tests/01_05_57-post_hop_active_powpeg_redeem_script.js @@ -6,7 +6,7 @@ const redeemScriptParser = require('@rsksmart/powpeg-redeemscript-parser'); const CustomError = require('../lib/CustomError'); const removePrefix0x = require('../lib/utils').removePrefix0x; const {getRskTransactionHelpers} = require('../lib/rsk-tx-helper-provider'); -const {getBridge} = require('../lib/precompiled-abi-forks-util'); +const {getBridge} = require('../lib/bridge-provider'); const { GENESIS_FEDERATION_ADDRESS, GENESIS_FEDERATION_REDEEM_SCRIPT } = require('../lib/constants/federation-constants'); describe('Calling getActivePowpegRedeemScript method after hop', function() { diff --git a/tests/01_05_58-post_hop_register_fast_bridge_btc_below_minimum.js b/tests/01_05_58-post_hop_register_fast_bridge_btc_below_minimum.js index 5e372528..dfb29ec7 100644 --- a/tests/01_05_58-post_hop_register_fast_bridge_btc_below_minimum.js +++ b/tests/01_05_58-post_hop_register_fast_bridge_btc_below_minimum.js @@ -8,7 +8,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); const { ensure0x } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction after hop - send funds below minimum', () => { diff --git a/tests/01_06_03-pre-fingerroot500-get-estimated-fees-for-next-pegout_returned_zero.js b/tests/01_06_03-pre-fingerroot500-get-estimated-fees-for-next-pegout_returned_zero.js index 71edc04e..e793a55b 100644 --- a/tests/01_06_03-pre-fingerroot500-get-estimated-fees-for-next-pegout_returned_zero.js +++ b/tests/01_06_03-pre-fingerroot500-get-estimated-fees-for-next-pegout_returned_zero.js @@ -1,5 +1,5 @@ const expect = require('chai').expect; -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const CustomError = require('../lib/CustomError'); const { getRskTransactionHelper } = require('../lib/rsk-tx-helper-provider'); diff --git a/tests/01_06_51-post_fingerroot500_get-estimated_fees_for_next_pegout_should_returned_correct_estimated.js b/tests/01_06_51-post_fingerroot500_get-estimated_fees_for_next_pegout_should_returned_correct_estimated.js index b5048b98..96220d07 100644 --- a/tests/01_06_51-post_fingerroot500_get-estimated_fees_for_next_pegout_should_returned_correct_estimated.js +++ b/tests/01_06_51-post_fingerroot500_get-estimated_fees_for_next_pegout_should_returned_correct_estimated.js @@ -1,5 +1,5 @@ const expect = require('chai').expect -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const CustomError = require('../lib/CustomError'); const { MAX_ESTIMATED_FEE_PER_PEGOUT, FEE_DIFFERENCE_PER_PEGOUT } = require("../lib/constants/pegout-constants"); const { getRskTransactionHelper } = require('../lib/rsk-tx-helper-provider'); diff --git a/tests/03_00_01-powpeg_redeem_script.js b/tests/03_00_01-powpeg_redeem_script.js index 348d72b1..9cddbb27 100644 --- a/tests/03_00_01-powpeg_redeem_script.js +++ b/tests/03_00_01-powpeg_redeem_script.js @@ -3,7 +3,7 @@ chai.use(require('chai-as-promised')); const expect = chai.expect; const redeemScriptParser = require('@rsksmart/powpeg-redeemscript-parser'); const {getRskTransactionHelpers} = require('../lib/rsk-tx-helper-provider'); -const {getBridge} = require('../lib/precompiled-abi-forks-util'); +const {getBridge} = require('../lib/bridge-provider'); const CustomError = require('../lib/CustomError'); const removePrefix0x = require('../lib/utils').removePrefix0x; const { diff --git a/tests/04_00_05-fastbridge_operation_with_rejection.js b/tests/04_00_05-fastbridge_operation_with_rejection.js index be63a34f..1618332a 100644 --- a/tests/04_00_05-fastbridge_operation_with_rejection.js +++ b/tests/04_00_05-fastbridge_operation_with_rejection.js @@ -10,7 +10,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); const { ensure0x, wait } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction after fed change - with release', () => { diff --git a/tests/04_00_06-fastbridge_after_fed_change.js b/tests/04_00_06-fastbridge_after_fed_change.js index 9eea6ff6..31cf7ce9 100644 --- a/tests/04_00_06-fastbridge_after_fed_change.js +++ b/tests/04_00_06-fastbridge_after_fed_change.js @@ -9,7 +9,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const { getBtcClient } = require('../lib/btc-client-provider'); const { ensure0x } = require('../lib/utils'); const { fundAddressAndGetData } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); const { mineForPeginRegistration } = require('../lib/2wp-utils'); describe('Executing registerFastBtcTransaction after hop and federation changed', () => { diff --git a/tests/05_00_01-powpeg_redeem_script.js b/tests/05_00_01-powpeg_redeem_script.js index 134141d4..5835f23c 100644 --- a/tests/05_00_01-powpeg_redeem_script.js +++ b/tests/05_00_01-powpeg_redeem_script.js @@ -7,7 +7,7 @@ const { getRskTransactionHelpers } = require('../lib/rsk-tx-helper-provider'); const CustomError = require('../lib/CustomError'); const { removePrefix0x } = require('../lib/utils'); const { publicKeyToCompressed } = require('../lib/btc-utils'); -const { getBridge } = require('../lib/precompiled-abi-forks-util'); +const { getBridge } = require('../lib/bridge-provider'); // in order to run this as a single test file, it requires a federation change so follow the following command // npm run run-single-test-file 04_00_02-fedchange.js,05_02_01-last_fork_active_powpeg_redeem_script.js