Skip to content

About FxERC20Transfer withdraw test code  #50

@picardcapt1212

Description

@picardcapt1212

Hi, i have a question about FxERC20Transfer withdraw testcode in feature/hardhat_unittestbranch.
So i tested erc20 state transfer with test/tunnel/FxERC20Tunnel.ts.
I understand mapToken, deposit function, but i'm little confused of this withdraw line.

In the test code after deposit(), the wallet.getAddress() has 10(i will omit 10^18) in child token contract(the mapped contract).
And also the wallet.getAddress() has 9990 in the root token contract.

child token contract wallet.getAddress() balance : 10
root token contract wallet.getAddress() balance : 9990

When withdraw() function call(withdraw 5 from child token contract) i thought below will be the result.

child token contract wallet.getAddress() balance : 5
root token contract wallet.getAddress() balance : 9995

But instead of above balance, the test code is showing me below result.

child token contract wallet.getAddress() balance : 5
root token contract wallet.getAddress() balance : 9990

So to sum up my question is
Q1. Is the wallet.getAddress() balance I expected right? - child token contract: 5, root token contract: 9995
Q2. Is the withdraw test code resulted becuase the checkpointManager is not working in local test environment?
Q3. What is the checkpointManager0x600e7E2B520D51a7FE5e404E73Fb0D98bF2A913E in the test code? over here.

Thanks for advanced!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions