polkadot-js / docs

This is the documentation portal for all Polkadot and Substrate related tools and libraries in the polkadot-js family of repos.
https://polkadot.js.org/docs/
Creative Commons Zero v1.0 Universal
165 stars 203 forks source link

Change "transfer" extrinsics to "transfer_allow_death" #478

Open laboon opened 1 month ago

laboon commented 1 month ago

As transfer is deprecated on Polkadot and Kusama, it makes sense to use transfer_allow_death (or transfer_keep_alive) instead.

An example of using "transfer" is here: https://polkadot.js.org/docs/api/start/api.tx/ but I did not search through the entire repo for other examples of it.

sibelly commented 2 weeks ago

Example:

const txHash = await api.tx.balances
  .transferKeepAlive(ADDR2, 1)
  .signAndSend(ADDR1);