Skip to main content
11 votes

how we can implement gasless/feeless transaction?

There are broadly two ways of doing this: Inherents and Unsigned Transactions Inherents are designed to be placed directly into the block by the author; they aren't stored in the transaction pool and ...
rob's user avatar
  • 2,126
11 votes
Accepted

How to determine destination chain transfer fee when executing tx.xcmPallet.reserveTransferAssets

There is not currently any way to get this value automatically. It is generally expected that in the near term the community will standardise around a fixed fee expressed in DOT or KSM. In the future ...
Gav's user avatar
  • 2,681
9 votes

Determining the final fee from a client

Just to elaborate on this, since I've been digging into it and asking around... We can use the following formula to calculate the partial_fee for an extrinsic (ie the total/final fee minus any tip). ...
jsdw's user avatar
  • 1,335
8 votes
Accepted

Substrate Meta Transaction

The signAndSend in the JS API is actually a process you can split into 2 parts: .signAsync(...) and .send(...), internally the JS API does exactly that when calling signAndSend(...). However even when ...
Jaco's user avatar
  • 5,875
8 votes

how we can implement gasless/feeless transaction?

While I also was doing something that requires fee-less transaction, it might be worthwhile for future reader, 1. Do not charge fee in specific extrinsic call While defining extrinsic call in pallet, ...
Sudip Ghimire's user avatar
7 votes
Accepted

On empty blocks, who is paying timestamp fees?

timestamp.set is an unsigned extrinsic: pub fn set(origin: OriginFor<T>, #[pallet::compact] now: T::Moment) -> DispatchResult { ensure_none(origin)?; ... } So even though the UI ...
Shawn Tabrizi's user avatar
  • 16.2k
7 votes
Accepted

Do all extrinsic fees have to be paid when using utility.batch?

Saying that "fees are not paid" is not a fully accurate statement of what is happening for things like council.vote. What is actually happening is that at the beginning of the transaction, ...
Shawn Tabrizi's user avatar
  • 16.2k
7 votes

How to calculate fee for XCM transfer?

In fact, it is almost impossible to have an algorithm to calculate the XCM fees for all chains. This is because the calculation of XCM fees is related to the following points, and each chain may have ...
Guantong's user avatar
  • 1,848
6 votes
Accepted

Transaction fee paying fund

There are a ton of approaches to this, but you usually need to apply some kind of logic ensure the transactions can't get spammed or used as a DDOS attack vector - this applies whether the fees are ...
ashneverdawn's user avatar
6 votes
Accepted

fee economics around remark

Every extrinsic has an ExtrinsicBaseWeight which is defined in FRAME System. So even if a benchmark for a particular extrinsic says 0, there will still be the ExtrinsicBaseWeight included on top of it....
Shawn Tabrizi's user avatar
  • 16.2k
6 votes
Accepted

How to set base_fee and len_fee to zero?

len_fee is controlled by the TransactionByteFee. This TransactionByteFee is an associated type of the transaction-payment Config trait. If you set this to 0, the len_fee is 0. The base_fee depends on ...
bkchr's user avatar
  • 11.6k
6 votes
Accepted

how we can implement gasless/feeless transaction?

It sounds like you want transactions to be 'free' - possibly for a some subset of network participants. Depending on your runtime there are different ways to achieve this. The easiest being: you can ...
dan_chainflip's user avatar
5 votes
Accepted

How is base fee calculated?

Base fee represents the fee of any extrinsic with a certain extrinsic class, not yet including the specific logic of that extrinsic. That is to say, that there is some overhead fee required for any ...
Shawn Tabrizi's user avatar
  • 16.2k
5 votes
Accepted

Where do the transaction fees go to?

The transaction-fee pallet handles calculating and transferring the transaction fees. It supports a configurable output by implementing the OnUnbalanced trait. For Polkadot and Kusama, 80% of the ...
Shawn Tabrizi's user avatar
  • 16.2k
5 votes

Do all extrinsic fees have to be paid when using utility.batch?

Yes you will also need to pay for these transactions inside utility.batch or utility.batchAll. However, you also don't pay for each transaction separately, you pay for all of them directly together. ...
bkchr's user avatar
  • 11.6k
4 votes

How to compute the fees of a block

here you go: const at = await api.rpc.chain.getFinalizedHead(); const block = await api.rpc.chain.getBlock(at); const blockFees = await Promise.all(block.block.extrinsics.map( (ext) => api.rpc....
kianenigma's user avatar
  • 2,844
4 votes
Accepted

Westend PartialFees in version 9190

So for sidecar specifically this is a bug due to TransactionByteFee being changed to LengthToFee in v9190. We use that perByte value to help calculate the partialFee within our helper package called @...
Tarik Gul's user avatar
  • 1,141
4 votes

Hardware: Benchmark Standard vs Ecosystem Nodes

relay validators execute parachain blocks... if parachain collators are benchmarked on HW that's faster than standard, that means relay validators will spend more time than expected executing ...
Bernardo Rodrigues's user avatar
4 votes
Accepted

Hardware: Benchmark Standard vs Ecosystem Nodes

The hardware requirements that you found are correct. There are multiple things to consider when thinking about hardware requirements. Type Of The Node The hardware requirements are aimed at ...
Oliver Tale-Yazdi's user avatar
4 votes
Accepted

collect tx fees from a pallet

This is definitely possible, but will require some of your own design and elbow grease to make work. Specifically, you should look at the trait OnChargeTransaction: https://paritytech.github.io/...
Shawn Tabrizi's user avatar
  • 16.2k
3 votes

Determining the final fee from a client

There is no event for the final fee, but you can calculate it either using the runtime API for transaction_payment.query_info or by executing the fee calculation from weight/length yourself. Sidecar ...
joepetrowski's user avatar
  • 2,975
3 votes
Accepted

Does call.dispatch make `origin` pay the fees to the network?

Will dispatch will make origin pay the fees associated with this Call? No, only the signer of a transaction will pay fees for it (although there are some PRs in Substrate to make that a bit more ...
joepetrowski's user avatar
  • 2,975
3 votes
Accepted

Rpc payment_queryFeeInfo fails on Westend 9310

Generally (this is not the first time this happens), this indicates a mismatch between the node and runtime versions, i.e. the RPC node calls into the runtime and then cannot decode the response. ...
Jaco's user avatar
  • 5,875
3 votes

What are the fees associated with ink! contract deployment?

Your assumptions you made in #1 to #6 are all correct. Now to your questions: This is the storage deposit for storing the code. In contrast to the deposit for the contract which is using said code (...
Alexander Theißen's user avatar
3 votes

Get extrinsic fee using Polkadot.js/api

I am not sure how Subscan is getting this values, but I believe to get the Used Fee you have to scan the events, see this previous answer in StackExchange: Is there a way to collect fee of transaction?...
Alex Bean's user avatar
  • 5,757
2 votes

How do the `DispatchResultWithPostInfo` and `Pays::No` actually work?

You are right that it show the correct information with no fees. There was actually some bug in reporting the correct result. It was fixed in the following commit (as of writing this, 6 days ago, so ...
bkchr's user avatar
  • 11.6k
2 votes

How can i set fix gas fee for all transaction in substrate?

You should simply adjust the WeightToFee calculation from the Pallet Transaction Payment Configuration: impl pallet_transaction_payment::Config for Runtime { type Event = Event; type ...
Shawn Tabrizi's user avatar
  • 16.2k
2 votes
Accepted

How can i set fix gas fee for all transaction in substrate?

Manually specifying fee First thing that came to my mind is doing: /// How much is exactly one unit in your node? const UNIT: u32 = 10_000_000; #[pallet::weight(UNIT.into())] fn call_one(..) -> _ {...
Sudip Ghimire's user avatar
2 votes
Accepted

Collator reward and inflation

Doing any kind of inflation on a Substrate chain can be broken up cleanly into two parts: Minting some new tokens (creating a negative imbalance) Assigning those new tokens to some source (handling ...
Shawn Tabrizi's user avatar
  • 16.2k
2 votes
Accepted

Can I add a base fee per extrinsic?

The easiest way to achieve this would be to modify your WeightToFee implementation. Note, you will probably depend on this PR being merged before you can easily do this. But in general, there is a ...
Shawn Tabrizi's user avatar
  • 16.2k

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