Skip to content

Commit 43b0e9c

Browse files
committed
chore: ran prettier
1 parent 9e32349 commit 43b0e9c

File tree

13 files changed

+54
-54
lines changed

13 files changed

+54
-54
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"build:cjs": "tsc --project ./tsconfig.json",
2727
"build:esm": "tsc --project ./tsconfig.esm.json",
2828
"clean": "rm -rf ./dist",
29-
"lint": "eslint --config ./.eslintrc.json 'src/**/*.ts' 'scripts/**/*.ts'",
29+
"lint": "eslint --fix --config ./.eslintrc.json 'src/**/*.ts' 'scripts/**/*.ts'",
3030
"check:scripts": "tsc --project ./tsconfig.scripts.json",
3131
"prettier": "prettier --config ./.prettierrc.json --write **/*.{json,md,js,ts,yml}",
3232
"size": "size-limit",

scripts/breakerBox/README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ In the Mento protocol, circuit breakers are safety mechanisms that can temporari
3838
2. **Value Delta Breaker**: Monitors the absolute value of price changes
3939

4040
The breakers can be in three states:
41+
4142
- **Active**: Monitoring and allowing trades
4243
- **Tripped**: Triggered and preventing trades
4344
- **Disabled**: Not monitoring the rate feed
@@ -46,22 +47,23 @@ The breakers can be in three states:
4647

4748
The script produces a table with the following columns:
4849

49-
| Column | Description |
50-
|--------|-------------|
51-
| Rate Feed ID | The unique identifier for the rate feed |
52-
| Exchange ID | The associated exchange identifier |
53-
| Asset 0 | The first asset in the trading pair |
54-
| Asset 1 | The second asset in the trading pair |
55-
| Status | Current state of the circuit breaker (active/tripped/disabled) |
56-
| Trading Mode | Current trading mode (0=active, 1=tripped, 2=disabled) |
57-
| Median Thresh | Threshold for median price changes |
58-
| Median Smooth | Smoothing factor for median calculations |
59-
| Median EMA | Current Exponential Moving Average |
60-
| Value Thresh | Threshold for absolute value changes |
61-
| Value Ref | Reference value for value breaker |
62-
| Cooldown | Cooldown period in seconds |
50+
| Column | Description |
51+
| ------------- | -------------------------------------------------------------- |
52+
| Rate Feed ID | The unique identifier for the rate feed |
53+
| Exchange ID | The associated exchange identifier |
54+
| Asset 0 | The first asset in the trading pair |
55+
| Asset 1 | The second asset in the trading pair |
56+
| Status | Current state of the circuit breaker (active/tripped/disabled) |
57+
| Trading Mode | Current trading mode (0=active, 1=tripped, 2=disabled) |
58+
| Median Thresh | Threshold for median price changes |
59+
| Median Smooth | Smoothing factor for median calculations |
60+
| Median EMA | Current Exponential Moving Average |
61+
| Value Thresh | Threshold for absolute value changes |
62+
| Value Ref | Reference value for value breaker |
63+
| Cooldown | Cooldown period in seconds |
6364

6465
The tool uses color-coded status indicators:
66+
6567
- Green: Active
6668
- Red: Tripped
6769
- Yellow: Disabled
@@ -93,4 +95,4 @@ The script uses the following key components:
9395
2. **IBreakerBox Contract** - Interacts with the breaker box to get breaker states for each rate feed
9496
3. **MedianDeltaBreaker & ValueDeltaBreaker** - Fetches specific breaker parameters for each rate feed
9597
4. **Token Symbol Resolution** - Resolves token addresses to their human-readable symbols
96-
5. **Table Formatting** - Creates a clean, readable table output with proper column alignment
98+
5. **Table Formatting** - Creates a clean, readable table output with proper column alignment

scripts/breakerBox/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export interface ExchangeData {
88
}
99

1010
// Export types from SDK to avoid importing from multiple places
11-
export { Mento }
11+
export { Mento }

scripts/poolConfigs/README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
A CLI tool for visualizing all PoolConfig parameters (including spreads) across the Mento protocol's trading pairs.
44
image.png
5+
56
## Features
67

78
- Displays all exchanges/pools and their PoolConfig parameters in a tabular format
@@ -41,18 +42,19 @@ In the Mento protocol, PoolConfig parameters determine the behavior and fees for
4142

4243
The script produces a table with the following columns:
4344

