File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ dotenvConfig();
1313 */
1414const config : HardhatUserConfig = {
1515 solidity : {
16- version : "0.7.6 " ,
16+ version : "0.8.26 " ,
1717 settings : {
1818 optimizer : {
1919 enabled : true ,
Original file line number Diff line number Diff line change @@ -32,6 +32,8 @@ export const beforeSetup = async (tokenAmount: number) => {
3232 ( x , y ) => ( { ...x , [ y . address ] : y } ) ,
3333 { }
3434 ) ;
35+
36+ console . log ( "Reading framework config..." ) ;
3537 const readFromDir = __dirname . split ( "test" ) [ 0 ] + "config/hardhat.json" ;
3638 const rawData = fs . readFileSync ( readFromDir ) ;
3739 const frameworkAddresses = JSON . parse ( rawData . toString ( ) ) ;
@@ -82,9 +84,9 @@ export const beforeSetup = async (tokenAmount: number) => {
8284 // we wait for the indexer to catch up before the tests start
8385 const txn = await resolver . set ( "supertokens.test.fDAIx" , fDAIx . address ) ;
8486 const receipt = await txn . wait ( ) ;
87+
8588 await waitUntilBlockIndexed ( receipt . blockNumber ) ;
8689 const resolverFDAIxAddress = await resolver . get ( "supertokens.test.fDAIx" ) ;
87-
8890 if ( resolverFDAIxAddress !== fDAIx . address ) {
8991 throw new Error ( "fDAIx not set properly in resolver." ) ;
9092 }
@@ -211,6 +213,7 @@ export const waitUntilBlockIndexed = async (txnBlockNumber: number) => {
211213 let currentBlock : number ;
212214 do {
213215 currentBlock = await getCurrentBlockNumber ( ) ;
216+ console . log ( `Waiting for subgraph... Current: ${ currentBlock } , Target: ${ txnBlockNumber } ` ) ;
214217 await asleep ( 50 ) ;
215218 } while ( txnBlockNumber > currentBlock ) ;
216219} ;
You can’t perform that action at this time.
0 commit comments