Skip to main content
7 votes
Accepted

Can't get transaction hash from signAndSend of Polkadot.js

The txhash is only returned when you use the non-subscribe form. In code for the non-sub form - // don't subscribe, txhash is returned const txHash = await polkadot.tx.balances .transfer('5F1pZe........
Jaco's user avatar
  • 5,865
6 votes
Accepted

Cannot map Enum JSON, unable to find 'aUSD' in token in api.tx.currencies.transfer

Looking at the extrinsics page, the currencyId is an Enum indicating the type of transfer. So you need to pass the Token explicitly. This should do the trick - const transfer = polkadot.tx.currencies....
Jaco's user avatar
  • 5,865
5 votes
Accepted

Can I transfer the balance to the same address on Polkadot?

Yes you can, and you will pay for the fees of such a transaction. And take care of not reaping your account when doing this interaction.What can be avoided by using KeepAlive when transacting any ...
Alejandro Martínez's user avatar
4 votes
Accepted

How to send specific token (like ACA) using Polkadot.js

From what I understand from your question, if you just need to send a token between two accounts using polkadot.js you should check the corresponding Substrate runtime calls exposed by the API. In ...
Iker's user avatar
  • 1,356
4 votes
Accepted

Make token/nft transfer within smart contract

The answer to your question: Right now ink! generates a separate structure for cross-contract calls. It has the name {}Ref where {} is the name of the contract struct. To use it, you need to export ...
Green Baneling's user avatar
4 votes

How to check the status of a transaction (after sending)

There are a few things you can do: If you have the extrinsic hash of the tx and its block number, using the polkadot app, you can explore the blocks and look for your transaction and check if its in ...
andresvsm's user avatar
  • 1,114
4 votes

How to make TransferAll transaction with txwrapper?

Yes, txwrapper-core supports the construction of Balance's pallet TransferAll transactions. You can have a look to the corresponding documentation to learn how to use the transferAll method to ...
Iker's user avatar
  • 1,356
4 votes
Accepted

Using Polkadot-JS to have third party wallet pay for dot transaction fee

The signer is always the account that pays all transaction fees. Trying to sign on one and then sending on another, won't yield results. At best where the two accounts have equal nonces it will be ...
Xiu Hung's user avatar
  • 527
4 votes
Accepted

How to transfer wrapped DOT from Astar to Polkadot using XCM

To transfer DOT back to Polkadot, you can use orml-xtokens pallet in Astar:
Shaun's user avatar
  • 111
3 votes
Accepted

transfer balance subxt

The account you want to send the funds to (you need the address): let account_B: AccountId32 = the_address.parse().unwrap(); The account you want to send the funds from (you need the seed): let ...
Alex Bean's user avatar
  • 5,757
3 votes

How do i verify total token mint and total token reserved are the same after a transfer between kusama parachains?

It depends on the configuration/logic you are using for your chain. For the most common XCM configuration, the reserved balance goes to the parachain_2's sovereign account on parachain_1. For example,...
AurevoirXavier's user avatar
  • 10.7k
3 votes

How to solve the issue"Element "asset_id" of struct is missing in given value" when I send a token transaction

Are you sure you have the latest version of packages substrate-interface==1.2.2 and scalecodec==1.0.34? Because I can remember older versions of scalecodec don't have the 'signed_extensions' support ...
Arjan's user avatar
  • 151
2 votes

How can I intercept a transaction in pallet_balance?

You must create a "wrapper" pallet which will wrap the Balances pallet and expose the APIs you want with the checks you want. An idea like this was written about here: https://www....
Shawn Tabrizi's user avatar
  • 16.1k
2 votes
Accepted

why are complexity parameter or accounts seeding unnecessary for benchmarking transfers?

The logic associated with a balance transfer is constant complexity. As the number of users in your system grows, there will be an increase in complexity due to the size of the merkle trie, but this ...
Shawn Tabrizi's user avatar
  • 16.1k
2 votes
Accepted

Transfer from asset pallets with generated pallet account

