@@ -44,13 +44,15 @@ describe("BlockHashRNG", async () => {
4444 const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
4545 const [ rn ] = abiCoder . decode ( [ "uint" ] , ethers . getBytes ( `${ trace . returnValue } ` ) ) ;
4646 expect ( rn ) . to . not . equal ( 0 ) ;
47+ await tx . wait ( ) ;
4748 } ) ;
4849
4950 it ( "Should return zero for a block number in the future" , async ( ) => {
5051 const tx = await rng . receiveRandomness ( 9876543210 ) ;
5152 const trace = await network . provider . send ( "debug_traceTransaction" , [ tx . hash ] ) ;
5253 const [ rn ] = abiCoder . decode ( [ "uint" ] , ethers . getBytes ( `${ trace . returnValue } ` ) ) ;
5354 expect ( rn ) . to . equal ( 0 ) ;
55+ await tx . wait ( ) ;
5456 } ) ;
5557} ) ;
5658
@@ -81,6 +83,7 @@ describe("ChainlinkRNG", async () => {
8183
8284 const rn = await rng . receiveRandomness ( 0 ) ;
8385 expect ( rn ) . to . equal ( expectedRn ) ;
86+ await tx . wait ( ) ;
8487 } ) ;
8588
8689 it ( "Should return only the last random number when multiple requests are made" , async ( ) => {
@@ -114,6 +117,7 @@ describe("ChainlinkRNG", async () => {
114117 // Should return only the last random number
115118 const rn = await rng . receiveRandomness ( 0 ) ;
116119 expect ( rn ) . to . equal ( expectedRn2 ) ;
120+ await tx . wait ( ) ;
117121 } ) ;
118122} ) ;
119123
@@ -143,6 +147,7 @@ describe("RandomizerRNG", async () => {
143147
144148 const rn = await rng . receiveRandomness ( 0 ) ;
145149 expect ( rn ) . to . equal ( expectedRn ) ;
150+ await tx . wait ( ) ;
146151 } ) ;
147152
148153 it ( "Should return only the last random number when multiple requests are made" , async ( ) => {
@@ -175,5 +180,6 @@ describe("RandomizerRNG", async () => {
175180 // Should return only the last random number
176181 const rn = await rng . receiveRandomness ( 0 ) ;
177182 expect ( rn ) . to . equal ( expectedRn2 ) ;
183+ await tx . wait ( ) ;
178184 } ) ;
179185} ) ;
0 commit comments