File tree Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Expand file tree Collapse file tree 5 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 1+ import { Wallet } from "ethers" ;
2+ import { Address } from "../types" ;
3+
4+ export const getRandomAddress = async ( ) : Promise < Address > => {
5+ const wallet = Wallet . createRandom ( ) ;
6+ return await wallet . getAddress ( ) ;
7+ } ;
Original file line number Diff line number Diff line change @@ -37,3 +37,6 @@ export {
3737export {
3838 convertLibraryNameToLinkId
3939} from "./libraryUtils" ;
40+ export {
41+ getRandomAddress
42+ } from "./addressUtils" ;
Original file line number Diff line number Diff line change @@ -26,12 +26,11 @@ import {
2626
2727import { StandardTokenMock } from "../contracts" ;
2828
29- import { ether } from "../common" ;
29+ import { ether , getRandomAddress } from "../common" ;
3030
3131import { AToken__factory } from "../../typechain/factories/AToken__factory" ;
3232import { MAX_UINT_256 } from "../constants" ;
3333import { AaveTokenV2Mintable } from "../../typechain/AaveTokenV2Mintable" ;
34- import { getRandomAddress } from "../test" ;
3534
3635export class AaveFixture {
3736 private _deployer : DeployHelper ;
Original file line number Diff line number Diff line change @@ -26,11 +26,6 @@ export const getRandomAccount = async (): Promise<Account> => {
2626 return accounts [ accounts . length - 1 ] ;
2727} ;
2828
29- export const getRandomAddress = async ( ) : Promise < Address > => {
30- const wallet = ethers . Wallet . createRandom ( ) . connect ( provider ) ;
31- return await wallet . getAddress ( ) ;
32- } ;
33-
3429export const getEthBalance = async ( account : Address ) : Promise < BigNumber > => {
3530 return await provider . getBalance ( account ) ;
3631} ;
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ export {
2020 getAccounts ,
2121 getEthBalance ,
2222 getRandomAccount ,
23- getRandomAddress ,
2423} from "./accountUtils" ;
2524export {
2625 addSnapshotBeforeRestoreAfterEach ,
@@ -32,3 +31,6 @@ export {
3231 mineBlockAsync ,
3332 cacheBeforeEach
3433} from "./testingUtils" ;
34+ export {
35+ getRandomAddress
36+ } from "../common" ;
You can’t perform that action at this time.
0 commit comments