-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
94 additions
and
49 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
packages/adena-extension/src/common/constants/gas.constant.ts
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,15 +1,24 @@ | ||
import { NetworkFeeSettingType } from '@types'; | ||
|
||
// Gnoland default gas price (1ugnot/1000gas) | ||
// https://github.com/gnolang/gno/blob/master/gno.land/pkg/gnoland/genesis.go#L20 | ||
export const MINIMUM_GAS_PRICE = 0.001 as const; | ||
|
||
// Adena default gas used | ||
// When the gas used is not set, the default value is 100,000 | ||
export const DEFAULT_GAS_USED = 100_000 as const; | ||
|
||
// Default gas price step | ||
// Slow = 0.001, Average = 0.0025, Fast = 0.004 | ||
export const DEFAULT_GAS_PRICE_STEP: Record<NetworkFeeSettingType, number> = { | ||
FAST: 0.004, | ||
AVERAGE: 0.0025, | ||
SLOW: 0.001, | ||
} as const; | ||
|
||
// Default gas adjustment | ||
export const DEFAULT_GAS_ADJUSTMENT = 1.6 as const; | ||
|
||
// Gas fee safety margin | ||
// This is gas wanted safety margin | ||
export const GAS_FEE_SAFETY_MARGIN = 1.2 as const; |
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
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