44-
| Column | Description |
45-
|--------|-------------|
46-
| Exchange ID | The unique identifier for the exchange |
47-
| Asset 0 | The first asset in the trading pair |
48-
| Asset 1 | The second asset in the trading pair |
49-
| Spread (%) | The fee percentage charged on each trade |
50-
| Ref Rate Feed | The oracle rateFeedID used as reference rate |
51-
| Reset Freq (h) | How often the buckets reset to reference rate (in hours) |
52-
| Min Reports | Minimum required oracle reports to trust reference rate |
53-
| Reset Size | Value that bucket0 resets to during bucket updates (converted from e18) |
45+
| Column | Description |
46+
| -------------- | ----------------------------------------------------------------------- |
47+
| Exchange ID | The unique identifier for the exchange |
48+
| Asset 0 | The first asset in the trading pair |
49+
| Asset 1 | The second asset in the trading pair |
50+
| Spread (%) | The fee percentage charged on each trade |
51+
| Ref Rate Feed | The oracle rateFeedID used as reference rate |
52+
| Reset Freq (h) | How often the buckets reset to reference rate (in hours) |
53+
| Min Reports | Minimum required oracle reports to trust reference rate |
54+
| Reset Size | Value that bucket0 resets to during bucket updates (converted from e18) |
5455

5556
The tool uses color-coded spread values to make them easily distinguishable in the output:
57+
5658
- Green: Spread ≤ 0.5%
5759
- Yellow: 0.5% < Spread ≤ 1%
5860
- Red: Spread > 1%
@@ -85,4 +87,4 @@ The script uses the following key components:
8587
1. **BiPoolManager Contract** - Directly interacts with the BiPoolManager contract to fetch PoolConfig parameters
8688
2. **FixidityLib** - Handles the conversion of spread values from the contract's format to percentages
8789
3. **Token Symbol Resolution** - Resolves token addresses to their human-readable symbols
88-
4. **Table Formatting** - Creates a clean, readable table output with proper column alignment and delimiters
90+
4. **Table Formatting** - Creates a clean, readable table output with proper column alignment and delimiters

scripts/poolConfigs/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ export interface ExchangeData {
1616
stablePoolResetSize: number
1717
}
1818

19-
export { Mento }
19+
export { Mento }

scripts/printBreakerBox.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* This is a wrapper script that uses the modular implementation.
55
* For better maintainability, the implementation has been moved to the breakerBox folder.
66
*/
7-
import './breakerBox/index'
7+
import './breakerBox/index'

scripts/printPoolConfigs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* This is a wrapper script that uses the modular implementation.
55
* For better maintainability, the implementation has been moved to the poolConfig folder.
66
*/
7-
import './poolConfigs/index'
7+
import './poolConfigs/index'

scripts/printTradablePairs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
* This is a wrapper script that uses the modular implementation.
55
* For better maintainability, the implementation has been moved to the poolConfig folder.
66
*/
7-
import './tradablePairs/index';
7+
import './tradablePairs/index'

scripts/tradingLimits/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,26 +56,26 @@ Each limit has a maximum inflow and outflow value. When either is reached, tradi
5656

5757
The script produces a table with the following columns:
5858

59-
| Column | Description |
60-
|--------|-------------|
61-
| Exchange | The exchange pair (shown only once per exchange) |
62-
| Symbol | The token symbol |
63-
| Limit Type | L0 (short-term), L1 (medium-term), or LG (global) |
64-
| Timeframe | The time window for this limit |
65-
| Limit | The maximum configured limit value |
66-
| Netflow | Current usage (positive for inflows, negative for outflows) |
67-
| Utilization | Visual representation of limit usage |
68-
| Max In | Maximum allowed inflow remaining |
69-
| Max Out | Maximum allowed outflow remaining |
70-
| Resets In | Time until limit window resets |
71-
| Reset Time | Unix timestamp when limit resets |
72-
| Status | Current status (ACTIVE, INFLOWS BLOCKED, OUTFLOWS BLOCKED, or BLOCKED) |
59+
| Column | Description |
60+
| ----------- | ---------------------------------------------------------------------- |
61+
| Exchange | The exchange pair (shown only once per exchange) |
62+
| Symbol | The token symbol |
63+
| Limit Type | L0 (short-term), L1 (medium-term), or LG (global) |
64+
| Timeframe | The time window for this limit |
65+
| Limit | The maximum configured limit value |
66+
| Netflow | Current usage (positive for inflows, negative for outflows) |
67+
| Utilization | Visual representation of limit usage |
68+
| Max In | Maximum allowed inflow remaining |
69+
| Max Out | Maximum allowed outflow remaining |
70+
| Resets In | Time until limit window resets |
71+
| Reset Time | Unix timestamp when limit resets |
72+
| Status | Current status (ACTIVE, INFLOWS BLOCKED, OUTFLOWS BLOCKED, or BLOCKED) |
7373

7474
The tool uses color-coded statuses to indicate the current state of each trading limit:
7575

7676
- **ACTIVE** (green): Trading is fully enabled in both directions
7777
- **INFLOWS BLOCKED** (yellow): Deposits are blocked, but withdrawals are still allowed
78-
- **OUTFLOWS BLOCKED** (yellow): Withdrawals are blocked, but deposits are still allowed
78+
- **OUTFLOWS BLOCKED** (yellow): Withdrawals are blocked, but deposits are still allowed
7979
- **BLOCKED** (red): All trading is blocked until the time window resets
8080

8181
## Project Structure

src/constants/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
export * from './addresses'
22
export * from './currencies'
33
export * from './tradablePairs'
4-

0 commit comments

Comments
 (0)