How to solve Element "asset_id" of struct is missing in given value #293
Replies: 2 comments
-
It seems the I haven't tested on Statemint/Statemine thoroughly yet, but what you can try is to set the extrinsic = substrate.create_signed_extrinsic(call=call, keypair=keypair, tip_asset_id=0) |
Beta Was this translation helpful? Give feedback.
-
Are you sure you have the latest version of packages Because I can remember older versions of scalecodec don't have the 'signed_extensions' support that is included in the metadata and Statemine has the I was successfully able to transfer an asset on Statemine with the following code: keypair = Keypair.create_from_mnemonic(mnemonic)
substrate = SubstrateInterface(
url="wss://statemine-rpc.polkadot.io"
)
call = substrate.compose_call(
call_module="Assets",
call_function="transfer",
call_params={'id': asset_id, 'target': account_id, 'amount': amount}
)
extrinsic = substrate.create_signed_extrinsic(call=call, keypair=keypair)
result = substrate.submit_extrinsic(extrinsic, wait_for_inclusion=True) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I want to send a rmrk transaction in statemine by substate-interface. I get the keypair and call
call_module = "Assets" call_function = 'transfer' call_params = { "id": 8, "target": target, 'amount': amount, } call = _substrate.compose_call( call_module=call_module, call_function=call_function, call_params=call_params )
use the func
_substrate.create_signed_extrinsic
to sign.but the result is
raise ValueError('Element "{}" of struct is missing in given value'.format(key)) ValueError: Element "asset_id" of struct is missing in given value
Is there any example to teleport coin by substrate-interface and estimate the fee?
Beta Was this translation helpful? Give feedback.
All reactions