Skip to content

Commit 7fdba18

Browse files
committed
docs: added yarn script + README section on cacheTradablePairs script
1 parent c176faf commit 7fdba18

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,16 @@ npm install @mento-protocol/mento-sdk
1212
yarn add @mento-protocol/mento-sdk
1313
```
1414

15-
# Learn more
15+
## Tradable Pairs Cache
16+
17+
Anytime we launch a new stable token, we need to update the tradable pairs cache.
18+
19+
The `yarn cacheTradablePairs` script generates a TypeScript file containing a list of all tradable pairs on the Mento protocol. This file is used to cache the tradable pairs in the SDK and avoid costly re-fetching from the network.
20+
21+
```sh
22+
yarn cacheTradablePairs
23+
```
24+
25+
## Learn more
1626

1727
You can find example usages of the SDK in the [mento-sdk-examples](https://github.com/mento-protocol/mento-sdk-examples) repository. For in-depth documentation and walk through explanations please see the [SDK section](https://docs.mento.org/mento/developers/mento-sdk) of the Mento docs.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"prettier": "prettier --config ./.prettierrc.json --write **/*.{json,md,js,ts,yml}",
3131
"size": "size-limit",
3232
"test": "jest --runInBand --verbose",
33-
"coverage": "jest --coverage"
33+
"coverage": "jest --coverage",
34+
"cacheTradablePairs": "ts-node scripts/cacheTradablePairs.ts"
3435
},
3536
"husky": {
3637
"hooks": {

0 commit comments

Comments
 (0)