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

Docs improvements #721

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dex-template/__DexName__-e2e.test.ts.template
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import { generateConfig } from '../../config';
Tokens or Holders map, you can update the './tests/constants-e2e'

Other than the standard cases that are already added by the template
it is highly recommended to add test cases which could be specific
it is highly recommended to add test cases that could be specific
to testing __DexName__ (Eg. Tests based on poolType, special tokens,
etc).

Expand Down
2 changes: 1 addition & 1 deletion dex-template/__DexName__.ts.template
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export class __DexName__
return [];
}

// This is optional function in case if your implementation has acquired any resources
// This is an optional function in case if your implementation has acquired any resources
// you need to release for graceful shutdown. For example, it may be any interval timer
releaseResources(): AsyncOrSync<void> {
// TODO: complete me!
Expand Down
4 changes: 2 additions & 2 deletions src/dex-helper/iblock-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface EventSubscriber {
//implementers must not present states older than the latest/requested block
//number to any query.
//If isTracking() returns true, it is assumed that all logs up to the latest
//block have been processed, hence it is fine to return the last calculated
//block has been processed, hence it is fine to return the last calculated
//state.
isTracking: () => boolean;

Expand All @@ -32,7 +32,7 @@ export interface EventSubscriber {
blockNumberForMissingStateRegen?: number,
): AsyncOrSync<void>;

//Will be called on a chain reorganisation prior to updating with new logs.
//Will be called on a chain reorganization prior to updating with new logs.
//All state corresponding to blocks after the given number must be discarded,
//except for the most recent state, if the invalid flag isn't still set.
rollback(blockNumber: number): void;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stateful-rpc-poller/state-polling-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class StatePollingManager {
// This pools will be updated if we see new block and the time has come
private _poolsToBeUpdated: Set<string> = new Set();

// This pools wont be updated before we change _isStateToBeUpdated to true
// This pools won't be updated before we change _isStateToBeUpdated to true
private _idlePools: Set<string> = new Set();

private constructor(protected dexHelper: IDexHelper) {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/stateful-rpc-poller/stateful-rpc-poller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export abstract class StatefulRpcPoller<State, M>
// Derived classes should not set these directly, and instead use setState()
protected _stateWithUpdateInfo?: ObjWithUpdateInfo<State>;

// This values is used to determine if current pool will participate in update or not
// This values is used to determine if the current pool will participate in update or not
// We don't want to keep track of state for pools without liquidity
protected _liquidityInUSDWithUpdateInfo: ObjWithUpdateInfo<number> = {
value: 0,
Expand Down Expand Up @@ -142,7 +142,7 @@ export abstract class StatefulRpcPoller<State, M>
protected liquidityUpdatePeriodMs = DEFAULT_LIQUIDITY_UPDATE_PERIOD_MS,
) {
// Don't make it too custom, like adding poolIdentifier. It will break log suppressor
// If we are really need to do that, update log Suppressor to handle that case
// If we really need to do that, update log Suppressor to handle that case
// The idea is to have one entity name per Dex level, not pool level
this.entityName = `StatefulPoller-${this.dexKey}-${this.dexHelper.config.data.network}`;

Expand Down