Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyamospan committed Jan 24, 2024
1 parent 55b0df6 commit 0b1644f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 35 deletions.
4 changes: 3 additions & 1 deletion config/constants/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export interface MidasAddresses {
tokensReceiver: string;
}

export const midasAddressesPerNetwork: ConfigPerNetwork<MidasAddresses | undefined> = {
export const midasAddressesPerNetwork: ConfigPerNetwork<
MidasAddresses | undefined
> = {
main: {
tokensReceiver: '0x875c06A295C41c27840b9C9dfDA7f3d819d8bC6A',
accessControl: '0x0312A9D1Ff2372DDEdCBB21e4B6389aFc919aC4B',
Expand Down
4 changes: 2 additions & 2 deletions scripts/deploy/deploy_DataFeed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { AggregatorV3Mock__factory } from '../../typechain-types';
// IB01/USD: 0x32d1463eb53b73c095625719afa544d5426354cb

const aggregatorsByNetwork: Record<number, string> = {
1: '0xb49f677943bc038e9857d61e7d053caa2c1734c1',
1: '0x32d1463eb53b73c095625719afa544d5426354cb',
11155111: '',
};

Expand Down Expand Up @@ -76,7 +76,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {

const addresses = getCurrentAddresses(hre);

console.log('Deploying DataFeed...');
console.log('Deploying DataFeed...', aggregator);
const deployment = await hre.upgrades.deployProxy(
await hre.ethers.getContractFactory(DATA_FEED_CONTRACT_NAME, owner),
[addresses?.accessControl, aggregator],
Expand Down
62 changes: 30 additions & 32 deletions test/common/post-deploy.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,41 +30,39 @@ type Params = {
execute?: (role: string, address: string) => Promise<any>;
};

export const initGrantRoles = async ({
accessControl,
depositVault,
redemptionVault,
export const initGrantRoles = async (
// eslint-disable-next-line @typescript-eslint/no-unused-vars
mTBILL,
owner,
execute,
}: Omit<
Params,
| 'aggregator'
| 'dataFeed'
| 'dataFeedEur'
| 'aggregatorEur'
| 'minAmountToDeposit'
| 'tokensReceiver'
>) => {
const roles = await getAllRoles(accessControl);

const checkAndExecute = async (role: string, address: string) => {
if (!(await accessControl.hasRole(role, address))) {
if (execute) await execute(role, address);
else {
await accessControl
.connect(owner)
.grantRole(role, address)
.then((tx) => tx.wait());
}
}
};

_: // accessControl,
// depositVault,
// redemptionVault,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
// mTBILL,
// owner,
// execute,
Omit<
Params,
| 'aggregator'
| 'dataFeed'
| 'dataFeedEur'
| 'aggregatorEur'
| 'minAmountToDeposit'
| 'tokensReceiver'
>,
) => {
// const roles = await getAllRoles(accessControl);
// const checkAndExecute = async (role: string, address: string) => {
// if (!(await accessControl.hasRole(role, address))) {
// if (execute) await execute(role, address);
// else {
// await accessControl
// .connect(owner)
// .grantRole(role, address)
// .then((tx) => tx.wait());
// }
// }
// };
// await checkAndExecute(roles.minter, depositVault.address);

// await checkAndExecute(roles.minter, redemptionVault.address);

// await checkAndExecute(roles.burner, redemptionVault.address);
};

Expand Down

0 comments on commit 0b1644f

Please sign in to comment.