Skip to content

Transaction to an address in string #440

Closed Answered by leonardocustodio
web3-sante asked this question in Q&A
Discussion options

You must be logged in to vote

Ah I see, I thought you wanted a signAndSend method that would get the wallet from keyring, sign and send, without having to construct the SigningPayload and Extrinsic data.

For the above, it is pretty simple:

import 'package:polkadart_example/generated/polkadot/polkadot.dart';
import 'package:ss58/ss58.dart';
import 'package:polkadart_example/generated/polkadot/types/sp_runtime/multiaddress/multi_address.dart';

final bob = Address.decode('5FHneW46xGXgs5mUiveU4sbTyGBzmstUspZC92UhjJM694ty');
final runtimeCall = api.tx.balances.transfer(dest: MultiAddress.values.id(bob.pubkey), value: BigInt.from(1000000000000));

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by leonardocustodio
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@leonardocustodio
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants
Converted from issue

This discussion was converted from issue #420 on March 13, 2024 18:40.