-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support Dock's multiplier & add Dock controller config (#365)
* Support Dock's Multiplier Signed-off-by: lovesh <lovesh.bond@gmail.com> * Link package for local testing; Bump deps * Add controllers for Dock Signed-off-by: lovesh <lovesh.bond@gmail.com> * Revert to calc NPM package Co-authored-by: emostov <32168567+emostov@users.noreply.github.com>
- Loading branch information
Showing
13 changed files
with
445 additions
and
371 deletions.
There are no files selected for viewing
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
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,34 @@ | ||
<br /><br /> | ||
|
||
<div align="center"> | ||
<h1 align="center">@substrate/calc</h1> | ||
<h4 align="center">Off-chain calculations for @substrate/api-sidecar.</h4> | ||
|
||
<p align="center"> | ||
<a href="https://www.npmjs.com/package/@substrate/api-sidecar"> | ||
<img alt="npm" src="https://img.shields.io/npm/v/@substrate/calc" /> | ||
</a> | ||
<a href="https://github.com/paritytech/substrate-api-sidecar/actions"> | ||
<img alt="Github Actions" src="https://github.com/paritytech/substrate-api-sidecar/workflows/pr/badge.svg" /> | ||
</a> | ||
<a href="https://opensource.org/licenses/Apache-2.0"> | ||
<img alt="apache-2.0" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg" /> | ||
</a> | ||
</p> | ||
</div> | ||
|
||
<br /><br /> | ||
|
||
## About | ||
|
||
This package is generated from the [`calc`](https://github.com/paritytech/substrate-api-sidecar/tree/master/calc) Rust crate using `wasm-bindgen` and was initially developed | ||
solely to use as a dependency for `substrate-api-sidecar`. We are now offering this package as a | ||
standalone through the npm registry. | ||
|
||
## Usage | ||
|
||
Example usage for the package can be found in Sidecar's [staking payout service](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/accounts/AccountsStakingPayoutsService.ts) and Sidecar's [block service](https://github.com/paritytech/substrate-api-sidecar/blob/master/src/services/blocks/BlocksService.ts). | ||
|
||
## Contributing | ||
|
||
We welcome [contributions for documentation and code](https://github.com/paritytech/substrate-api-sidecar/pulls). If you have any questions you can reach the maintainers by [filing an issue on github.](https://github.com/paritytech/substrate-api-sidecar/issues) |
Binary file not shown.
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
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
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
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,29 @@ | ||
import { ControllerConfig } from '../types/chains-config'; | ||
|
||
/** | ||
* Controllers for Dock's mainnet. | ||
*/ | ||
export const dockMainnetControllers: ControllerConfig = { | ||
controllers: { | ||
Blocks: true, | ||
AccountsStakingPayouts: false, | ||
AccountsBalanceInfo: true, | ||
AccountsStakingInfo: false, | ||
AccountsVestingInfo: false, | ||
NodeNetwork: true, | ||
NodeVersion: true, | ||
NodeTransactionPool: true, | ||
RuntimeCode: true, | ||
RuntimeSpec: true, | ||
RuntimeMetadata: true, | ||
TransactionDryRun: true, | ||
TransactionMaterial: true, | ||
TransactionFeeEstimate: true, | ||
TransactionSubmit: true, | ||
PalletsStakingProgress: false, | ||
PalletsStorage: true, | ||
}, | ||
options: { | ||
finalizes: true, | ||
}, | ||
}; |
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,29 @@ | ||
import { ControllerConfig } from '../types/chains-config'; | ||
|
||
/** | ||
* Controllers for Dock's test network. | ||
*/ | ||
export const dockTestnetControllers: ControllerConfig = { | ||
controllers: { | ||
Blocks: true, | ||
AccountsStakingPayouts: false, | ||
AccountsBalanceInfo: true, | ||
AccountsStakingInfo: false, | ||
AccountsVestingInfo: false, | ||
NodeNetwork: true, | ||
NodeVersion: true, | ||
NodeTransactionPool: true, | ||
RuntimeCode: true, | ||
RuntimeSpec: true, | ||
RuntimeMetadata: true, | ||
TransactionDryRun: true, | ||
TransactionMaterial: true, | ||
TransactionFeeEstimate: true, | ||
TransactionSubmit: true, | ||
PalletsStakingProgress: false, | ||
PalletsStorage: true, | ||
}, | ||
options: { | ||
finalizes: true, | ||
}, | ||
}; |
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
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
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
Oops, something went wrong.