pass web3sidechainclient in exitutil
MODIFY
package.json
package.json
{
"name": "@maticnetwork/maticjs",
- "version": "3.0.0-beta.6",
+ "version": "3.0.0-beta.7",
"description": "Javascript developer library for interacting with Matic Network",
"main": "dist/npm.export.js",
"types": "dist/ts/index.d.ts",

MODIFY
src/pos/exit_util.ts
src/pos/exit_util.ts
import { RootChain } from "./root_chain";
-import { Converter, ProofUtil } from "../utils";
+import { Converter, ProofUtil, Web3SideChainClient } from "../utils";
import BN from "bn.js";
import ethUtils from "ethereumjs-util";
import { ITransactionReceipt } from "../interfaces";
@@ -27,11 +27,12 @@ export class ExitUtil {
requestConcurrency: number;
config: IBaseClientConfig;
- constructor(config: IBaseClientConfig, maticClient: BaseWeb3Client, rootChain: RootChain, requestConcurrency: number) {
- this.maticClient_ = maticClient;
+ constructor(client: Web3SideChainClient<IBaseClientConfig>, rootChain: RootChain) {
+ this.maticClient_ = client.child;
this.rootChain = rootChain;
- this.requestConcurrency = requestConcurrency;
+ const config = client.config;
this.config = config;
+ this.requestConcurrency = config.requestConcurrency;
}
private getLogIndex_(logEventSig: string, receipt: ITransactionReceipt) {

MODIFY
src/pos/index.ts
src/pos/index.ts
@@ -45,10 +45,8 @@ export class POSClient extends BridgeClient<IPOSClientConfig> {
);
this.exitUtil = new ExitUtil(
- config,
- this.client.child,
- rootChain,
- config.requestConcurrency
+ this.client,
+ rootChain
);
return this;

MODIFY
test/debug.js
test/debug.js
@@ -53,7 +53,7 @@ const execute = async () => {
// );
// return console.log("tokens", tokens);
- const tx = await goerliERC721Token.withdrawExit('0x2697a930ae883dd28c40a263a6a3b4d41a027cab56836de987ed2c2896abcdeb', {
+ const tx = await client.depositEther('10000', from, {
// returnTransaction: true
});
// console.log('tx', tx);

pass web3sidechainclient in exitutil