fix ether test in pos
MODIFY
examples/pos/ether/burn.js
examples/pos/ether/burn.js
-const config = require('../config')
-const utils = require('../utils')
-const maticPOSClient = utils.getMaticPOSClient()
+const { getMaticPOSClient, pos, from } = require('../../utils')
+const amount = '100000000000000000'
const execute = async () => {
try {
- const tx = await maticPOSClient.burnERC20(config.child.MaticWETH, config.user.amount)
+ const tx = await getMaticPOSClient().burnERC20(pos.child.weth, amount)
console.log(tx.transactionHash) // eslint-disable-line
} catch (e) {
console.error(e) // eslint-disable-line

MODIFY
examples/pos/ether/deposit.js
examples/pos/ether/deposit.js
-const config = require('../config')
-const utils = require('../utils')
-const maticPOSClient = utils.getMaticPOSClient()
+const { getMaticPOSClient, from } = require('../../utils')
+
+const amount = '100000000000000000'
const execute = async () => {
try {
- const tx = await maticPOSClient.depositEtherForUser(config.user.address, config.user.amount)
+ const tx = await getMaticPOSClient().depositEtherForUser(from, amount, {
+ from,
+ })
console.log(tx.transactionHash) // eslint-disable-line
} catch (e) {
console.error(e) // eslint-disable-line

MODIFY
examples/pos/ether/exit.js
examples/pos/ether/exit.js
-const utils = require('../utils')
-const maticPOSClient = utils.getMaticPOSClient()
+const { getMaticPOSClient, pos, from } = require('../../utils')
const burnHash = '0xbadbf10a33ba5ae48cfa1660e011eb15bf927773610ace9466c71d14749d4132'
const execute = async () => {
try {
- const tx = await maticPOSClient.exitERC20(burnHash)
+ const tx = await getMaticPOSClient().exitERC20(burnHash)
console.log(tx.transactionHash) // eslint-disable-line
} catch (e) {
console.error(e) // eslint-disable-line

fix ether test in pos