Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native Supernet Balance does not reflect after bridging Parent Token #2051

Open
sahil3Vedi opened this issue Nov 21, 2023 · 2 comments
Open

Comments

@sahil3Vedi
Copy link

sahil3Vedi commented Nov 21, 2023

Native Supernet Balance does not reflect after bridging Parent Token

Description

Steps followed to setup Supernet: https://github.com/integrations-Polygon/Supernets-Edge-Tutorials/blob/master/Supernets_v1.3_setup.md

Your environment

  • PopOS (Ubuntu 22.04)
  • Edge v1.3.2 (ab9b887)
  • The branch that causes this issue.
  • Manual Setup (steps mentioned above)

Steps to reproduce

After setting up Supernet manually, the following command is used to transfer funds:

./polygon-edge bridge deposit-erc20 --amounts 10000000000000000 --json-rpc $ROOTCHAIN_RPC --minter-key $DEPLOYER_KEY --receivers $DEPLOYER_ADDRESS --root-predicate 0x7260A46E8beba65962ED16AD4c9b3e9e5Afbe --root-token $ROOTCHAIN_PARENT_TOKEN --sender-key $DEPLOYER_KEY

The genesis.json file is attached for your reference.

Expected behavior

The following script is used to check the native Supernet balance:

const { ethers } = require("ethers")
const RPC = "http://127.0.0.1:9545"

async function main(){
    const provider = new ethers.providers.JsonRpcProvider(RPC)
    const balance = await provider.getBalance("0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55")
    console.log(balance)
}

main()

Expected Output: Supernets Native Balance should be non-zero

Actual Behaviour:

We get this deposit message:

[DEPOSIT ERC 20]
Sender                  = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Receivers               = 0xAE3ac03497aB6aFfF786bCFF95DD6e9095Dc5d55
Amounts                 = 10000000000000000
Inclusion Block Numbers = 42666225

But when we try to check the native Supernets balance, we get:

BigNumber { _hex: '0x00', _isBigNumber: true }

The Rootchain ERC20 Predicate Contract seems to be receiving the Rootchain Tokens: https://mumbai.polygonscan.com/tx/0x17a498cab1cecb08b04dd68b2a9b90b8fc5f2618b4cc2691a92383423e8c0d88

But the balance does not get reflected on either of the ChildERC20 / ChildPredicate / ChildMintablePredicate contracts.

@sahil3Vedi
Copy link
Author

Genesis.json:

genesis.json

@sahil3Vedi
Copy link
Author

@Stefan-Ethernal

One of our users also tried the same and this is their Rootchain ERC20 Predicate Address: https://mumbai.polygonscan.com/address/0x10FE880D752695793470B0737e1fAC22484af0b0

In their case we can see Deposit calls being made followed by StateSynced being emitted. This does not happen when I deploy the contracts: https://mumbai.polygonscan.com/address/0x0007260a46e8beba65962ed16ad4c9b3e9e5afbe

Still, the balance does not reflect on the Supernet.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant