Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change the transaction fee #264

Closed
vpanwar821 opened this issue Sep 12, 2018 · 1 comment
Closed

How to change the transaction fee #264

vpanwar821 opened this issue Sep 12, 2018 · 1 comment

Comments

@vpanwar821
Copy link

Currently asch is charging 10000000 as a transaction fee but I want to reduce it to some 1% of the transaction amount in my platform . Can anyone help me with this as I am not able to find where it is setting the fees.

@a1300
Copy link
Contributor

a1300 commented Sep 14, 2018

@vpanwar821 what do you mean with my platform?

1 If you are meaning your Sidechain (or DApp)

As far as I know, you can't set the transaction fee to 1% on your sidechain. You can set the fee for a custom contract on the sidechain to a fixed value (documented here)

2 If you mean the ASCH mainchain

The fee calculation does not happen in the main asch repo.

Change the following code in asch-core/src/utils/calculate-fee.js

 1: () => 0.1,

In #224 you can see the fee calculation and the contract names. You need to change contract 1 if you want to transfer XAS.

  1. You would need to fork the asch-core repo
  2. change the asch-core/src/utils/calculate-fee.js file.
  3. Push changes to https://github.com/vpanwar821/asch-core
  4. Change package.json file in your downloaded asch repo to point to your updated asch-core version
- "asch-core": "https://github.com/AschPlatform/asch-core/tarball/v1.4.4",
+ "asch-core": "https://github.com/vpanwar821/asch-core",
  1. Rebuild downloaded asch blockchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants