@@ -22,26 +22,20 @@ describe('class Contract {}', () => {
2222 let contract : Contract ;
2323
2424 beforeAll ( async ( ) => {
25- const { code , transaction_hash, address } = await provider . deployContract ( {
25+ const { transaction_hash, contract_address } = await provider . deployContract ( {
2626 contract : compiledErc20 ,
2727 } ) ;
28- erc20 = new Contract ( compiledErc20 . abi , address ! , provider ) ;
29- expect ( code ) . toBe ( 'TRANSACTION_RECEIVED' ) ;
28+ erc20 = new Contract ( compiledErc20 . abi , contract_address ! , provider ) ;
3029 await provider . waitForTransaction ( transaction_hash ) ;
3130 // Deploy Multicall
3231
33- const {
34- code : m_code ,
35- transaction_hash : m_transaction_hash ,
36- address : multicallAddress ,
37- } = await provider . deployContract ( {
38- contract : compiledMulticall ,
39- } ) ;
32+ const { transaction_hash : m_transaction_hash , contract_address : multicallAddress } =
33+ await provider . deployContract ( {
34+ contract : compiledMulticall ,
35+ } ) ;
4036
4137 contract = new Contract ( compiledMulticall . abi , multicallAddress ! , provider ) ;
4238
43- expect ( m_code ) . toBe ( 'TRANSACTION_RECEIVED' ) ;
44-
4539 await provider . waitForTransaction ( m_transaction_hash ) ;
4640 } ) ;
4741
@@ -92,11 +86,10 @@ describe('class Contract {}', () => {
9286 let contract : Contract ;
9387
9488 beforeAll ( async ( ) => {
95- const { code , transaction_hash, address } = await provider . deployContract ( {
89+ const { transaction_hash, contract_address } = await provider . deployContract ( {
9690 contract : compiledTypeTransformation ,
9791 } ) ;
98- contract = new Contract ( compiledTypeTransformation . abi , address ! , provider ) ;
99- expect ( code ) . toBe ( 'TRANSACTION_RECEIVED' ) ;
92+ contract = new Contract ( compiledTypeTransformation . abi , contract_address ! , provider ) ;
10093 await provider . waitForTransaction ( transaction_hash ) ;
10194 } ) ;
10295
@@ -205,9 +198,8 @@ describe('class Contract {}', () => {
205198 const erc20Response = await provider . deployContract ( {
206199 contract : compiledErc20 ,
207200 } ) ;
208- erc20Address = erc20Response . address ! ;
201+ erc20Address = erc20Response . contract_address ! ;
209202 erc20 = new Contract ( compiledErc20 . abi , erc20Address , provider ) ;
210- expect ( erc20Response . code ) . toBe ( 'TRANSACTION_RECEIVED' ) ;
211203 await provider . waitForTransaction ( erc20Response . transaction_hash ) ;
212204 } ) ;
213205
@@ -229,12 +221,11 @@ describe('class Contract {}', () => {
229221describe ( 'class ContractFactory {}' , ( ) => {
230222 let erc20Address : string ;
231223 beforeAll ( async ( ) => {
232- const { code , transaction_hash, address } = await provider . deployContract ( {
224+ const { transaction_hash, contract_address } = await provider . deployContract ( {
233225 contract : compiledErc20 ,
234226 } ) ;
235- expect ( code ) . toBe ( 'TRANSACTION_RECEIVED' ) ;
236227 await provider . waitForTransaction ( transaction_hash ) ;
237- erc20Address = address ! ;
228+ erc20Address = contract_address ! ;
238229 } ) ;
239230 test ( 'deployment of new contract' , async ( ) => {
240231 const factory = new ContractFactory ( compiledErc20 , provider ) ;
0 commit comments