@@ -251,16 +251,20 @@ describe('defaultProvider', () => {
251251 } ) ;
252252
253253 describe ( 'Contract methods' , ( ) => {
254+ let contractAddress : string ;
254255 let deployResponse : DeployContractResponse ;
255256 let declareResponse : DeclareContractResponse ;
257+ let blockNumber : BlockNumber ;
256258
257259 beforeAll ( async ( ) => {
258260 deployResponse = await provider . deployContract ( { contract : compiledErc20 } ) ;
261+ contractAddress = deployResponse . contract_address ;
259262 declareResponse = await provider . declareContract ( { contract : compiledErc20 } ) ;
260263 await Promise . all ( [
261264 provider . waitForTransaction ( deployResponse . transaction_hash ) ,
262265 provider . waitForTransaction ( declareResponse . transaction_hash ) ,
263266 ] ) ;
267+ ( { block_number : blockNumber } = await provider . getBlock ( 'latest' ) ) ;
264268 } ) ;
265269
266270 describe ( 'deployContract' , ( ) => {
@@ -279,10 +283,7 @@ describe('defaultProvider', () => {
279283
280284 describe ( 'getClassAt' , ( ) => {
281285 test ( 'response' , async ( ) => {
282- const classResponse = await provider . getClassAt (
283- '0x075c4CEe7e88010008c1aA8777D798073D5Db63B685A033140cE5AF144EA0283' ,
284- '0x673c337dd17b50628e7b2a070e2c599a4fed54a2e7c1ff10e84115325c5b37e'
285- ) ;
286+ const classResponse = await provider . getClassAt ( contractAddress , blockNumber ) ;
286287
287288 expect ( classResponse ) . toHaveProperty ( 'program' ) ;
288289 expect ( classResponse ) . toHaveProperty ( 'entry_points_by_type' ) ;
0 commit comments