Skip to content

Commit 4de4f05

Browse files
committed
feat: fix description + add prettier
1 parent 567979e commit 4de4f05

File tree

5 files changed

+55
-36
lines changed

5 files changed

+55
-36
lines changed

.prettierrc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"printWidth": 140
5+
}

ERC20_LIST.json

+23-11
Original file line numberDiff line numberDiff line change
@@ -353,26 +353,30 @@
353353
"0xa9d2Eea75C80fF9669cc998c276Ff26D741Dcb26": {
354354
"address": "0xa9d2Eea75C80fF9669cc998c276Ff26D741Dcb26",
355355
"decimals": 18,
356+
"description": "<p>sd-crvFRAXUSDC is the token you get when staking on <a href=`https://lockers.stakedao.org` className = `underlined mx-1`>StakeDAO</a> the LP token of the <a href=`https://curve.fi/#/ethereum/pools/fraxusdc/deposit` className = `underlined mx-1`>FRAX-USDC (FRAXBP) Curve pool</a>. This token accumulates SDT and CRV rewards on top of transaction fees from the FRAX-USDC Curve pool.</p>",
356357
"hasPermit": false,
357-
"wrappingMethod": "BorrowStaker",
358358
"logoURI": "https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/src/assets/tokens/sd-crvFRAXUSDC.svg",
359359
"name": "Angle Curve.fi FRAX/USDC Stake DAO Staker",
360360
"symbol": "sd-crvFRAXUSDC",
361-
"underlyingTokens": ["0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC"],
361+
"underlyingTokens": [
362+
"0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC"
363+
],
362364
"useInSwap": false,
363-
"description": "sd-crvFRAXUSDC is the token you get when staking on <a href=https://lockers.stakedao.org/>StakeDAO</a> the LP token of the <a href=https://curve.fi/#/ethereum/pools/fraxusdc/deposit>FRAX-USDC (FRAXBP) Curve pool</a>. This token accumulates SDT and CRV rewards on top of transaction fees from the FRAX-USDC Curve pool."
365+
"wrappingMethod": "BorrowStaker"
364366
},
365367
"0xC68421f20bf6f0Eb475F00b9C5484f7D0AC0331e": {
366368
"address": "0xC68421f20bf6f0Eb475F00b9C5484f7D0AC0331e",
367369
"decimals": 18,
370+
"description": "<p>cvx-crvFRAXUSDC corresponds to LP tokens of the <a href=`https://curve.fi/#/ethereum/pools/fraxusdc/deposit` className = `underlined mx-1`>FRAX-USDC (FRAXBP) Curve pool</a> staked on <a href=`https://www.convexfinance.com/stake` className = `underlined mx-1`>Convex</a>. By owning cvx-crvFRAXUSDC, you accumulate CVX and CRV rewards on top of transaction fees from the FRAX-USDC Curve pool.</p>",
368371
"hasPermit": false,
369-
"wrappingMethod": "BorrowStaker",
370372
"logoURI": "https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/src/assets/tokens/cvx-crvFRAXUSDC.svg",
371373
"name": "Angle Curve.fi FRAX/USDC Convex Staker",
372374
"symbol": "cvx-crvFRAXUSDC",
373-
"underlyingTokens": ["0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC"],
375+
"underlyingTokens": [
376+
"0x3175Df0976dFA876431C2E9eE6Bc45b65d3473CC"
377+
],
374378
"useInSwap": false,
375-
"description": "<p>cvx-crvFRAXUSDC corresponds to LP tokens of the <a href=https://curve.fi/#/ethereum/pools/fraxusdc/deposit>FRAX-USDC (FRAXBP) Curve pool</a> staked on <a href=https://www.convexfinance.com/stake>Convex</a>. By owning cvx-crvFRAXUSDC, you accumulate CVX and CRV rewards on top of transaction fees from the FRAX-USDC Curve pool.</p>"
379+
"wrappingMethod": "BorrowStaker"
376380
}
377381
},
378382
"137": {
@@ -459,7 +463,9 @@
459463
"decimals": 18,
460464
"symbol": "amDAI",
461465
"wrappingMethod": "Aave Matic Market",
462-
"underlyingTokens": ["0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"],
466+
"underlyingTokens": [
467+
"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063"
468+
],
463469
"hasPermit": false,
464470
"logoURI": "https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/src/assets/tokens/DAI.svg"
465471
},
@@ -477,7 +483,9 @@
477483
"decimals": 6,
478484
"symbol": "amUSDC",
479485
"wrappingMethod": "Aave Matic Market",
480-
"underlyingTokens": ["0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"],
486+
"underlyingTokens": [
487+
"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"
488+
],
481489
"hasPermit": false,
482490
"logoURI": "https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/src/assets/tokens/USDC.svg"
483491
},
@@ -487,7 +495,9 @@
487495
"decimals": 6,
488496
"symbol": "amUSDT",
489497
"wrappingMethod": "Aave Matic Market",
490-
"underlyingTokens": ["0xc2132D05D31c914a87C6611C10748AEb04B58e8F"],
498+
"underlyingTokens": [
499+
"0xc2132D05D31c914a87C6611C10748AEb04B58e8F"
500+
],
491501
"hasPermit": false,
492502
"logoURI": "https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/src/assets/tokens/USDT.svg"
493503
},
@@ -507,7 +517,9 @@
507517
"logoURI": "https://raw.githubusercontent.com/AngleProtocol/angle-token-list/main/src/assets/tokens/cvxam3CRV.svg",
508518
"name": "Angle Curve.fi amDAI/amUSDC/amUSDT Staker",
509519
"symbol": "agstk-am3CRV",
510-
"underlyingTokens": ["0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171"],
520+
"underlyingTokens": [
521+
"0xE7a24EF0C5e95Ffb0f6684b813A78F2a3AD7D171"
522+
],
511523
"useInSwap": false
512524
},
513525
"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174": {
@@ -777,4 +789,4 @@
777789
}
778790
}
779791
}
780-
]
792+
]

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"dependencies": {
99
"@angleprotocol/sdk": "^1.1.31",
1010
"ethers": "^5.7.1",
11-
"joi": "^17.6.0"
11+
"joi": "^17.6.0",
12+
"prettier": "^2.8.2"
1213
},
1314
"scripts": {
1415
"validate": "ts-node src/index.ts"

src/types.ts

+20-24
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,27 @@
1-
import { ChainId } from '@angleprotocol/sdk'
2-
import Joi from 'joi'
1+
import { ChainId } from '@angleprotocol/sdk';
2+
import Joi from 'joi';
33

44
export type TokenType = {
5-
readonly address: string
6-
readonly symbol: string
7-
readonly decimals: number
8-
readonly hasPermit?: boolean
9-
readonly wrappingMethod?:
10-
| 'BorrowStaker'
11-
| 'Curve'
12-
| 'Aave Matic Market'
13-
| 'Wrap Native'
14-
readonly logoURI?: string
15-
readonly name: string
16-
readonly permitVersion?: string
17-
readonly underlyingTokens?: string[]
18-
readonly useInSwap?: boolean
19-
readonly description?: string
20-
}
5+
readonly address: string;
6+
readonly decimals: number;
7+
readonly description?: string;
8+
readonly hasPermit?: boolean;
9+
readonly logoURI?: string;
10+
readonly name: string;
11+
readonly permitVersion?: string;
12+
readonly symbol: string;
13+
readonly underlyingTokens?: string[];
14+
readonly useInSwap?: boolean;
15+
readonly wrappingMethod?: 'BorrowStaker' | 'Curve' | 'Aave Matic Market' | 'Wrap Native';
16+
};
2117

