new: file for custom event exit
MODIFY
examples/pos/erc20/withdraw_exit.js
examples/pos/erc20/withdraw_exit.js
@@ -7,13 +7,6 @@ const execute = async () => {
const result = await erc20Token.withdrawExit('0xb005d8db45f33836c422ee18286fa8ebe49b4ec7b9930e673d85ecd081cc3b8e');
- /* If burn event Signature is different for the particular transaction. */
- // const burnEventSignature = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
- // const result = await erc20Token.withdrawExit('0x911403585328c9e1d8fa3354ed78b51772684bf755dda19d2658247924af473d', {
- // burnEventSignature: burnEventSignature,
- // });
- // console.log(result)
-
const txHash = await result.getTransactionHash();
console.log("txHash", txHash);
const receipt = await result.getReceipt();

ADD
examples/pos/erc20/withdraw_exit_custom_event.js
+const { pos } = require('../../config');
+const { getPOSClient, from } = require('../../utils');
+
+const execute = async () => {
+ const client = await getPOSClient();
+ const erc20Token = client.erc20(pos.parent.erc20, true);
+
+ const burnEventSignature = "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
+
+ const result = await erc20Token.withdrawExit('0x911403585328c9e1d8fa3354ed78b51772684bf755dda19d2658247924af473d', {
+ burnEventSignature: burnEventSignature,
+ });
+
+ const txHash = await result.getTransactionHash();
+ console.log("txHash", txHash);
+ const receipt = await result.getReceipt();
+ console.log("receipt", receipt);
+
+}
+execute().then(() => {
+}).catch(err => {
+ console.error("err", err);
+}).finally(_ => {
+ process.exit(0);
+})
\ No newline at end of file

new: file for custom event exit