Skip to content

Commit

Permalink
Replaces precompiled-abi-forks-util name import to the correct one.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-then committed Dec 11, 2024
1 parent f081873 commit ff6d059
Show file tree
Hide file tree
Showing 28 changed files with 27 additions and 28 deletions.
2 changes: 1 addition & 1 deletion lib/assertions/fed.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
2 changes: 1 addition & 1 deletion lib/rsk-utils-legacy.js
Original file line number Diff line number Diff line change
@@ -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;

Expand Down
2 changes: 1 addition & 1 deletion lib/tests/bridge-calls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion lib/tests/call_receive_header.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
2 changes: 1 addition & 1 deletion lib/tests/call_receive_headers.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
1 change: 0 additions & 1 deletion test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down
2 changes: 1 addition & 1 deletion tests/00_00_03-vote_for_locking_cap_to_21m.js
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
2 changes: 1 addition & 1 deletion tests/00_00_04-change-federation.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/01_01_03-pre_orchid_lock_whitelist_fork.js
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/01_01_52-post_orchid_lock_whitelist_fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/01_02_01-pre_wasabi_fed_pubkeys_fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion tests/01_02_51-post_wasabi_fed_pubkeys_fork.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
2 changes: 1 addition & 1 deletion tests/01_03_01-lock_whitelist_pre_papyrus.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tests/01_03_54-post-papyrus_coinbase_information.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/01_05_57-post_hop_active_powpeg_redeem_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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');

Expand Down
Original file line number Diff line number Diff line change
@@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/03_00_01-powpeg_redeem_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion tests/04_00_05-fastbridge_operation_with_rejection.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/04_00_06-fastbridge_after_fed_change.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/05_00_01-powpeg_redeem_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff6d059

Please sign in to comment.