harmony-one / ethhmy-bridge.frontend

Ethereum<>Harmony two way bridge (trusted version) - frontend part
25 stars 62 forks source link

[issue] NFT bridge tx error on ERC1155 #132

Closed LeoHChen closed 2 years ago

LeoHChen commented 2 years ago

I was trying to bridge this NFT token from Ethereum to Harmony.

https://opensea.io/assets/0x495f947276749ce646f68ac8c248420045cb7b5e/63633025683559032682995016591396109429958315377318120266884216327086337425409

The input I used are:

ERC1155 contract address: 0x495f947276749ce646f68ac8c248420045cb7b5e Token ID: 63633025683559032682995016591396109429958315377318120266884216327086337425409

And I hit the following error during the bridge process.

image

LeoHChen commented 2 years ago

Just realized the contract is an opensea 1155 contract, not sure if it is different though

https://etherscan.io/address/0x495f947276749ce646f68ac8c248420045cb7b5e

not sure if opensea's erc1155 a standard one, please dive deeper.

LeoHChen commented 2 years ago

image

potvik commented 2 years ago

this tx https://explorer.harmony.one/tx/0x271123bbe2adbc342715eb51bdd68b268879018804a87a4b2331cdf32dc9cf26 Error: TokenManager/ethToken already mapped,TokenManager/ethToken already mapped

Only for first time. -> looks like several validators try to map token in the same time. Need to check this line https://github.com/harmony-one/ethhmy-bridge.appengine/blob/master/src/services/operations/actions-pool/erc1155.ts#L26

potvik commented 2 years ago

Need to add validations like here https://github.com/harmony-one/ethhmy-bridge.appengine/blob/e23509b0903aa2a0771e68d0e1375b81ef25ce90/src/blockchain/eth/EthMethodsHRC20.ts#L62