How did you create this "pallet account"? Take a look at how the Treasury pallet creates its account: fn build(&self) { // Create Treasury account let account_id = <Pallet<...
Bruno's user avatar
  • 8,315
2 votes
Accepted

XCM Reserve Asset Transfer from Rococo succeed but do not appear on Parachain

The transfer returns no errors but the funds do not appear on the account on the parachain but goes to the SovereignAccount. It's right. Reserve transfer works like this. On Rococo: Transfer ROC to ...
Guantong's user avatar
  • 1,848
1 vote

How to manage multiple balances for one account?

There exists pallet-assets to manage an arbitrary number of different distinct assets. Alternatively there also is pallet-nfts for non-fungible assets. Assets are addressed via an ID which makes it ...
Oliver Tale-Yazdi's user avatar
1 vote

List all balance changes of an account on a Substrate-based chain

There are more ways for balance in-/outflow to an account than balance being transferred (e.g. minted balance, burned balance). In addition, it can also be named differently (e.g. withdraw + deposit). ...
Daan van der Plas's user avatar
1 vote

XCM Transfer | How to get account addresses of rococo, mangata?

The destination account is the account in the destination parachain you want to send the transfer to. If you go to examples/rococo in that folder you can see where this values are used. Let's take ...
Alex Bean's user avatar
  • 5,757
1 vote
Accepted

can we do batch/multiple transfer in once?

Have a look at pallet-utility's extrinsics!
Daan van der Plas's user avatar
1 vote

transfer balance subxt

Base on that example. Replace the dest with: array_bytes::hex2array::<_, 32>(your `b` account's public key here).unwrap().into() And replace the from with: use sp_core::{sr25519::Pair, Pair as ...
AurevoirXavier's user avatar
  • 10.7k
1 vote

What's the difference between calling T::Currency::transfer() and T::Currency::withdraw()

A great resource for this is to just look at the definitions of transfer and withdraw for the Currency trait inside of the Substrate repo. Transfer: /// Transfer some liquid free balance to ...
Valentin Fernandez's user avatar
1 vote

How to use ClaimAssets after assets got trapped

As you have correctly noted, assuming the assets parameter matches exactly what was being trapped, it is indeed a problem with the origin. I do not know what kind of operation that led to the assets ...
Keith Yeung's user avatar
  • 2,121
1 vote
Accepted

Fund a pallet AccountID

Why do you want to keep it alive? If it is unnecessary, why just let it die? Usually, I follow the Substrate's spec. Bounty account example: https://github.com/paritytech/substrate/blob/...
AurevoirXavier's user avatar
  • 10.7k
1 vote

Get Block hash from transfer in polkadot.js/api

To get the blockHash where it has been included your transaction, you can send it and then wait until it has been included in the block using a subscription. const unsub = await api.tx.balances....
Alex Bean's user avatar
  • 5,757
1 vote
Accepted

Collect some transfer fees before any transaction

All of the logic around the transaction fee pallet is wrapped into the trait OnChargeTransaction: https://paritytech.github.io/substrate/master/pallet_transaction_payment/trait.OnChargeTransaction....
Shawn Tabrizi's user avatar
  • 16.1k
1 vote
Accepted

T::Currency::transfer does not work correctly

If you expected your balance to be 900 after purchasing the NFT, you need to ensure that you are actually setting the NFT value to 100 KIT units. To give you an example of what I mean, Polkadot token ...
andresvsm's user avatar
  • 1,114
1 vote
Accepted

How can you transfer balances from one accountId to another in substrate runtime?

This is now solved. The solution is as follows: Add the following code in your pub trait Config: frame_system::Config type Currency: Currency<Self::AccountId>; Set the value of the config ...
hgminerva's user avatar
  • 467
1 vote

Looking for help to express an xcm destination oftype VersionedMultiLocation

I figured out how to express the above call: use crate::metadata::runtime_types::xcm::{ v1::junction::Junction, v0::junction::NetworkId, v1::multilocation::Junctions::X1, v1::...
user1875433's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible