Skip to content

Instantly share code, notes, and snippets.

Created Apr 23, 2021
What would you like to do?
const matic_raw = require("./maticjs")
const config = require("./config.json")
const ext_mngr = require("./maticjs/lib/common/ExitManager")
// console.log(ext_mngr)
const root_chain = require("./maticjs/lib/root/RootChain.js")
// console.log(root_chain)
const { default: ExitManager } = require("./maticjs/lib/common/ExitManager")
const { default: RootChain } = require("./maticjs/lib/root/RootChain.js")
const params = {
network: "testnet",
version: "mumbai",
maticProvider: config.MATIC_PROVIDER,
parentProvider: config.PARENT_PROVIDER,
posRootChainManager: config.ROOTCHAIN_MANAGER_PROXY,
posERC721Predicate: config.ERC721_PREDICATE_PROXY,
posERC1155Predicate: config.ERC1155_PREDICATE_PROXY,
async function exec() {
const pos_client = new matic_raw.MaticPOSClient(params)
// console.log(pos_client)
const mgr = new ExitManager(RootChain, params, pos_client)
const temp = mgr.web3Client.posRootChainManager.exitManager
// console.log(temp)
const payload = await temp.buildPayloadForExit(
"0x4756b76a9611cffee3d2eb645819e988c34615621ea256f818ab788d81e1f838", // BURN TX: Change this to your hash
"0x8c5261668696ce22758910d05bab8f186d6eb247ceac2af2e82c7dc17669b036") // MESSAGE_SENT_EVENT_SIG: Do not change this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment