Francisco Aguirre

@n9QBuDYOQXG-nWCBrwx8YQ

Joined on Jun 14, 2023

  • TODO: Add scenarios? I'm diving this into three parts: Tokens, Queries and Fees. Tokens In order to operate with ERC20 tokens, a user needs to call specific functions in its origin smart contract, for example, for transferring it. In XCM, assets are operated upon by means of the TransactAsset trait. In order for XCM to recognize we are dealing with an ERC20, we would need to create an asset transactor to handle them. This asset transactor has to match ERC20s based on their id. A possible one is the following: [PalletInstance(<pallet-revive index>), AccountKey20 { id }] where id is the contract's address.
     Like  Bookmark
  • This guide assumes you're a parachain builder whose parachain has its own token for fee payment and will show you how to integrate DOT into your parachain so that it can also be used for fee payment. We'll call the relay chain token DOT in this guide, even though it might be KSM/PAS/WND depending on the network your parachain is running on. We'll also call the native token of your parachain PARA. Like everything, in order to integrate DOT as a fee token on your parachain, there is an off-chain and an on-chain aspect. Off-chain The star of the show is a transaction extension called ChargeAssetTxPayment. This extension allows fees to be paid in any supported asset.
     Like  Bookmark
  • You need to: 0) Run chopsticks with the relay chain and the parachain you want Create an extrinsic on the parachain you want that's system::authorizeUpgrade(hash) with the hash of the new wasm. You can hash the file in the PJS Apps UI if needed Create an extrinsic on the relay that's xcmPallet::send() that sends the following message to the parachain you want to upgrade: [UnpaidExecution, Transact(Superuser, enough_weight, call)] with the previous call Note the preimage in the relay chain. Call preimage::note_preimage(previous call) Use the following PJS script to make the scheduler dispatch that preimage: import { ApiPromise, WsProvider } from '@polkadot/api';
     Like  Bookmark
  • Who is this for? Parachain developers, on Kusama or Polkadot, whose reserve for DOT is the Relay Chain. What is this about? For the upcoming Asset Hub Migration we need the reserve location of DOT in parachains to change from the Relay Chain to Asset Hub. Each parachain decides who to trust as a reserve for which asset. Initially, the Relay Chain was the only possible reserve for DOT. For a while now, both the Relay Chain and Asset Hub can be used as reserves. Some parachains in the ecosystem have already made the switch to Asset Hub as the reserve for DOT, such as:
     Like  Bookmark
  • It's long been a problem to estimate execution fees for XCM. This became even more of a problem once delivery fees were introduced. In order to fix this issue, two new runtime APIs were introduced to existing runtimes and are simple to integrate into any runtime that wants this functionality. XcmPaymentApi, originally introduced in PolkadotSDK#3607. DryRunApi, originally introduced in PolkadotSDK#3872. The XcmPaymentApi allows users to query the execution and delivery fees required by XCMs. Using the APIs
     Like 1 Bookmark
  • Learning materials PBA XCM module: https://polkadot-blockchain-academy.github.io/pba-content/current/ Polkadot wiki XCM docs: https://wiki.polkadot.network/docs/learn/xcm XCM rust docs: https://paritytech.github.io/polkadot-sdk/master/xcm_docs/ Onboarding First, download a wallet and create an accountSubWallet Talisman Then, get some WND from the faucet
     Like  Bookmark