avalanche-types-rs
avalanche-types-rs copied to clipboard
Cannot import AVAX to the P-Chain
I am trying to import AVAX from the X-Chain to the P-Chain. The export
step works on the X-Chain works fine but when trying to import the AVAX to the P-Chain, I end up with the following error:
failed API (message: \"failed to issue import transaction ResponseError { code: -32000, message: \\\"couldn't issue tx: inputs not sorted and unique\\\", data: None }\", retryable: false)
See: https://github.com/AshAvalanche/ash-rs/actions/runs/5059549086/jobs/9081242132#step:9:500
Here is the code: ash_sdk::avalanche::txs::p
I came across this comment in wallet::p::import
:
https://github.com/ava-labs/avalanche-types-rs/blob/b87a179ea83e5ae944ada61ffb588e9e19d4d0e5/src/wallet/p/import.rs#L96-L99
Do you have any idea if my error is linked to this? If yes how could we solve this? Thanks!
Yes, currently the P-chain export/import is not implemented. Would be awesome if we can get some help here!
Thanks for the answer. Not sure I can help here because it implies a deep knowledge of the transaction's internals...