-
Notifications
You must be signed in to change notification settings - Fork 158
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
Update fee calculation logic #50
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
47cea2c
Update fee calculation logic
danforbes 8ce7eaf
Address code review by @athei and @amaurymartiny
danforbes cae3531
Do not pull raw/parsed extrinsics into separate variables
danforbes 2409f63
Remove Address and LookupSource types per @amaurymartiny
danforbes a7b8206
Bump Polkadot JS deps and remove WeightToFeeCoefficient type
danforbes 28659ab
Use variables consistently
danforbes 4dda869
Clean up diff
danforbes 56f697f
Update lockfile, formatting changes
danforbes eb3211a
Update fee calculation logic
danforbes 006e984
Rename variables, better comments (#54)
amaury1093 5b3b643
Upgraded to latest polkadot API release
athei 017fc30
Fixes for weight calculation
athei 1d3f87f
Calculate extrinsic fees in rust
athei 52d91dc
Fix CI
athei f723c34
Merge branch 'master' into update-fees
athei 7139830
Reproduce fixed128 bug that was deployed to polkadot v0.
athei 8aa6f1f
Support kusama without queryInfo
athei 1ab5267
Do not fail the whole request when runtime is not supported
athei 3c21419
Do not send per block parameters for every extrinsic to wasm
athei d098672
Install wasm-pack through node
athei 39c2796
Merge branch 'master' into update-fees
athei 8c2230e
Remove no longer needed bn.js dependency
athei 253989e
Revert "Install wasm-pack through node"
athei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,12 @@ jobs: | |
node-version: [10.x, 12.x] | ||
|
||
steps: | ||
- name: Install wasm-pack | ||
uses: jetli/[email protected] | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm i && npm run build | ||
- run: yarn | ||
- run: yarn build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/.vscode | ||
/node_modules | ||
/build | ||
/target | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/target | ||
/pkg |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "calc-fee" | ||
version = "0.1.0" | ||
authors = ["Alexander Theißen <[email protected]>"] | ||
edition = "2018" | ||
license = "Apache-2.0" | ||
publish = false | ||
repository = "https://github.com/polkadot-js/wasm/" | ||
description = "Calculate extrinsic fees off-chain" | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[features] | ||
debug = ["console_error_panic_hook"] | ||
|
||
[dependencies] | ||
wasm-bindgen = { version = "0.2", default_features = false, features = ["serde-serialize"] } | ||
serde_derive = { version = "1", default_features = false } | ||
serde = { version = "1", default_features = false } | ||
console_error_panic_hook = { version = "0.1", optional = true } | ||
sp-arithmetic = { git = "https://github.com/paritytech/substrate", default_features = false } | ||
|
||
[profile.release] | ||
opt-level = "z" | ||
lto = true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should replace that by a released version as soon as that is possible. The current release on crates.io (2.0.0-rc2) has a broken Fixed128 impl that does not work with negative coefficients on unsigned Balances.