File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,10 @@ async function startContainer(dockerImage: string): Promise<Container> {
4242 } ,
4343 HostConfig : {
4444 AutoRemove : true ,
45- NetworkMode : "host" ,
45+ PortBindings : {
46+ [ `${ cfg . PORT_SIDECAR } /tcp` ] : [ { HostPort : `${ cfg . PORT_SIDECAR } ` } ] ,
47+ [ `${ cfg . PORT_RPC } /tcp` ] : [ { HostPort : `${ cfg . PORT_RPC } ` } ] ,
48+ } ,
4649 } ,
4750 Image : dockerImage ,
4851 name : cfg . CONTAINER_NAME ,
Original file line number Diff line number Diff line change @@ -4,7 +4,9 @@ import { GatewayOp } from "@zetachain/protocol-contracts-ton/dist/types";
44import { Gateway } from "@zetachain/protocol-contracts-ton/dist/wrappers/Gateway" ;
55import { ethers , NonceManager } from "ethers" ;
66
7+ import { NetworkID } from "../../constants" ;
78import { logger } from "../../logger" ;
9+ import { registerContracts } from "../../utils" ;
810import { zetachainDeposit } from "../zetachain/deposit" ;
911import { zetachainDepositAndCall } from "../zetachain/depositAndCall" ;
1012import { zetachainExecute } from "../zetachain/execute" ;
@@ -126,6 +128,25 @@ async function setupThrowable(opts: SetupOptions) {
126128 env,
127129 } ;
128130
131+ const changeChainStatus =
132+ await opts . zetachainContracts . coreRegistry . changeChainStatus (
133+ BigInt ( NetworkID . TON ) ,
134+ ethers . ZeroAddress ,
135+ "0x" ,
136+ true ,
137+ {
138+ gasLimit : 1_000_000 ,
139+ }
140+ ) ;
141+
142+ await changeChainStatus . wait ( ) ;
143+
144+ await registerContracts ( opts . zetachainContracts . coreRegistry , NetworkID . TON , {
145+ gateway : ethers . hexlify (
146+ ethers . toUtf8Bytes ( `${ gateway . address . toRawString ( ) } ` )
147+ ) ,
148+ } ) ;
149+
129150 log . info ( "TON setup complete" ) ;
130151 return result ;
131152}
You can’t perform that action at this time.
0 commit comments