I am trying to initiate a balance transfer call
using a proxy with the 'Any
' type. I'm using the Python API
, which allows me to create and submit the transaction successfully. However, it fails (https://westend.subscan.io/extrinsic/17455468-2). I am able to create the transaction using a wallet for the wallets.
# Compose the transfer call using the balances module
transfer_call = substrate.compose_call(
call_module='Balances',
call_function='transfer',
call_params={
'dest': recipient_address,
'value': transfer_amount,
},
)
# Compose the proxy call to execute the transfer via the proxy
proxy_call = substrate.compose_call(
call_module='Proxy',
call_function='proxy',
call_params={
'real': proxy_account,
'call': transfer_call,
},
)
nonce = substrate.get_account_nonce(keypair.ss58_address)
signature_payload = substrate.generate_signature_payload(call=call, nonce=nonce)
signature = keypair.sign(signature_payload)
extrinsic = substrate.create_signed_extrinsic(
call=call, keypair=keypair, signature=signature
)
print(extrinsic)
result = substrate.submit_extrinsic(extrinsic=extrinsic, wait_for_finalization=False)
Also, the transaction is listed under the 'Extrinsics' tab in the explorer, rather than the 'Transfers' tab. Any advice on this would be greatly appreciated.
Thank you