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

Question for C Chain Atomic transactions #343

Open
panghalamit opened this issue Sep 21, 2023 · 4 comments
Open

Question for C Chain Atomic transactions #343

panghalamit opened this issue Sep 21, 2023 · 4 comments
Milestone

Comments

@panghalamit
Copy link

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.

@github-project-automation github-project-automation bot moved this to Backlog 🗄 in EVM Sep 21, 2023
@aaronbuchwald
Copy link
Collaborator

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.

@panghalamit
Copy link
Author

yeah. makes sense. This requires special logic to exists in such ERC20/ERC721 to leverage precompile addresses.

@panghalamit
Copy link
Author

Just wanted to confirm that. Thanks.
I will close this.

@github-project-automation github-project-automation bot moved this from Backlog 🗄 to Done ✅ in EVM Sep 21, 2023
@aaronbuchwald
Copy link
Collaborator

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

@aaronbuchwald aaronbuchwald reopened this Sep 21, 2023
@ceyonur ceyonur added this to the v0.12.11 milestone Jan 8, 2024
darioush pushed a commit that referenced this issue Apr 25, 2024
* fix trie metrics

* add new prefetcher metrics

* use flush item pointer

* add warn if anything unexpected found in cache

* simplify trieproc tracking

* make DEBUG

* nits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Status: Done
Development

No branches or pull requests

3 participants