Skip to main content

Questions tagged [assets]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
40 views

How to access functions of pallet-assets from custom pallet?

I want to use the functions of pallet-asset like decrease_balance and Assets storage in our custom pallet. How I can perform this operation? Thanks
Vitthal agarwal's user avatar
1 vote
1 answer
20 views

How to integrate pallet-asset?

I want to integrate pallet-asset into the substrate-node-template. What all other pallets need to integrate with pallet-asset to get assets functionalities? Thanks
Vitthal agarwal's user avatar
0 votes
0 answers
27 views

Pallet staking using assets pallet?

I'm trying to make pallet staking works with assets pallet. Lockable trait has already been implemented in a customized version of assets pallet but main issue remaining is that staking pallet issue ...
Xavier's user avatar
  • 415
0 votes
0 answers
24 views

How to give a polkadot referendum Track the authority to mint an Asset on asset hub?

The goal is to give a polkadot referendum Track the authority to mint an Asset on asset hub. We want to avoid Root referendum because that requires 100,000 DOT decision deposit. We would like to ...
Ramsey - Decentration's user avatar
1 vote
0 answers
28 views

TXs in pendingExtrinsics() not always being picked up and then added in the block

When adding many batchAll TXs containing mint() and freeze() assets to AssetHub Rococo chain, there are times when TXs in rpc -> author -> pendingExtrinsics() just sit there and don't get ...
Ramsey - Decentration's user avatar
1 vote
1 answer
49 views

AssetHub interaction with AccountId20

Say I want to send and receive tokens from AssetHub in my chain that is using AccountId20 format to interact with internal pallets. I understand that Rococo uses AccountId32 so how would I go about ...
Valentin Fernandez's user avatar
0 votes
1 answer
35 views

How to stake asset instead of currency?

I would like to customize POS by staking the asset balance instead of currency balance. After switching the consensus from PoA to PoS by changing AURA to BABE, I need to change the configuration of ...
MinhK's user avatar
  • 125
0 votes
0 answers
19 views

Error UnknownAsset when trying to increase AssetBalance

The error is shown in substrate-frontend Transaction Failed! system.ExtrinsicFailed::{"token":"UnknownAsset"} Score is an asset in pallet_template, in build function of ...
MinhK's user avatar
  • 125
1 vote
0 answers
37 views

How to implement multi-currency staking?

I was wondering what would be the best way to achieve multi-currency staking given: It's on a solo chain Foreign assets are bridged (like Eth or BTC, pallet-asset can be used) No conversion from ...
Leouarz's user avatar
  • 353
1 vote
1 answer
60 views

How to create wrapped DOT asset on local setup

Local setup: Zombienet running Shiden and Relay Chain. What are the exact steps needed to create an asset which represents DOT on Shiden (wrapped DOT). More specifically, I am trying to create the ...
Snowmead's user avatar
  • 625
3 votes
1 answer
131 views

How to transfer wrapped DOT from Astar to Polkadot using XCM

How do you tranfer wrapped DOT (AssetId: 340,282,366,920,938,463,463,374,607,431,768,211,455) on Astar/Shiden to Polkadot/Kusama using XCM? Following this guide from Astar XCM documentation, this ...
Snowmead's user avatar
  • 625
1 vote
1 answer
71 views

Two different Assets Pallet instance for pallet_asset_conversion Pallet

While reviewing the substrate runtime code, I noticed that the pallet_asset_conversion Pallet references two distinct instances for the Assets Pallet within its Runtime Config: impl ...
ZKT's user avatar
  • 113
2 votes
1 answer
112 views

Are users only allowed to own 16 assets with pallet-assets?

Every new token a user holds in pallet_assets increases the consumer count for that user +1. And most chains set the MaxConsumers of frame_system to 16. Both mint_into and transfer call at some point ...
Juan Ignacio Rios's user avatar
2 votes
1 answer
34 views

Pallate for Native Blockchain Currency

In my Blockchain app, I want to add my own native currency. For extended Features of my application Users will be rewarded and they will receive coin for that. The users will receive the reward in ...
Ariful Islam's user avatar
1 vote
1 answer
88 views

Specify asset to pay fees in a transfer - Subxt

I am doing a transfer in AssetHub and I want to use another asset to pay fees. I have seen an example in JavaScript where it needs to specify the assetId in the signAndSend function: await api.tx....
Alex Bean's user avatar
  • 5,722
0 votes
1 answer
39 views

AssetConversionApi (asset_conversion_pallet) - How to encode function input parameters in price and reserves RPC calls?

I'm trying to use asset_conversion pallet to call quote prices, and get reserved rpc endpoints (defined here) In pallets official docs there is small section about calling that endpoint, but it doesn'...
Kaliman's user avatar
2 votes
2 answers
204 views

FailedToTransactAsset error while sending assets from local Statemint(AssetHub) to other Parachain

