-
Notifications
You must be signed in to change notification settings - Fork 60
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
Unable to get bridged eth and ERC20 tokens on child chain #210
Comments
Hey @leovct I think this is related to smart contract methods reverting On a side note you can get the state-sync data with the |
Thanks for the pointers. Unfortunately, I'm also able to reproduce the issue using the contracts team script. I'll check with them then. Bridge ERC20 tokens using $ npm run truffle exec scripts/deposit.js -- network development 0x2DDAB92De80d1D9D7e89fA49429F88d47d7222Bc 10
> [email protected] truffle
> truffle
Using network 'development'.
Contract addresses: {
root: {
Registry: '0xB39aA4E9646Fd9C50ee8C871Fe345569C4D5D04A',
RootChain: '0x67D07acbA0389ECF514eF8B43dFE4D8f6dDBB5d2',
GovernanceProxy: '0x0e63099e1420C7a3BF8C226730eEDc6C2d1A1704',
RootChainProxy: '0xBa1F4D93D62c24dAE67c33F9Cd1bECaa2d46dD5B',
DepositManager: '0x5Bc2B859D594e136A0552e7BDF2dF3867424Cce7',
DepositManagerProxy: '0x4A356C9CAeDfefE43c144419487e06c04296bf69',
WithdrawManager: '0x765fd35DBbDff1dd36e422C76Fa37a6F55A4687d',
WithdrawManagerProxy: '0x50415F3215599Bd6B92bA68cea61b46A15022F59',
StakeManager: '0x09F8d80E3d162CD8CBbD494633b9D3eD75bDF36e',
StakeManagerProxy: '0x9Db18c0C0384c2986F70e8B109a564129599Ce23',
SlashingManager: '0xF67b5A1A85b4e50F594d450dB2a2f2FCfD24DEF0',
StakingInfo: '0xcC589091De6aE35b53dF660A347c3887E6C94461',
ExitNFT: '0x29A4a587c0642B1234b2918Fb37Ca06270D1a1CF',
StateSender: '0xF88d3899fD32f0531E100d258160738145379E14',
predicates: {
ERC20Predicate: '0x25405947a3bD2BD7767C2Cf8124F315883fD7111',
ERC721Predicate: '0xBe710e1C3F7F4c7E295A4686d1d6478512238EA4',
MarketplacePredicate: '0xe3c38Ab717c4e489C602196Cc2902F7AfeD3765D',
TransferWithSigPredicate: '0x497506B0Be50dcD034b03D6565fc0A39EC513092'
},
tokens: {
MaticToken: '0x4b7FF52bbe91CF6A743D428D84F38162ea3a1310',
MaticWeth: '0xc888E865D9067E2c44672Fa50bE2B77a781528EC',
TestToken: '0x2DDAB92De80d1D9D7e89fA49429F88d47d7222Bc',
RootERC721: '0xe80F298C455A5aD3EbB8B6ab602A336a43C958A7'
}
},
child: {
ChildChain: '0x680C2C3f42213FA92868b80E0aCb6430850186CE',
tokens: {
MaticWeth: '0xd30123F2B51a9C043755cAF07a833124933B1edb',
MaticToken: '0x0000000000000000000000000000000000001010',
TestToken: '0xe249c8135a138fF48C8b79Ef7ABe8c0C902cC298',
RootERC721: '0x43e5D5380B8D5FA8aA1fe67D0C3F33D5B0FcE26b'
}
}
}
[
'/home/ubuntu/.nvm/versions/node/v16.17.1/bin/node',
'/home/ubuntu/matic-cli/devnet/code/contracts/node_modules/.bin/truffle',
'exec',
'scripts/deposit.js',
'network',
'development',
'0x2DDAB92De80d1D9D7e89fA49429F88d47d7222Bc',
'10'
]
Current configured address to make transactions: 0x2Bd3C50030325a0587f6c9AE3d3Aa5C2b14b72E6
Deposit ERC20:
Token: 0x2DDAB92De80d1D9D7e89fA49429F88d47d7222Bc
Amount: 10
Balance for current address: 9999999999999999999999999960
Approved tokens transfer with tx: 0x2454c25c8abc24ae99fd40517488e4f4dad65690019121db9c51cdd69152e614
Deposit tokens with tx: 0x7f27f24e60f04bb5cf34bcff40dd98526f1a24c68edd16c6187ba3c0e65f1724 State sync event happening $ cast call --rpc-url http://localhost:9545 0xF88d3899fD32f0531E100d258160738145379E14 "counter()(uint256)"
5 Extract of bor logs failing when processing state sync data. INFO [11-14|10:13:03.003] Fetching state sync events queryParams="from-id=5&to-time=1699956655&limit=50"
INFO [11-14|10:13:03.012] "→ committing new state" eventRecord=5
ERROR[11-14|10:13:03.013] message execution failed on contract msgData=0xf28a80
INFO [11-14|10:13:03.013] "→ committed new state" eventRecord="id 5, contract 0x680C2C3f42213FA92868b80E0aCb6430850186CE, data: 0x0000000000000000000000002bd3c50030325a0587f6c9ae3d3aa5c2b14b72e60000000000000000000000002ddab92de80d1d9d7e89fa49429f88d47d7222bc000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000001535b1, txHash: 0x7f27f24e60f04bb5cf34bcff40dd98526f1a24c68edd16c6187ba3c0e65f1724, logIndex: 2, chainId: 15005, time 2023-11-14T10:10:52Z, gasUsed 54204"
INFO [11-14|10:13:03.013] StateSyncData gas=54204 number=35584 lastStateID=5 "total records"=1 "fetch time"=8 "process time"=1
INFO [11-14|10:13:03.015] "→ committing new state" eventRecord=5
INFO [11-14|10:13:03.016] Imported new chain segment number=35584 hash=03d89f..00cf92 blocks=1 txs=0 mgas=0.000 elapsed=13.457ms mgasps=0.000 dirty=34.55KiB
ERROR[11-14|10:13:03.020] message execution failed on contract msgData=0xf28a80
INFO [11-14|10:13:03.020] "→ committed new state" eventRecord="id 5, contract 0x680C2C3f42213FA92868b80E0aCb6430850186CE, data: 0x0000000000000000000000002bd3c50030325a0587f6c9ae3d3aa5c2b14b72e60000000000000000000000002ddab92de80d1d9d7e89fa49429f88d47d7222bc000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000001535b1, txHash: 0x7f27f24e60f04bb5cf34bcff40dd98526f1a24c68edd16c6187ba3c0e65f1724, logIndex: 2, chainId: 15005, time 2023-11-14T10:10:52Z, gasUsed 54204"
INFO [11-14|10:13:03.020] StateSyncData gas=54204 number=35584 lastStateID=5 "total records"=1 "fetch time"=12 "process time"=5 |
Ok thanks @leovct and please keep me posted on the outcome. |
@marcello33 I sent a PR to update the |
That's great, thanks @leovct for taking this up. |
Description
Hi, I'm currently playing with the docker PoS setup and I'm trying to bridge ERC20 tokens but I'm running into an issue that I have no idea how to solve.
Here are the steps to reproduce my problem. Hopefully, you'll see the thing that's missing! 🙏
DepositManagerProxy
to useTestToken
on behalf ofnode0
.TestToken
from root chain to child chain usingnode0
private key.Commands
Get contract addresses.
Get
node0
address and private key.Get
node0
balance ofTestToken
.Approve the
DepositManagerProxy
to useTestToken
on behalf ofnode0
.Bridge
TestToken
from root chain to child chain usingnode0
private key.Same thing when trying to bridge native eth.
Get number of state syncs.
$ cast call --rpc-url http://localhost:9545 0xF88d3899fD32f0531E100d258160738145379E14 "counter()(uint256)" 2
Extract of bor logs.
The text was updated successfully, but these errors were encountered: