Skip to content

Commit

Permalink
Deploy the linked list helper only for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfornax committed Aug 30, 2024
1 parent d965f20 commit 30e1cda
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
9 changes: 7 additions & 2 deletions test/_helpers/deployment.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*** Dependencies ********************/
import { LinkedListStorage, RocketStorage } from '../_utils/artifacts';
import { RocketStorage } from '../_utils/artifacts';

const hre = require('hardhat');
const pako = require('pako');
Expand Down Expand Up @@ -100,13 +100,18 @@ const contracts = {
rocketDAOProtocolProposal: artifacts.require('RocketDAOProtocolProposal.sol'),
// Utils
addressQueueStorage: artifacts.require('AddressQueueStorage.sol'),
LinkedListStorage: artifacts.require('LinkedListStorageHelper.sol'),
addressSetStorage: artifacts.require('AddressSetStorage.sol'),
};

// Development helper contracts
const revertOnTransfer = artifacts.require('RevertOnTransfer.sol');
const rocketNodeDepositLEB4 = artifacts.require('RocketNodeDepositLEB4.sol');
if (network.name !== 'live' && network.name !== 'goerli') {
// the linked list storage helper needs to be added as a network contract
contracts.linkedListStorage = artifacts.require('LinkedListStorageHelper.sol');
} else {
contracts.linkedListStorage = artifacts.require('LinkedListStorage.sol');
}

// Instance contract ABIs
const abis = {
Expand Down
4 changes: 2 additions & 2 deletions test/util/util-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function() {

});

it.only(printTitle('random', 'pack/unpack shouldnt change values'), async () => {
it(printTitle('random', 'pack/unpack shouldnt change values'), async () => {
const linkedListStorage = await LinkedListStorage.deployed();
let item = {
receiver: random,
Expand Down Expand Up @@ -79,7 +79,7 @@ export default function() {
assert.equal(listLength, 0)
});

it.only(printTitle('random', 'can remove the only queue item'), async () => {
it(printTitle('random', 'can remove the only queue item'), async () => {
const linkedListStorage = await LinkedListStorage.deployed();
let itemIn = {
receiver: random,
Expand Down

0 comments on commit 30e1cda

Please sign in to comment.