Skip to content

Commit 0334bf2

Browse files
authored
fix: expose error list and types at npm package (#809)
* fix: expose error list and types at npm package * chore: set same ethers version for typechain and hardhat
1 parent 938743e commit 0334bf2

File tree

6 files changed

+313
-1058
lines changed

6 files changed

+313
-1058
lines changed

helper-hardhat-config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ export const buildForkConfig = (): HardhatNetworkForkingUserConfig | undefined =
1818
let forkMode: HardhatNetworkForkingUserConfig | undefined;
1919
if (FORK) {
2020
forkMode = {
21-
url: NETWORKS_RPC_URL[FORK],
21+
url: NETWORKS_RPC_URL[FORK as eEthereumNetwork],
2222
};
23-
if (FORK_BLOCK_NUMBER || BLOCK_TO_FORK[FORK]) {
24-
forkMode.blockNumber = FORK_BLOCK_NUMBER || BLOCK_TO_FORK[FORK];
23+
if (FORK_BLOCK_NUMBER || BLOCK_TO_FORK[FORK as eEthereumNetwork]) {
24+
forkMode.blockNumber = FORK_BLOCK_NUMBER || BLOCK_TO_FORK[FORK as eEthereumNetwork];
2525
}
2626
}
2727
return forkMode;

helpers/contracts-helpers.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@ import { ethers } from 'ethers';
22
import { signTypedData_v4 } from 'eth-sig-util';
33
import { fromRpcSig, ECDSASignature } from 'ethereumjs-util';
44
import { tEthereumAddress, tStringTokenSmallUnits } from './types';
5-
import { MintableERC20 } from '../types/MintableERC20';
65
import { getContract } from '@aave/deploy-v3';
76
import { impersonateAccountsHardhat } from './misc-utils';
87
import { HardhatRuntimeEnvironment } from 'hardhat/types';
98
import { InitializableImmutableAdminUpgradeabilityProxy } from '../types';
109

1110
declare var hre: HardhatRuntimeEnvironment;
1211

13-
export type MockTokenMap = { [symbol: string]: MintableERC20 };
14-
1512
export const convertToCurrencyDecimals = async (tokenAddress: tEthereumAddress, amount: string) => {
1613
const token = await getContract('IERC20Detailed', tokenAddress);
1714
let decimals = (await token.decimals()).toString();

helpers/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './constants';
2+
export * from './types';
3+
export * from './contracts-helpers';

lib.tsconfig.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es2020",
4+
"module": "commonjs",
5+
"strict": true,
6+
"esModuleInterop": true,
7+
"skipLibCheck": true,
8+
"outDir": "dist/",
9+
"importHelpers": false,
10+
"declaration": true,
11+
"declarationMap": true,
12+
"declarationDir": "dist/types",
13+
"typeRoots": ["./typechain/*.d.ts", "./node_modules/@types"]
14+
},
15+
"include": ["helpers", "types", "hardhat.config.ts"]
16+
}

0 commit comments

Comments
 (0)