@@ -44,7 +44,7 @@ export interface TestContracts {
4444
4545export class BaseTestSetup {
4646 static readonly MIN_DELAY = 24n * 60n * 60n * 7n
47- static readonly DONE_TIMESTAMP = 1
47+ static readonly DONE_TIMESTAMP = 1n
4848 static readonly NO_PREDECESSOR = 0n
4949 static readonly EMPTY_SALT = 0n
5050
@@ -190,9 +190,9 @@ export class BaseTestSetup {
190190 /**
191191 * Setup the call proxy contract
192192 */
193- async setupCallProxyContract ( ) : Promise < void > {
193+ async setupCallProxyContract ( testId : string ) : Promise < void > {
194194 const data = {
195- id : crc32 ( ' mcms.call-proxy.test-integration' ) ,
195+ id : crc32 ( ` mcms.call-proxy.${ testId } ` ) ,
196196 target : this . bind . timelock . address ,
197197 }
198198 this . bind . callProxy = this . blockchain . openContract (
@@ -203,9 +203,9 @@ export class BaseTestSetup {
203203 /**
204204 * Setup the counter contract
205205 */
206- async setupCounterContract ( ) : Promise < void > {
206+ async setupCounterContract ( testId : string ) : Promise < void > {
207207 const data = {
208- id : crc32 ( ' mcms.counter.test-integration' ) ,
208+ id : crc32 ( ` mcms.counter.${ testId } ` ) ,
209209 value : 0 ,
210210 ownable : {
211211 owner : this . bind . timelock . address ,
@@ -239,15 +239,29 @@ export class BaseTestSetup {
239239 expect ( await this . bind . ac . getRoleAdmin ( rbactl . roles . admin ) ) . toEqual ( rbactl . roles . admin )
240240 }
241241
242+ // TODO
243+ // deployCallProxyContract() {
244+ // const body = callproxy.builder.message.topUp.encode({ queryId: 1n })
245+ // return this.bind.callProxy.sendInternal(this.acc.deployer.getSender(), toNano('0.05'), body)
246+ // }
247+
248+ deployCounterContract ( ) {
249+ // const body = counter.builder.message.topUp.encode({ queryId: 1n }) // TODO use TopUp after it is implemented
250+ const body = beginCell ( ) . endCell ( )
251+ return this . bind . counter . sendInternal ( this . acc . deployer . getSender ( ) , toNano ( '0.05' ) , body )
252+ }
253+
242254 /**
243255 * Complete setup for all contracts - convenience method that combines all setup steps
244256 */
245257 async setupAll ( testId : string ) : Promise < void > {
246258 await this . initializeBlockchain ( )
247259 await this . setupTimelockContract ( testId )
248- await this . setupCallProxyContract ( )
249- await this . setupCounterContract ( )
250260 await this . deployTimelockContract ( )
261+ await this . setupCallProxyContract ( testId )
262+ // await this.deployCallProxyContract()
263+ await this . setupCounterContract ( testId )
264+ await this . deployCounterContract ( )
251265 }
252266
253267 /**
0 commit comments