1

I want to teleport the ksm in kusama to ksm in statemine. I use the code

call = _substrate.compose_call(
        call_module='XcmPallet',
        call_function='limited_teleport_assets',
        call_params={
            'dest':
                {"V1": {
                    "parents": 0,
                    "interior": {"X1": {"Parachain": 1000}}
                }},
            "beneficiary":
                {"V1": {
                    "parents": 0,
                    "interior":
                        {"X1": {
                            "AccountId32": {"network": "Any",
                                            "id": target}}}}},
            "assets": {"V1": [
                                {"id": {"Concrete": {"parents": 0,
                                                     "interior": "Here"
                                                     }}},
                                {"fun": {"Fungible": amount}}
                            ]},
            "fee_asset_item": 0,
            "weight_limit": "Unlimited",
        }
    )

but the error is {"code": -32000, "message": "Server error", "data": "ValueError: Element count of value (1) doesn\'t match type_definition (2)"}

5
  • It help a little. But the error still is "ValueError: Element count of value (1) doesn't match type_definition (2)"
    – Jack
    Mar 8, 2022 at 6:54
  • The idea is to first query the endpoint and check out the data formats. Did you use what the answer suggested to query? Mar 8, 2022 at 7:39
  • "substrate.get_metadata_call_function("XcmPallet","LimitedTeleportAssets")" and "substrate.get_metadata_storage_function("XcmPallet","LimitedTeleportAssets")" return None. None object cant' get the format
    – Jack
    Mar 8, 2022 at 8:31
  • Maybe because limited_teleport_assets is a call function and it's named as such? kusama.subscan.io/runtime/XcmPallet?version=9170 Mar 8, 2022 at 8:51
  • I have tried it so many conbinations.But they return None
    – Jack
    Mar 9, 2022 at 2:13

0