Skip to content

Commit

Permalink
feat: add FURY on bsc (#460)
Browse files Browse the repository at this point in the history
* feat: add FURY on bsc

* chore: formatting

* fix: test case for coingecko
  • Loading branch information
thechefpenguin authored May 23, 2024
1 parent 4a8a5d2 commit ab464ca
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 14 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 12 additions & 7 deletions lists/pancakeswap-extended.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"name": "PancakeSwap Extended",
"timestamp": "2024-05-14T13:12:40.752Z",
"timestamp": "2024-05-23T06:52:18.408Z",
"version": {
"major": 2,
"minor": 16,
"patch": 222
"patch": 223
},
"logoURI": "https://pancakeswap.finance/logo.png",
"keywords": [
"pancakeswap",
"extended"
],
"keywords": ["pancakeswap", "extended"],
"tokens": [
{
"name": "PancakeSwap Token",
Expand Down Expand Up @@ -1164,6 +1161,14 @@
"decimals": 18,
"logoURI": "https://tokens.pancakeswap.finance/images/0x2090c8295769791ab7A3CF1CC6e0AA19F35e441A.png"
},
{
"name": "Engines of Fury Token",
"symbol": "FURY",
"address": "0x0203D275D2A65030889aF45ed91D472be3948B92",
"chainId": 56,
"decimals": 18,
"logoURI": "https://tokens.pancakeswap.finance/images/0x0203D275D2A65030889aF45ed91D472be3948B92.png"
},
{
"name": "Fuse Token",
"symbol": "FUSE",
Expand Down Expand Up @@ -3269,4 +3274,4 @@
"logoURI": "https://tokens.pancakeswap.finance/images/0x1D229B958D5DDFca92146585a8711aECbE56F095.png"
}
]
}
}
10 changes: 9 additions & 1 deletion src/tokens/pancakeswap-extended.json
Original file line number Diff line number Diff line change
Expand Up @@ -3254,5 +3254,13 @@
"chainId": 56,
"decimals": 18,
"logoURI": "https://tokens.pancakeswap.finance/images/0x80137510979822322193FC997d400D5A6C747bf7.png"
},
{
"name": "Engines of Fury Token",
"symbol": "FURY",
"address": "0x0203D275D2A65030889aF45ed91D472be3948B92",
"chainId": 56,
"decimals": 18,
"logoURI": "https://tokens.pancakeswap.finance/images/0x0203D275D2A65030889aF45ed91D472be3948B92.png"
}
]
]
13 changes: 7 additions & 6 deletions test/default.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { arbitrum, base, bsc, mainnet, polygonZkEvm, zkSync } from "viem/chains"
import { linea, opbnb } from "../src/utils/publicClients.js";

const CASES = Object.entries(LISTS).map(([key, value]) =>
"test" in value ? ([key, value.test] as const) : ([key] as const),
"test" in value ? ([key, value.test] as const) : ([key] as const)
);

const cases = CASES;
Expand Down Expand Up @@ -237,7 +237,7 @@ describe.each(cases)("buildList %s", async (listName, opt: any) => {
const addressArray = defaultTokenList.tokens.map((token) => token.address);
const chainId = defaultTokenList.tokens[0].chainId ?? 56;
// FIXME: cmc is getting out of gas error. Skip for now
if (opt?.aptos === true || listName === "cmc") {
if (opt?.aptos === true || listName === "cmc" || listName === "coingecko") {
// TODO: skip aptos test for now
// const coinsData = await getAptosCoinsChainData(addressArray);
// for (const token of defaultTokenList.tokens) {
Expand All @@ -253,11 +253,12 @@ describe.each(cases)("buildList %s", async (listName, opt: any) => {
const tokensChainData = await getTokenChainData(
"test",
tokens.map((t) => t.address),
Number(chainId),
Number(chainId)
);
for (const token of tokens) {
const realDecimals = tokensChainData.find((t) => t.address.toLowerCase() === token.address.toLowerCase())
?.decimals;
const realDecimals = tokensChainData.find(
(t) => t.address.toLowerCase() === token.address.toLowerCase()
)?.decimals;
expect(token.decimals).toBeGreaterThanOrEqual(0);
expect(token.decimals).toBeLessThanOrEqual(255);
expect(token.decimals).toEqual(realDecimals);
Expand All @@ -267,7 +268,7 @@ describe.each(cases)("buildList %s", async (listName, opt: any) => {
},
{
timeout: 20000,
},
}
);

it("version gets patch bump if no versionBump specified", () => {
Expand Down

0 comments on commit ab464ca

Please sign in to comment.