i have not found the examples to teleport between statemint and polkadot. is ther any one can give some examples in javascript.what i use is
@polkadot/api
this is my code:
i have found the teleport function.but there is some error
async function teleport() {
let api = await getConn();
let fromAddr = ADDR_1;
let mnemonic = MNEMONIC_1;
let toAddr=ADDR_2;
let amount = new BigNumber(5).multipliedBy(westendDecimal).toString(10);
let tx = api.tx.polkadotXcm.limitedTeleportAssets(toAddr,toAddr,amount,0,100000);
await sendTransaction(mnemonic,fromAddr,tx);
}
but it execute error:
xecute error: Error: createType(Call):: Call: failed decoding polkadotXcm.limitedTeleportAssets:: Struct: failed on args: {"dest":"{\"_enum\":{\"V0\":\"XcmV0MultiLocation\",\"V1\":\"XcmV1MultiLocation\"}}","beneficiary":"{\"_enum\":{\"V0\":\"XcmV0MultiLocation\",\"V1\":\"XcmV1MultiLocation\"}}","assets":"{\"_enum\":{\"V0\":\"Vec<XcmV0MultiAsset>\",\"V1\":\"XcmV1MultiassetMultiAssets\"}}","fee_asset_item":"u32","weight_limit":"{\"_enum\":{\"Unlimited\":\"Null\",\"Limited\":\"Compact<u64>\"}}"}:: Struct: failed on dest: {"_enum":{"V0":"XcmV0MultiLocation","V1":"XcmV1MultiLocation"}}:: Cannot map Enum JSON, unable to find '5EWFCfvUqSkUVbsPSJNAkfGVqVTVwfc1c5XAg3qomDUR5eiR' in v0, v1