2218
export type TokenListPerChainId = {
23-
[address: string]: TokenType
24-
}
19+
[address: string]: TokenType;
20+
};
2521

2622
export type TokenList = {
27-
[chainId: string]: TokenListPerChainId
28-
}
23+
[chainId: string]: TokenListPerChainId;
24+
};
2925

3026
/** Joi schema */
3127
const tokenInfo = Joi.object().keys({
@@ -41,7 +37,7 @@ const tokenInfo = Joi.object().keys({
4137
underlyingTokens: Joi.array().items(Joi.string()),
4238
useInSwap: Joi.bool(),
4339
description: Joi.string(),
44-
})
40+
});
4541

4642
// const items: any = {};
4743
// for (const chain of Object.keys(ChainId)) {
@@ -55,4 +51,4 @@ export const joiSchema = Joi.object().keys({
5551
[ChainId.BSC]: Joi.object().pattern(/^/, tokenInfo),
5652
[ChainId.OPTIMISM]: Joi.object().pattern(/^/, tokenInfo),
5753
[ChainId.CELO]: Joi.object().pattern(/^/, tokenInfo),
58-
})
54+
});

yarn.lock

+5
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,11 @@ prettier@^2.3.1:
954954
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.0.tgz#c7df58393c9ba77d6fba3921ae01faf994fb9dc9"
955955
integrity sha512-9Lmg8hTFZKG0Asr/kW9Bp8tJjRVluO8EJQVfY2T7FMw9T5jy4I/Uvx0Rca/XWf50QQ1/SS48+6IJWnrb+2yemA==
956956

957+
prettier@^2.8.2:
958+
version "2.8.2"
959+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.2.tgz#c4ea1b5b454d7c4b59966db2e06ed7eec5dfd160"
960+
integrity sha512-BtRV9BcncDyI2tsuS19zzhzoxD8Dh8LiCx7j7tHzrkz8GFXAexeWFdi22mjE1d16dftH2qNaytVxqiRTGlMfpw==
961+
957962
reduce-flatten@^2.0.0:
958963
version "2.0.0"
959964
resolved "https://registry.yarnpkg.com/reduce-flatten/-/reduce-flatten-2.0.0.tgz#734fd84e65f375d7ca4465c69798c25c9d10ae27"

0 commit comments

Comments
 (0)