Questions tagged [assets]
The assets tag has no usage guidance.
58
questions
0
votes
1
answer
35
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 ...
2
votes
1
answer
95
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 ...
1
vote
1
answer
36
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 ...
2
votes
1
answer
90
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 ...
2
votes
1
answer
19
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 ...
1
vote
1
answer
66
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....
0
votes
1
answer
31
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'...
1
vote
2
answers
125
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 ...
1
vote
2
answers
62
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:
...
1
vote
1
answer
29
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 ...
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?
2
votes
0
answers
82
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 ...
5
votes
2
answers
217
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 ...
5
votes
0
answers
28
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 (...
1
vote
0
answers
94
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 ...
1
vote
1
answer
191
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'...
1
vote
2
answers
91
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 ...
2
votes
1
answer
70
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 ...
-1
votes
1
answer
62
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 ...
1
vote
1
answer
47
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 ...
1
vote
1
answer
62
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 ...
2
votes
1
answer
64
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 ...
2
votes
1
answer
114
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 ...
2
votes
2
answers
131
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.
2
votes
1
answer
83
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?
3
votes
3
answers
183
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 ...
1
vote
1
answer
40
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 ...
3
votes
2
answers
111
views
What does #[pallet::compact] do?
What does #[pallet::compact] do?
0
votes
1
answer
47
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 ...
1
vote
1
answer
46
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/...
1
vote
0
answers
35
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 ...
2
votes
1
answer
137
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 ...
3
votes
0
answers
58
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:
...
5
votes
2
answers
174
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 ...
3
votes
3
answers
128
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 ...
5
votes
4
answers
234
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.
0
votes
1
answer
46
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?
6
votes
2
answers
488
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 ...
3
votes
1
answer
248
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 ...
3
votes
1
answer
139
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 ...
2
votes
1
answer
60
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/...
1
vote
2
answers
227
views
How to check if an asset exists
I'm using pallet-assets to implement my own pallet. In one of the extrinsic calls I would like to check if an asset with the given ID exists. How to achieve this, given that Assets type is private and ...
0
votes
1
answer
95
views
freeze(account, balance) for pallet-assets, how do I freeze X amount of a certain asset?
Does anyone know if there is a way to freeze (pallet-)asset's similar to how you can "lock"/freeze regular balance with T::Currency::freeze(AccountId, Balance)?
seems like there is no easy ...
2
votes
1
answer
35
views
Does DOT and KSM have Currency AssetId?
I believed that Substrate-based tokens have its own assetId
Question is, does relay chain tokens like "DOT" and "KSM" have their assetId too?
I tried to find out where it is ...
-2
votes
1
answer
66
views
How to use the created asset as Free Balance
I want to create a new Asset names PET in Substrate. What I did is from the PolkadotJS App Created and Minted the asset using the account Alice
I want to make this assetid to use as Freee Balance and ...
1
vote
2
answers
154
views
How do I hardcode asset id's?
Using pallet-assets, how do I create a pallet that has hardcoded (pallet-)asset id's for it's on-chain assets that the pallet handles?
I wasnt able to find a good documented way to do this
6
votes
1
answer
116
views
When using pallet-assets in another pallet: how to make pallet-assets calls private?
I'm using pallet-assets for my pallet, let's say custom-assets. In custom_assets::transfer I make some additional business logic and call pallet_assets::transfer. I want to make pallet_assets calls ...
3
votes
1
answer
71
views
If Sufficiency of a Statemint asset is revoked, what happens to the accounts holding only that asset?
For context: there are proposals to make RMRK https://kusama.polkassembly.io/post/1482 and USDT https://kusama.polkassembly.io/motion/470 as Sufficient assets. The existential deposit requirement is ...
2
votes
1
answer
325
views
How to access Statemint/Statemine assets in a parachain?
Statemint/Statemine provides a first-class interface for creating, managing, and using both fungible and non-fungible assets.
Token such as USDT are minted on it.
What methods are possible to interact ...
7
votes
1
answer
176
views
Can the destroyed assets be recovered after the XCM teleporting failed?
Gavin Wood mentioned it here, assets are destroyed before the xcm message is sent.
Statemint trusts the Polkadot Relay Chain to have destroyed the 1 DOT on its side prior to sending the message. (It ...