coreth
coreth copied to clipboard
Question for C Chain Atomic transactions
for Atomic transactions , I have following questions
- how does assetID in evm Input/Output, (for non AVAX assets) map to ERC20/ERC721 contract address?
- is it possible to move these assets (ERC20/721) in/out of C Chain using Atomic Transactions
it does feel that only AVAX can be imported / exported out of chain. As for ERC20/721 created within C-Chain, it would require modification to evm update contract state in a standard erc20/erc721 contract.
The assetID is the hash of the transaction that created the asset on the X-Chain.
Import/export transactions currently only support AVAX.
ERC-20/ERC-721 tokens do not have an equivalent Avalanche Native Token representation, so they cannot be moved to the rest of the Primary Network.
The requirement to move assets across the Primary Network is not to update contract state, but to communicate via Shared Memory: https://github.com/ava-labs/avalanchego/blob/master/chains/atomic/README.md.
The current plan to support this by adding a shared memory precompile, which will require a contract to explicitly call the precompile to import/export an asset defined by a contract.
yeah. makes sense. This requires special logic to exists in such ERC20/ERC721 to leverage precompile addresses.
Just wanted to confirm that. Thanks. I will close this.
Re-opening until we update the documentation for import/export transactions, since I see this is not sufficiently clear here https://docs.avax.network/reference/avalanchego/c-chain/txn-format#gantt-evm-input-specification