I'm facing the FailedToTransactAsset error while trying to send assets from Statemint to another parachain. So basically I have the following configuration: Relay chain Polkadot relay chain running ...
Oleg Kalenik's user avatar
2 votes
2 answers
88 views

XcmError "UntrustedReservedLocation" & "TooExpensive" while transfer assets between two parachains (limitedReservedTransferAssets)

I'm trying to integrate stablecoin into parachain. First of all, I tried to repeat the steps shown in the video (https://www.youtube.com/watch?v=UfxU3hUprKo&t=1182s) with standard settings: ...
Artem Levchuk's user avatar
1 vote
1 answer
46 views

How to get and modify cross-chain asset in contract?

I am preparing to create a smart-contract on Astar using ink! programming language. The contract's main logic involves modifying the cross-chain asset USDT on the statemint chain. After going through ...
jeffery xu's user avatar
0 votes
1 answer
18 views

Is there a way to set a maximum balance for the assets registered in pallet-assets?

We want to register USDT on our parachain to receive USDT transfered from Statemint, but we need to set a limit to avoid receive too much USDT. Is there a way to do this?
Guantong's user avatar
  • 1,848
3 votes
0 answers
92 views

How does XCM remote locking work?

Hey valuable Substrate masterminds, I wonder how to use this new XCMv3 remote lock feature on a parachain. Consider these references: remote locking tests Asset lock trait Remote locking PR by Gavin ...
Chralt's user avatar
  • 543
7 votes
2 answers
284 views

orml-tokens vs pallet-assets

Why should I choose one over the other? I see a lot of parachains using orml-tokens, and also x-tokens. Is using orml-tokens required to use all the other orml features like x-tokens? When should I ...
Juan Ignacio Rios's user avatar
5 votes
0 answers
33 views

eip-681 equivalent for Polkadot to generate qrcodes

I'm developing an app and there I have the possibility to generate qrcodes to ask for payments in multiple blockchains using multiple tokens. For EVM blockchains I do have the eip681 to guide me (...
Valhalla Hero's user avatar
1 vote
0 answers
102 views

how i can pay transaction fees through custom token

i am currently using substrate full node . and i have created non native custom tokens through assets like of name KAR . when i transfer these custom tokens i.e KAR from one account to another the ...
Karanvir Singh's user avatar
1 vote
1 answer
276 views

how to pay transaction fee through custom token?

i am working on substrate i have created a custom token using pallet_assets,how can i configure the transaction_fee using the custom token i have seen the pallet_assets_transaction payment which say'...
Amit Kumar Yadav's user avatar
1 vote
2 answers
124 views

Token(CannotCreate) error on transferring asset to PalletId account

I'm new to Substrate and I'm creating a pallet in which the user can create contests by depositing a certain amount of assets. My idea is to send that amount to the PalletId account, but I'm having an ...
Pablo Lopes's user avatar
2 votes
1 answer
79 views

How to reduce spam risk if tx fees are paid with exotic assets instead of native tokens and tx fee overpayment refunds are in native tokens?

This pull request appears to expose arbitrage and spam opportunities, as it proposes to modify the Substrate frame DEX pallet to allow users to use an exotic asset for transaction fees instead of the ...
Luke Schoen's user avatar
  • 2,332
-1 votes
1 answer
71 views

What is the purpose of CreateOrigin in assets pallet?

In this PR: https://github.com/paritytech/substrate/pull/12586, the reasoning given is : Required for bridges and accepting other asset classes over XCM. Can someone explain in more detail what this ...
b0zero's user avatar
  • 533
1 vote
1 answer
53 views

How do I create an Asset account using polkadot JS with a reason other than Consumer?

So there are 4 reasons listed on ExistenceReason for an Asset account namely: Consumer, Sufficient, DepositHeld, DepositRefunded Usually minting an asset would use the Consumer reason. I'd like to ...
b0zero's user avatar
  • 533
1 vote
1 answer
68 views

Create child account that relies on a parent account to maintain its existential deposit to stay alive and to pay all its fees

Is it possible to generate a child account where: The child account transaction fees are deducted from a parent account The child account is kept alive with its existential deposit (ED) provided in a ...
Mohamad Al Zohbie's user avatar
2 votes
1 answer
71 views

What is AssetAccountDeposit in pallet assets config?

/// The amount of funds that must be reserved for a non-provider asset account to be maintained. #[pallet::constant] type AssetAccountDeposit: Get<DepositBalanceOf<Self, I>>; I do not ...
b0zero's user avatar
  • 533
2 votes
1 answer
140 views

Transfer from asset pallets with generated pallet account

I want to create a pallet account and then store assets using pallet assets in it, but I have a problem withdrawing assets from the pallet account because you can't transfer from pallet assets unless ...
Mohamad Al Zohbie's user avatar
2 votes
2 answers
165 views

List of assets on Statemint

How do I get the list of all the assets that are present and their supply in Statemint? Ideally either with Polkadot-JS api or py-substrate-interface.
Pranay's user avatar
  • 141
2 votes
1 answer
117 views

How to get `RuntimeOrigin::root()`'s account id?

I want to set the root account as the asset's owner in pallet-assets's genesis config. How to get RuntimeOrigin::root()'s account id? Or is there any other way to achieve this?
AurevoirXavier's user avatar
  • 10.4k
3 votes
3 answers
196 views

"Account cannot be created" when trying to transfer statemine token to sibling parachain

Ran into an issue transferring a statemine token (ex: USDt) on a local testnet with rococo-local and statemine-local. I'm trying to transfer USDt to a sibling parachain, but it fails on the statemine ...
insipx's user avatar
  • 373
1 vote
1 answer
43 views

Assets pallet token and democracy pallet

Is it possible to use a custom_token created with the assets_pallet in the democracy_pallet instead of the native_token? EXPLANATION When voting during a referendum, I would like the balance parameter ...
Kazunobu Ndong's user avatar
3 votes
2 answers
138 views

What does #[pallet::compact] do?

What does #[pallet::compact] do?
Nikita Chernega's user avatar
1 vote
1 answer
57 views

How to increment / work with AssetId

I struggle understanding conversion. I found a lot of questions here and online that state that converting between substrate primitives and rust primitives can easily be handled with into() calls or ...
shredding's user avatar
  • 314
1 vote
1 answer
51 views

Cannot compile pallet_assets [duplicate]

I receive: Compiling pallet-assets v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.30#a3ed0119) error: cannot find macro `vec` in this scope --> /Users/chp/.cargo/...
shredding's user avatar
  • 314
1 vote
0 answers
36 views

Failing to distribute fungible tokens with a virtual account

We are unable to get the asset-pallet to mint according to shareInfo that is being passed along from contributions and is passed along as percentage calculation. The from is a virtual account, that ...
Ilhan's user avatar
  • 53
2 votes
1 answer
143 views

Invalid Incoming XCMP message data

Link to repo I'm trying to do a reserve-backed transfer from statemint to my own parachain of a token minted with the pallet_assets. I've been using the xcm-emulator that lets me plug in my own ...
Juan Ignacio Rios's user avatar
3 votes
0 answers
68 views

Updating AssetId when using pallet_assets

I am trying to use the pallet_asset, but the AssetId type is giving me some trouble. Try nbr.1: Create a storage value TokenId that takes a u32 Create the AssetId from the u32 inside the storage: ...
Kazunobu Ndong's user avatar
5 votes
2 answers
211 views

<T::Lookup as StaticLookup>::Source vs T::AccountId?

I noticed https://github.com/paritytech/substrate/issues/6042 was recently resolved, replacing T::AccountId with <T::Lookup as StaticLookup>::Source. Substrate docs don't mention what is the ...
nazar-pc's user avatar
  • 551
3 votes
3 answers
139 views

How to create and mint assets in benchmarks

I am building a pallet which uses assets in a loosely-coupled manner. In the pallet's Config, there's an associated type Assets with Inspect and Transfer bounds. Now, when writing benchmarks, I need ...
Adam Wierzbicki's user avatar
5 votes
4 answers
273 views

panic!() and assert!() in runtime

Is there a way, apart from manual code review, to guarantee assert!() and panic!() calls intended for test code not accidentally gets built for the chain runtime.
Simson's user avatar
  • 1,211
0 votes
1 answer
99 views

How can I see the assets deployed on Statemint/Statemine with all their related information on Polkadot.js UI?

How can I see the assets deployed on Statemint or Statemine parachains and read all their parameters and metadata? I would like to do that directly on Polkadot.js UI, is that possible?
Iker's user avatar
  • 1,356
6 votes
2 answers
634 views

How to pay transaction fees using the custom token created by using pallet_assets?

At the moment the transaction fee is payed as the native token in the substrate node template. When I create a new asset_id(say BAT) a fungible asset using pallet_assets, How can I now pay the ...
rusty loaki's user avatar
3 votes
1 answer
263 views

How to make a stable coin on substrate?

I want to make a stable coin on substrate based chain, what I want to know is that can I do it with the assets pallet, as I can't find any function that peg it with any other collateral, if it is ...
Shubham Gupta's user avatar
3 votes
1 answer
175 views

Convert from asset balance to currency balance?

Context: I'm creating a pallet with a simple DEX (decentralised exchange) functionality. I need to perform some arithmetic operations on balances for liquidity pools. Problem: How can I convert from ...
Adam Wierzbicki's user avatar
2 votes
1 answer
61 views

Transfers from asset_pallet with generated pallet account

I want to use the Asset pallet from another custom pallet. The goal is to use the custom pallet account and transfers the assets of this account to another one using this function: https://github.com/...
Dubs's user avatar
  • 294