Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Last active May 11, 2021 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyasugano/a82967ad1e4bf6200e425dab4dff092d to your computer and use it in GitHub Desktop.
Save yuyasugano/a82967ad1e4bf6200e425dab4dff092d to your computer and use it in GitHub Desktop.
export AVAX from X-Chain for P-Chain
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"avm.exportAVAX",
"params" :{
"to":"P-fuji1s3056zrcm36y0pzx5d3g9p5quavvpxk2yhssvp",
"amount": 1000000000,
"from":["X-fuji14gnzvppj3ydjdkt49jdgrn67ha4fysk26jwm5g"],
"username":"testuser_jp01",
"password":"<your user password>"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X
{"jsonrpc":"2.0","result":{"txID":"G42p21VEhtAXcZHHsnJnZcgKs8B8MmX4HibSMdpR455RtVaMB","changeAddr":"X-fuji14gnzvppj3ydjdkt49jdgrn67ha4fysk26jwm5g"},"id":1}
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :2,
"method" :"avm.exportAVAX",
"params" :{
"to":"P-fuji16ng9sc5vyy99twvza8fg3xdl0262ryfsmcxcwp",
"amount": 1000000000,
"from":["X-fuji14gnzvppj3ydjdkt49jdgrn67ha4fysk26jwm5g"],
"username":"testuser_jp01",
"password":"<your user password>"
}
}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/X
{"jsonrpc":"2.0","result":{"txID":"MHCFczPY3yiu55PoP1sSJqe3y47fET53J71dnkQMMo2rvtebP","changeAddr":"X-fuji14gnzvppj3ydjdkt49jdgrn67ha4fysk26jwm5g"},"id":2}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment