diff --git a/.env.development b/.env.development index cf497322e..fdd1100b1 100644 --- a/.env.development +++ b/.env.development @@ -9,3 +9,8 @@ REACT_APP_NODE_2 = "https://bsc-dataseed.binance.org" # 10+ nodes balanced in each region, global REACT_APP_NODE_3 = "https://bsc-dataseed.binance.org" +# testnet +#REACT_APP_CHAIN_ID = "97" +#REACT_APP_NODE_1 = "https://data-seed-prebsc-1-s1.binance.org:8545/" +#REACT_APP_NODE_2 = "https://data-seed-prebsc-2-s1.binance.org:8545/" +#REACT_APP_NODE_3 = "https://data-seed-prebsc-1-s2.binance.org:8545/" diff --git a/.env.production b/.env.production index cf497322e..fdd1100b1 100644 --- a/.env.production +++ b/.env.production @@ -9,3 +9,8 @@ REACT_APP_NODE_2 = "https://bsc-dataseed.binance.org" # 10+ nodes balanced in each region, global REACT_APP_NODE_3 = "https://bsc-dataseed.binance.org" +# testnet +#REACT_APP_CHAIN_ID = "97" +#REACT_APP_NODE_1 = "https://data-seed-prebsc-1-s1.binance.org:8545/" +#REACT_APP_NODE_2 = "https://data-seed-prebsc-2-s1.binance.org:8545/" +#REACT_APP_NODE_3 = "https://data-seed-prebsc-1-s2.binance.org:8545/" diff --git a/.eslintrc b/.eslintrc index f7f79391d..8bb800a30 100644 --- a/.eslintrc +++ b/.eslintrc @@ -24,6 +24,7 @@ "@typescript-eslint/no-use-before-define": 0, "@typescript-eslint/explicit-module-boundary-types": 0, "@typescript-eslint/no-explicit-any": 0, + "@typescript-eslint/no-empty-function": 0, "radix": 0, "import/no-extraneous-dependencies": 0 // End temporary rules diff --git a/package.json b/package.json index 2cd36441a..79b7afca0 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,18 @@ { - "name": "goose-frontend", + "name": "bishares-frontend", "version": "0.1.0", "private": true, "scripts": { + "build": "react-scripts build", "analyze": "source-map-explorer 'build/static/js/*.js'", "start": "react-scripts start", - "build": "react-scripts build", + "build-mainnet": "react-scripts build && rm -rf ../farms-mainnet/* && mv ./build/* ../farms-mainnet/", + "build-testnet": "react-scripts build && rm -rf ../farms-testnet/* && mv ./build/* ../farms-testnet/", "test": "react-scripts test", "eject": "react-scripts eject", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", - "format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'" + "format": "prettier --write 'src/**/*.{js,jsx,ts,tsx}'", + "uikit": "cd ../bishares-uikit && yarn && yarn build && rm -rf ../bishares-frontend-farms/node_modules/@pancakeswap-libs/uikit/dist && cp -Rp ./dist ../bishares-frontend-farms/node_modules/@pancakeswap-libs/uikit/" }, "husky": { "hooks": { @@ -30,10 +33,13 @@ ] }, "dependencies": { + "@apollo/client": "^3.4.9", "@binance-chain/bsc-use-wallet": "^0.8.1", "@crowdin/crowdin-api-client": "^1.10.1", "@ethersproject/abi": "^5.0.7", - "@pancakeswap-libs/uikit": "goosedefi/goose-uikit", + "@material-ui/core": "^4.12.3", + "@material-ui/icons": "^4.11.2", + "@pancakeswap-libs/uikit": "bisharesindexfund/bishares-uikit", "@reduxjs/toolkit": "^1.5.0", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", @@ -41,6 +47,8 @@ "@types/styled-components": "^5.1.7", "bignumber.js": "^9.0.0", "chart.js": "^2.9.4", + "classnames": "^2.3.1", + "graphql": "^15.5.1", "iframe-resizer-react": "^1.1.0", "lodash": "^4.17.20", "react": "^17.0.1", diff --git a/public/404.html b/public/404.html new file mode 100644 index 000000000..83555440a --- /dev/null +++ b/public/404.html @@ -0,0 +1,40 @@ + + + + + Bishares Finance + + + + + diff --git a/public/BiSharesLogo.png b/public/BiSharesLogo.png new file mode 100644 index 000000000..3b00d8498 Binary files /dev/null and b/public/BiSharesLogo.png differ diff --git a/public/Graze-fade.jpg b/public/Graze-fade.jpg new file mode 100644 index 000000000..f7e7684ee Binary files /dev/null and b/public/Graze-fade.jpg differ diff --git a/public/favicon.ico b/public/favicon.ico index f0548dd7b..3d323b3f0 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/i18n/en.json b/public/i18n/en.json index a17008e7a..4b03e9646 100644 --- a/public/i18n/en.json +++ b/public/i18n/en.json @@ -75,7 +75,7 @@ { "data": { "stringId": 304, - "text": "Total EGG burned since launch" + "text": "Total BISON burned since launch" } }, { @@ -123,7 +123,7 @@ { "data": { "stringId": 320, - "text": "Stake LP tokens to earn EGG" + "text": "Stake LP tokens to earn BISON" } }, { @@ -153,7 +153,7 @@ { "data": { "stringId": 334, - "text": "Every time you stake and unstake EGG tokens, the contract will automatically harvest EGG rewards for you!" + "text": "Every time you stake and unstake BISON tokens, the contract will automatically harvest BISON rewards for you!" } }, { @@ -243,7 +243,7 @@ { "data": { "stringId": 380, - "text": "1 EGG = 1 SYRUP" + "text": "1 BISON = 1 SYRUP" } }, { @@ -291,7 +291,7 @@ { "data": { "stringId": 400, - "text": "SYRUP holders proportionally split 25% of EGG block emissions each day (10 EGG per block), Rewards are distributed each block." + "text": "SYRUP holders proportionally split 25% of BISON block emissions each day (10 BISON per block), Rewards are distributed each block." } }, { @@ -315,13 +315,13 @@ { "data": { "stringId": 410, - "text": "End" + "text": "Remaining Blocks" } }, { "data": { "stringId": 412, - "text": "View project site" + "text": "LP Staking" } }, { @@ -351,13 +351,13 @@ { "data": { "stringId": 424, - "text": "%num% EGG" + "text": "%num% BISON" } }, { "data": { "stringId": 426, - "text": "Spend EGG to buy tickets, contributing to the lottery pot. Ticket purchases end approx. 30 minutes before lottery. Win prizes if 2, 3, or 4 of your ticket numbers match the winning numbers and their positions! Good luck!" + "text": "Spend BISON to buy tickets, contributing to the lottery pot. Ticket purchases end approx. 30 minutes before lottery. Win prizes if 2, 3, or 4 of your ticket numbers match the winning numbers and their positions! Good luck!" } }, { @@ -435,19 +435,19 @@ { "data": { "stringId": 454, - "text": "%num% EGG Available" + "text": "%num% BISON Available" } }, { "data": { "stringId": 456, - "text": "Your amount must be a multiple of 10 EGG" + "text": "Your amount must be a multiple of 10 BISON" } }, { "data": { "stringId": 458, - "text": "1 Ticket = 10 EGG" + "text": "1 Ticket = 10 BISON" } }, { @@ -495,7 +495,7 @@ { "data": { "stringId": 478, - "text": "Ticket purchases are final. Your EGG cannot be returned to you after buying tickets." + "text": "Ticket purchases are final. Your BISON cannot be returned to you after buying tickets." } }, { @@ -507,7 +507,7 @@ { "data": { "stringId": 482, - "text": "EGG prizes to be claimed" + "text": "BISON prizes to be claimed" } }, { @@ -543,13 +543,13 @@ { "data": { "stringId": 494, - "text": "Approve EGG" + "text": "Approve BISON" } }, { "data": { "stringId": 496, - "text": "SYRUP holders proportionally split 40% of EGG block emissions each day (10 EGG per block), Rewards are distributed each block." + "text": "SYRUP holders proportionally split 40% of BISON block emissions each day (10 BISON per block), Rewards are distributed each block." } }, { @@ -567,19 +567,19 @@ { "data": { "stringId": 504, - "text": "You\u2019ll pay for the new tokens using EGG-BNB LP tokens, which means you need to stake equal amounts of EGG and BNB in a liquidity pool to take part." + "text": "You\u2019ll pay for the new tokens using BISON-BNB LP tokens, which means you need to stake equal amounts of BISON and BNB in a liquidity pool to take part." } }, { "data": { "stringId": 506, - "text": "Get EGG-BNB LP >" + "text": "Get BISON-BNB LP >" } }, { "data": { "stringId": 508, - "text": "The project gets the BNB, Goose Finance burns the EGG." + "text": "The project gets the BNB, Bishares Finance burns the BISON." } }, { @@ -597,7 +597,7 @@ { "data": { "stringId": 514, - "text": "Launch your project with Goose Finance, Binance Smart Chain\u2019s most-used AMM project and liquidity provider, to bring your token directly to the most active and rapidly growing community on BSC." + "text": "Launch your project with Bishares Finance, Binance Smart Chain\u2019s most-used AMM project and liquidity provider, to bring your token directly to the most active and rapidly growing community on BSC." } }, { @@ -663,7 +663,7 @@ { "data": { "stringId": 540, - "text": "New EGG\/block" + "text": "New BISON\/block" } }, { @@ -675,19 +675,19 @@ { "data": { "stringId": 544, - "text": "EGG to Harvest" + "text": "BISON to Harvest" } }, { "data": { "stringId": 546, - "text": "EGG in Wallet" + "text": "BISON in Wallet" } }, { "data": { "stringId": 548, - "text": "Collecting EGG" + "text": "Collecting BISON" } }, { @@ -699,7 +699,7 @@ { "data": { "stringId": 552, - "text": "EGG to Collect" + "text": "BISON to Collect" } }, { @@ -753,7 +753,7 @@ { "data": { "stringId": 576, - "text": "Goose Finance" + "text": "Bishares Finance" } }, { @@ -765,7 +765,7 @@ { "data": { "stringId": 580, - "text": "Stake EGG to earn new tokens." + "text": "Stake BISON to earn new tokens." } }, { @@ -783,7 +783,7 @@ { "data": { "stringId": 586, - "text": "EGG to burn (USD)" + "text": "BISON to burn (USD)" } }, { @@ -795,7 +795,7 @@ { "data": { "stringId": 590, - "text": "\u2b50\ufe0f Every time you stake and unstake LP tokens, the contract will automatically harvest EGG rewards for you!" + "text": "\u2b50\ufe0f Every time you stake and unstake LP tokens, the contract will automatically harvest BISON rewards for you!" } }, { @@ -813,13 +813,13 @@ { "data": { "stringId": 596, - "text": "Buy EGG and BNB tokens" + "text": "Buy BISON and BNB tokens" } }, { "data": { "stringId": 598, - "text": "Get EGG-BNB LP tokens by adding EGG and BNB liquidity" + "text": "Get BISON-BNB LP tokens by adding BISON and BNB liquidity" } }, { @@ -831,7 +831,7 @@ { "data": { "stringId": 602, - "text": "While the sale is live, commit your EGG-LP tokens to buy the IFO tokens" + "text": "While the sale is live, commit your BISON-LP tokens to buy the IFO tokens" } }, { @@ -867,7 +867,7 @@ { "data": { "stringId": 614, - "text": "Trade in for EGG, or keep for your collection!" + "text": "Trade in for BISON, or keep for your collection!" } }, { @@ -909,7 +909,7 @@ { "data": { "stringId": 628, - "text": "When you trade in this NFT to receive EGG, you will lose access to it forever!" + "text": "When you trade in this NFT to receive BISON, you will lose access to it forever!" } }, { @@ -939,7 +939,7 @@ { "data": { "stringId": 638, - "text": "Winners can trade in their NFTs for a EGG value until the expiry date written below. If you don't trade in your NFT by then, don\u2019t worry: you\u2019ll still keep it in your wallet!" + "text": "Winners can trade in their NFTs for a BISON value until the expiry date written below. If you don't trade in your NFT by then, don\u2019t worry: you\u2019ll still keep it in your wallet!" } }, { @@ -981,7 +981,7 @@ { "data": { "stringId": 654, - "text": "Trade in for EGG" + "text": "Trade in for BISON" } }, { @@ -1107,7 +1107,7 @@ { "data": { "stringId": 696, - "text": "Stake LP tokens to earn EGG" + "text": "Stake LP tokens to earn BISON" } }, { @@ -1149,13 +1149,13 @@ { "data": { "stringId": 708, - "text": "The EGG Lottery" + "text": "The BISON Lottery" } }, { "data": { "stringId": 710, - "text": "Buy tickets with EGG" + "text": "Buy tickets with BISON" } }, { @@ -1209,7 +1209,7 @@ { "data": { "stringId": 10000, - "text": "Deposit Fee will be used to buyback EGG" + "text": "Deposit Fee will be used to buyback BISON" } }, { @@ -1221,7 +1221,7 @@ { "data": { "stringId": 10002, - "text": "Stake tokens to earn EGG" + "text": "Stake tokens to earn BISON" } }, { diff --git a/public/i18n/zh-CN.json b/public/i18n/zh-CN.json index a3cf265ae..b3aff1482 100644 --- a/public/i18n/zh-CN.json +++ b/public/i18n/zh-CN.json @@ -75,7 +75,7 @@ { "data": { "stringId": 304, - "text": "\u81ea\u53d1\u8d77\u4ee5\u6765\u7684 EGG \u603b\u711a\u6bc1\u91cf" + "text": "\u81ea\u53d1\u8d77\u4ee5\u6765\u7684 BISON \u603b\u711a\u6bc1\u91cf" } }, { @@ -123,13 +123,13 @@ { "data": { "stringId": 320, - "text": "\u8d28\u62bc LP \u4ee3\u5e01\u4ee5\u5806\u53e0 EGG" + "text": "\u8d28\u62bc LP \u4ee3\u5e01\u4ee5\u5806\u53e0 BISON" } }, { "data": { "stringId": 322, - "text": "\u8d28\u62bc EGG\uff0c\u83b7\u53d6 SYRUP\u3002" + "text": "\u8d28\u62bc BISON\uff0c\u83b7\u53d6 SYRUP\u3002" } }, { @@ -153,7 +153,7 @@ { "data": { "stringId": 334, - "text": "\u6bcf\u6b21\u60a8\u8d28\u62bc\u4e0e\u53d6\u6d88\u8d28\u62bc EGG \u4ee3\u5e01\u65f6\uff0c\u5408\u7ea6\u90fd\u4f1a\u81ea\u52a8\u4e3a\u60a8\u6536\u5272 EGG \u5956\u52b1\uff01" + "text": "\u6bcf\u6b21\u60a8\u8d28\u62bc\u4e0e\u53d6\u6d88\u8d28\u62bc BISON \u4ee3\u5e01\u65f6\uff0c\u5408\u7ea6\u90fd\u4f1a\u81ea\u52a8\u4e3a\u60a8\u6536\u5272 BISON \u5956\u52b1\uff01" } }, { @@ -219,7 +219,7 @@ { "data": { "stringId": 358, - "text": "EGG \u4ef7\u683c" + "text": "BISON \u4ef7\u683c" } }, { @@ -243,7 +243,7 @@ { "data": { "stringId": 380, - "text": "1 EGG = 1 SYRUP" + "text": "1 BISON = 1 SYRUP" } }, { @@ -291,7 +291,7 @@ { "data": { "stringId": 400, - "text": "SYRUP \u6301\u6709\u8005\u6bcf\u5929\u5c06\u6309\u6bd4\u4f8b\u5206\u4eab EGG \u533a\u5757\u5956\u52b1\u7684 25%\uff08\u6bcf\u4e2a\u533a\u5757 10 EGG\uff09\uff0c\u5956\u52b1\u6309\u533a\u5757\u5206\u53d1\u3002" + "text": "SYRUP \u6301\u6709\u8005\u6bcf\u5929\u5c06\u6309\u6bd4\u4f8b\u5206\u4eab BISON \u533a\u5757\u5956\u52b1\u7684 25%\uff08\u6bcf\u4e2a\u533a\u5757 10 BISON\uff09\uff0c\u5956\u52b1\u6309\u533a\u5757\u5206\u53d1\u3002" } }, { @@ -351,13 +351,13 @@ { "data": { "stringId": 424, - "text": "%num% EGG" + "text": "%num% BISON" } }, { "data": { "stringId": 426, - "text": "\u82b1\u8d39 EGG \u8d2d\u4e70\u5f69\u7968\uff0c\u4e3a\u5956\u6c60\u505a\u8d21\u732e\u3002\u5f69\u7968\u8d2d\u4e70\u5728\u5f00\u5956\u524d\u7ea6 30 \u5206\u949f\u7ed3\u675f\u3002\u5982\u679c\u60a8\u7684\u5f69\u7968\u4e2d\u4e86 2\u30013 \u6216 4 \u4e2a\u53f7\u7801\u4e14\u987a\u5e8f\u4e00\u81f4\uff0c\u5219\u4f1a\u8d62\u53d6\u5956\u91d1\uff01\u795d\u60a8\u597d\u8fd0\uff01" + "text": "\u82b1\u8d39 BISON \u8d2d\u4e70\u5f69\u7968\uff0c\u4e3a\u5956\u6c60\u505a\u8d21\u732e\u3002\u5f69\u7968\u8d2d\u4e70\u5728\u5f00\u5956\u524d\u7ea6 30 \u5206\u949f\u7ed3\u675f\u3002\u5982\u679c\u60a8\u7684\u5f69\u7968\u4e2d\u4e86 2\u30013 \u6216 4 \u4e2a\u53f7\u7801\u4e14\u987a\u5e8f\u4e00\u81f4\uff0c\u5219\u4f1a\u8d62\u53d6\u5956\u91d1\uff01\u795d\u60a8\u597d\u8fd0\uff01" } }, { @@ -435,25 +435,25 @@ { "data": { "stringId": 454, - "text": "%num% EGG \u53ef\u7528" + "text": "%num% BISON \u53ef\u7528" } }, { "data": { "stringId": 456, - "text": "\u60a8\u7684\u91d1\u989d\u5fc5\u987b\u7b49\u4e8e 10 EGG \u7684\u500d\u6570" + "text": "\u60a8\u7684\u91d1\u989d\u5fc5\u987b\u7b49\u4e8e 10 BISON \u7684\u500d\u6570" } }, { "data": { "stringId": 458, - "text": "1 \u5f20\u5f69\u7968 = 10 EGG" + "text": "1 \u5f20\u5f69\u7968 = 10 BISON" } }, { "data": { "stringId": 460, - "text": "\u60a8\u5c06\u82b1\u8d39\uff1a%num% EGG" + "text": "\u60a8\u5c06\u82b1\u8d39\uff1a%num% BISON" } }, { @@ -483,7 +483,7 @@ { "data": { "stringId": 470, - "text": "\u5728\u60a8\u82b1\u8d39 EGG \u8d2d\u4e70\u5f69\u7968\u540e\uff0c\u65e0\u6cd5\u5c06 EGG \u9000\u8fd8\u7ed9\u60a8\u3002" + "text": "\u5728\u60a8\u82b1\u8d39 BISON \u8d2d\u4e70\u5f69\u7968\u540e\uff0c\u65e0\u6cd5\u5c06 BISON \u9000\u8fd8\u7ed9\u60a8\u3002" } }, { @@ -507,7 +507,7 @@ { "data": { "stringId": 478, - "text": "\u5f69\u7968\u8d2d\u4e70\u4e3a\u6700\u7ec8\u72b6\u6001\u3002\u8d2d\u4e70\u5f69\u7968\u540e\uff0c\u65e0\u6cd5\u5c06 EGG \u9000\u8fd8\u7ed9\u60a8\u3002" + "text": "\u5f69\u7968\u8d2d\u4e70\u4e3a\u6700\u7ec8\u72b6\u6001\u3002\u8d2d\u4e70\u5f69\u7968\u540e\uff0c\u65e0\u6cd5\u5c06 BISON \u9000\u8fd8\u7ed9\u60a8\u3002" } }, { @@ -519,7 +519,7 @@ { "data": { "stringId": 482, - "text": "\u5f85\u9886\u53d6\u7684 EGG \u5956\u91d1" + "text": "\u5f85\u9886\u53d6\u7684 BISON \u5956\u91d1" } }, { @@ -555,13 +555,13 @@ { "data": { "stringId": 494, - "text": "\u6279\u51c6 EGG" + "text": "\u6279\u51c6 BISON" } }, { "data": { "stringId": 496, - "text": "SYRUP \u6301\u6709\u8005\u6bcf\u5929\u5c06\u6309\u6bd4\u4f8b\u5206\u4eab EGG \u533a\u5757\u5956\u52b1\u7684 40%\uff08\u6bcf\u4e2a\u533a\u5757 10 EGG\uff09\uff0c\u5956\u52b1\u6309\u533a\u5757\u5206\u53d1\u3002" + "text": "SYRUP \u6301\u6709\u8005\u6bcf\u5929\u5c06\u6309\u6bd4\u4f8b\u5206\u4eab BISON \u533a\u5757\u5956\u52b1\u7684 40%\uff08\u6bcf\u4e2a\u533a\u5757 10 BISON\uff09\uff0c\u5956\u52b1\u6309\u533a\u5757\u5206\u53d1\u3002" } }, { @@ -579,19 +579,19 @@ { "data": { "stringId": 504, - "text": "\u60a8\u5c06\u4f7f\u7528 EGG-BNB LP \u4ee3\u5e01\u6765\u652f\u4ed8\u65b0\u4ee3\u5e01\u7684\u8d39\u7528\uff0c\u8fd9\u610f\u5473\u7740\u60a8\u9700\u8981\u5728\u6d41\u52a8\u6027\u8d44\u91d1\u6c60\u4e2d\u8d28\u62bc\u7b49\u91cf\u7684 EGG \u548c BNB \u624d\u80fd\u53c2\u4e0e\u3002" + "text": "\u60a8\u5c06\u4f7f\u7528 BISON-BNB LP \u4ee3\u5e01\u6765\u652f\u4ed8\u65b0\u4ee3\u5e01\u7684\u8d39\u7528\uff0c\u8fd9\u610f\u5473\u7740\u60a8\u9700\u8981\u5728\u6d41\u52a8\u6027\u8d44\u91d1\u6c60\u4e2d\u8d28\u62bc\u7b49\u91cf\u7684 BISON \u548c BNB \u624d\u80fd\u53c2\u4e0e\u3002" } }, { "data": { "stringId": 506, - "text": "\u83b7\u53d6 EGG-BNB LP >" + "text": "\u83b7\u53d6 BISON-BNB LP >" } }, { "data": { "stringId": 508, - "text": "\u6b64\u9879\u76ee\u83b7\u5f97\u4e86 BNB\uff0cGoose Finance \u4f1a\u711a\u6bc1 EGG\u3002" + "text": "\u6b64\u9879\u76ee\u83b7\u5f97\u4e86 BNB\uff0cBishares Finance \u4f1a\u711a\u6bc1 BISON\u3002" } }, { @@ -609,7 +609,7 @@ { "data": { "stringId": 514, - "text": "\u901a\u8fc7 Binance Smart Chain \u4e0a\u6700\u5e38\u7528\u7684 AMM \u9879\u76ee\u548c\u6d41\u52a8\u6027\u4f9b\u5e94\u5546 Goose Finance \u53d1\u8d77\u60a8\u7684\u9879\u76ee\uff0c\u5c06\u60a8\u7684\u4ee3\u5e01\u76f4\u63a5\u5f15\u5165 BSC \u4e0a\u6700\u6d3b\u8dc3\u4e14\u5feb\u901f\u53d1\u5c55\u7684\u793e\u533a\u3002" + "text": "\u901a\u8fc7 Binance Smart Chain \u4e0a\u6700\u5e38\u7528\u7684 AMM \u9879\u76ee\u548c\u6d41\u52a8\u6027\u4f9b\u5e94\u5546 Bishares Finance \u53d1\u8d77\u60a8\u7684\u9879\u76ee\uff0c\u5c06\u60a8\u7684\u4ee3\u5e01\u76f4\u63a5\u5f15\u5165 BSC \u4e0a\u6700\u6d3b\u8dc3\u4e14\u5feb\u901f\u53d1\u5c55\u7684\u793e\u533a\u3002" } }, { @@ -657,7 +657,7 @@ { "data": { "stringId": 534, - "text": "EGG \u7edf\u8ba1\u6570\u636e" + "text": "BISON \u7edf\u8ba1\u6570\u636e" } }, { @@ -675,7 +675,7 @@ { "data": { "stringId": 540, - "text": "\u65b0 EGG\/\u533a\u5757" + "text": "\u65b0 BISON\/\u533a\u5757" } }, { @@ -687,19 +687,19 @@ { "data": { "stringId": 544, - "text": "\u5f85\u6536\u5272\u7684 EGG" + "text": "\u5f85\u6536\u5272\u7684 BISON" } }, { "data": { "stringId": 546, - "text": "\u94b1\u5305\u4e2d\u7684 EGG" + "text": "\u94b1\u5305\u4e2d\u7684 BISON" } }, { "data": { "stringId": 548, - "text": "\u6b63\u5728\u6536\u96c6 EGG" + "text": "\u6b63\u5728\u6536\u96c6 BISON" } }, { @@ -711,7 +711,7 @@ { "data": { "stringId": 552, - "text": "\u5f85\u6536\u96c6\u7684 EGG" + "text": "\u5f85\u6536\u96c6\u7684 BISON" } }, { @@ -765,7 +765,7 @@ { "data": { "stringId": 576, - "text": "Goose Finance" + "text": "Bishares Finance" } }, { @@ -777,7 +777,7 @@ { "data": { "stringId": 580, - "text": "\u8d28\u62bc EGG \u4ee5\u8d5a\u53d6\u65b0\u4ee3\u5e01\u3002" + "text": "\u8d28\u62bc BISON \u4ee5\u8d5a\u53d6\u65b0\u4ee3\u5e01\u3002" } }, { @@ -795,7 +795,7 @@ { "data": { "stringId": 586, - "text": "\u5c06\u711a\u6bc1\u7684 EGG (USD)" + "text": "\u5c06\u711a\u6bc1\u7684 BISON (USD)" } }, { @@ -807,7 +807,7 @@ { "data": { "stringId": 590, - "text": "\u2b50\ufe0f \u6bcf\u6b21\u60a8\u8d28\u62bc\u548c\u53d6\u6d88\u8d28\u62bc LP \u4ee3\u5e01\u65f6\uff0c\u5408\u7ea6\u90fd\u4f1a\u81ea\u52a8\u4e3a\u60a8\u6536\u5272 EGG \u5956\u52b1\uff01" + "text": "\u2b50\ufe0f \u6bcf\u6b21\u60a8\u8d28\u62bc\u548c\u53d6\u6d88\u8d28\u62bc LP \u4ee3\u5e01\u65f6\uff0c\u5408\u7ea6\u90fd\u4f1a\u81ea\u52a8\u4e3a\u60a8\u6536\u5272 BISON \u5956\u52b1\uff01" } }, { @@ -825,13 +825,13 @@ { "data": { "stringId": 596, - "text": "\u8d2d\u4e70 EGG \u548c BNB \u4ee3\u5e01" + "text": "\u8d2d\u4e70 BISON \u548c BNB \u4ee3\u5e01" } }, { "data": { "stringId": 598, - "text": "\u901a\u8fc7\u6dfb\u52a0 EGG \u548c BNB \u6d41\u52a8\u6027\u83b7\u53d6 EGG-BNB LP \u4ee3\u5e01" + "text": "\u901a\u8fc7\u6dfb\u52a0 BISON \u548c BNB \u6d41\u52a8\u6027\u83b7\u53d6 BISON-BNB LP \u4ee3\u5e01" } }, { @@ -843,7 +843,7 @@ { "data": { "stringId": 602, - "text": "\u5728\u9500\u552e\u8fc7\u7a0b\u4e2d\uff0c\u63d0\u4ea4\u60a8\u7684 EGG-LP \u4ee3\u5e01\u6765\u8d2d\u4e70 IFO \u4ee3\u5e01" + "text": "\u5728\u9500\u552e\u8fc7\u7a0b\u4e2d\uff0c\u63d0\u4ea4\u60a8\u7684 BISON-LP \u4ee3\u5e01\u6765\u8d2d\u4e70 IFO \u4ee3\u5e01" } }, { @@ -879,7 +879,7 @@ { "data": { "stringId": 614, - "text": "\u5151\u6362\u6210 EGG\uff0c\u6216\u8005\u4fdd\u7559\u4f5c\u4e3a\u60a8\u7684\u6536\u85cf\u54c1\uff01" + "text": "\u5151\u6362\u6210 BISON\uff0c\u6216\u8005\u4fdd\u7559\u4f5c\u4e3a\u60a8\u7684\u6536\u85cf\u54c1\uff01" } }, { @@ -921,7 +921,7 @@ { "data": { "stringId": 628, - "text": "\u5f53\u60a8\u5c06 NFT \u5151\u6362\u6210 EGG \u540e\uff0c\u60a8\u5c06\u6c38\u8fdc\u65e0\u6cd5\u8bbf\u95ee\u5b83\uff01" + "text": "\u5f53\u60a8\u5c06 NFT \u5151\u6362\u6210 BISON \u540e\uff0c\u60a8\u5c06\u6c38\u8fdc\u65e0\u6cd5\u8bbf\u95ee\u5b83\uff01" } }, { @@ -951,7 +951,7 @@ { "data": { "stringId": 638, - "text": "\u5728\u4e0b\u9762\u5217\u51fa\u7684\u5230\u671f\u65e5\u4e4b\u524d\uff0c\u83b7\u80dc\u8005\u53ef\u4ee5\u5c06\u5176 NFT \u5151\u6362\u6210 EGG \u4ef7\u503c\u3002\u5982\u679c\u60a8\u5c4a\u65f6\u672a\u5151\u6362\u60a8\u7684 NFT\uff0c\u8bf7\u4e0d\u8981\u62c5\u5fc3\uff1a\u60a8\u4ecd\u53ef\u4ee5\u5c06\u5176\u4fdd\u5b58\u5728\u94b1\u5305\u4e2d\uff01" + "text": "\u5728\u4e0b\u9762\u5217\u51fa\u7684\u5230\u671f\u65e5\u4e4b\u524d\uff0c\u83b7\u80dc\u8005\u53ef\u4ee5\u5c06\u5176 NFT \u5151\u6362\u6210 BISON \u4ef7\u503c\u3002\u5982\u679c\u60a8\u5c4a\u65f6\u672a\u5151\u6362\u60a8\u7684 NFT\uff0c\u8bf7\u4e0d\u8981\u62c5\u5fc3\uff1a\u60a8\u4ecd\u53ef\u4ee5\u5c06\u5176\u4fdd\u5b58\u5728\u94b1\u5305\u4e2d\uff01" } }, { @@ -993,7 +993,7 @@ { "data": { "stringId": 654, - "text": "\u5151\u6362\u6210 EGG" + "text": "\u5151\u6362\u6210 BISON" } }, { @@ -1119,7 +1119,7 @@ { "data": { "stringId": 696, - "text": "\u8d28\u62bc LP \u4ee3\u5e01\u4ee5\u8d5a\u53d6 EGG" + "text": "\u8d28\u62bc LP \u4ee3\u5e01\u4ee5\u8d5a\u53d6 BISON" } }, { @@ -1161,13 +1161,13 @@ { "data": { "stringId": 708, - "text": "EGG \u5f69\u7968" + "text": "BISON \u5f69\u7968" } }, { "data": { "stringId": 710, - "text": "\u4f7f\u7528 EGG \u8d2d\u4e70\u5f69\u7968" + "text": "\u4f7f\u7528 BISON \u8d2d\u4e70\u5f69\u7968" } }, { @@ -1209,7 +1209,7 @@ { "data": { "stringId": 10000, - "text": "质押费用将用于回购 EGG" + "text": "质押费用将用于回购 BISON" } }, { @@ -1221,7 +1221,7 @@ { "data": { "stringId": 10002, - "text": "质押代币以堆叠 EGG" + "text": "质押代币以堆叠 BISON" } }, { diff --git a/public/i18n/zh-TW.json b/public/i18n/zh-TW.json index f3cdcf791..b0065682e 100644 --- a/public/i18n/zh-TW.json +++ b/public/i18n/zh-TW.json @@ -75,7 +75,7 @@ { "data": { "stringId": 304, - "text": "\u81ea\u767c\u8d77\u8fc4\u4eca\uff0cEGG \u7684\u7e3d\u92b7\u6bc0\u91cf" + "text": "\u81ea\u767c\u8d77\u8fc4\u4eca\uff0cBISON \u7684\u7e3d\u92b7\u6bc0\u91cf" } }, { @@ -123,7 +123,7 @@ { "data": { "stringId": 320, - "text": "\u8cea\u62bc LP \u4ee3\u5e63\u4ee5\u5806\u758a EGG" + "text": "\u8cea\u62bc LP \u4ee3\u5e63\u4ee5\u5806\u758a BISON" } }, { @@ -153,7 +153,7 @@ { "data": { "stringId": 334, - "text": "\u6bcf\u7576\u60a8\u8cea\u62bc\u8207\u53d6\u56de EGG \u4ee3\u5e63\u6642\uff0c\u5408\u7d04\u90fd\u5c07\u81ea\u52d5\u70ba\u60a8\u6536\u5272 EGG \u734e\u52f5\uff01" + "text": "\u6bcf\u7576\u60a8\u8cea\u62bc\u8207\u53d6\u56de BISON \u4ee3\u5e63\u6642\uff0c\u5408\u7d04\u90fd\u5c07\u81ea\u52d5\u70ba\u60a8\u6536\u5272 BISON \u734e\u52f5\uff01" } }, { @@ -219,7 +219,7 @@ { "data": { "stringId": 358, - "text": "EGG \u50f9\u683c" + "text": "BISON \u50f9\u683c" } }, { @@ -243,7 +243,7 @@ { "data": { "stringId": 380, - "text": "1 EGG = 1 SYRUP" + "text": "1 BISON = 1 SYRUP" } }, { @@ -291,7 +291,7 @@ { "data": { "stringId": 400, - "text": "SYRUP \u6301\u6709\u8005\u5c07\u6309\u6bd4\u4f8b\u5206\u5f97\u6bcf\u5929 25% \u7684 EGG \u5340\u584a\u734e\u52f5 (\u6bcf\u5340\u584a 10 EGG)\uff0c\u734e\u52f5\u5c07\u65bc\u5404\u5340\u584a\u5206\u767c\u3002" + "text": "SYRUP \u6301\u6709\u8005\u5c07\u6309\u6bd4\u4f8b\u5206\u5f97\u6bcf\u5929 25% \u7684 BISON \u5340\u584a\u734e\u52f5 (\u6bcf\u5340\u584a 10 BISON)\uff0c\u734e\u52f5\u5c07\u65bc\u5404\u5340\u584a\u5206\u767c\u3002" } }, { @@ -351,13 +351,13 @@ { "data": { "stringId": 424, - "text": "%num% EGG" + "text": "%num% BISON" } }, { "data": { "stringId": 426, - "text": "\u82b1\u8cbb EGG \u4f86\u8cfc\u8cb7\u7968\u5238\uff0c\u70ba\u5f69\u5238\u734e\u6c60\u505a\u51fa\u8ca2\u737b\u3002\u7968\u5238\u8cfc\u8cb7\u5728\u958b\u734e\u524d\u7d04 30 \u5206\u9418\u7d50\u675f\u3002\u5982\u679c\u60a8\u7684\u5f69\u5238\u51fa\u73fe 2\u30013 \u6216 4 \u500b\u4e2d\u734e\u865f\u78bc\u4e14\u90e8\u4f4d\u76f8\u7b26\uff0c\u5c31\u80fd\u8d0f\u53d6\u734e\u91d1\uff01\u795d\u60a8\u597d\u904b\uff01" + "text": "\u82b1\u8cbb BISON \u4f86\u8cfc\u8cb7\u7968\u5238\uff0c\u70ba\u5f69\u5238\u734e\u6c60\u505a\u51fa\u8ca2\u737b\u3002\u7968\u5238\u8cfc\u8cb7\u5728\u958b\u734e\u524d\u7d04 30 \u5206\u9418\u7d50\u675f\u3002\u5982\u679c\u60a8\u7684\u5f69\u5238\u51fa\u73fe 2\u30013 \u6216 4 \u500b\u4e2d\u734e\u865f\u78bc\u4e14\u90e8\u4f4d\u76f8\u7b26\uff0c\u5c31\u80fd\u8d0f\u53d6\u734e\u91d1\uff01\u795d\u60a8\u597d\u904b\uff01" } }, { @@ -435,25 +435,25 @@ { "data": { "stringId": 454, - "text": "%num% EGG \u53ef\u7528" + "text": "%num% BISON \u53ef\u7528" } }, { "data": { "stringId": 456, - "text": "EGG \u7684\u6578\u91cf\u9700\u70ba 10 \u7684\u500d\u6578" + "text": "BISON \u7684\u6578\u91cf\u9700\u70ba 10 \u7684\u500d\u6578" } }, { "data": { "stringId": 458, - "text": "1 \u5f35\u7968\u5238 = 10 EGG" + "text": "1 \u5f35\u7968\u5238 = 10 BISON" } }, { "data": { "stringId": 460, - "text": "\u60a8\u5c07\u82b1\u8cbb\uff1a%num% EGG" + "text": "\u60a8\u5c07\u82b1\u8cbb\uff1a%num% BISON" } }, { @@ -483,7 +483,7 @@ { "data": { "stringId": 470, - "text": "EGG \u7d93\u60a8\u82b1\u8cbb\u65bc\u8cfc\u8cb7\u7968\u5238\u5f8c\uff0c\u5373\u7121\u6cd5\u518d\u9000\u9084\u7d66\u60a8\u3002" + "text": "BISON \u7d93\u60a8\u82b1\u8cbb\u65bc\u8cfc\u8cb7\u7968\u5238\u5f8c\uff0c\u5373\u7121\u6cd5\u518d\u9000\u9084\u7d66\u60a8\u3002" } }, { @@ -507,7 +507,7 @@ { "data": { "stringId": 478, - "text": "\u7968\u5238\u8cfc\u8cb7\u5373\u6700\u7d42\u72c0\u614b\u3002EGG \u7528\u65bc\u8cfc\u8cb7\u7968\u5238\u5f8c\uff0c\u5373\u7121\u6cd5\u518d\u9000\u9084\u7d66\u60a8\u3002" + "text": "\u7968\u5238\u8cfc\u8cb7\u5373\u6700\u7d42\u72c0\u614b\u3002BISON \u7528\u65bc\u8cfc\u8cb7\u7968\u5238\u5f8c\uff0c\u5373\u7121\u6cd5\u518d\u9000\u9084\u7d66\u60a8\u3002" } }, { @@ -519,7 +519,7 @@ { "data": { "stringId": 482, - "text": "\u5f85\u9818\u53d6\u7684 EGG \u734e\u91d1" + "text": "\u5f85\u9818\u53d6\u7684 BISON \u734e\u91d1" } }, { @@ -555,13 +555,13 @@ { "data": { "stringId": 494, - "text": "\u6279\u51c6 EGG" + "text": "\u6279\u51c6 BISON" } }, { "data": { "stringId": 496, - "text": "SYRUP \u6301\u6709\u8005\u5c07\u6309\u6bd4\u4f8b\u5206\u5f97\u6bcf\u5929 40% \u7684 EGG \u5340\u584a\u734e\u52f5 (\u6bcf\u5340\u584a 10 EGG)\uff0c\u734e\u52f5\u5c07\u65bc\u5404\u5340\u584a\u5206\u767c\u3002" + "text": "SYRUP \u6301\u6709\u8005\u5c07\u6309\u6bd4\u4f8b\u5206\u5f97\u6bcf\u5929 40% \u7684 BISON \u5340\u584a\u734e\u52f5 (\u6bcf\u5340\u584a 10 BISON)\uff0c\u734e\u52f5\u5c07\u65bc\u5404\u5340\u584a\u5206\u767c\u3002" } }, { @@ -579,19 +579,19 @@ { "data": { "stringId": 504, - "text": "\u60a8\u5c07\u4f7f\u7528 EGG-BNB LP \u4ee3\u5e63\u4f86\u652f\u4ed8\u65b0\u4ee3\u5e63\uff0c\u9019\u8868\u793a\u60a8\u9700\u8981\u5728\u6d41\u52d5\u6027\u8cc7\u91d1\u6c60\u4e2d\u8cea\u62bc\u7b49\u91cf\u7684 EGG \u548c BNB \u624d\u80fd\u53c3\u8207\u3002" + "text": "\u60a8\u5c07\u4f7f\u7528 BISON-BNB LP \u4ee3\u5e63\u4f86\u652f\u4ed8\u65b0\u4ee3\u5e63\uff0c\u9019\u8868\u793a\u60a8\u9700\u8981\u5728\u6d41\u52d5\u6027\u8cc7\u91d1\u6c60\u4e2d\u8cea\u62bc\u7b49\u91cf\u7684 BISON \u548c BNB \u624d\u80fd\u53c3\u8207\u3002" } }, { "data": { "stringId": 506, - "text": "\u53d6\u5f97 EGG-BNB LP >" + "text": "\u53d6\u5f97 BISON-BNB LP >" } }, { "data": { "stringId": 508, - "text": "\u5c08\u6848\u53d6\u5f97 BNB \u5f8c\uff0c\u800c Goose Finance \u92b7\u6bc0 EGG\u3002" + "text": "\u5c08\u6848\u53d6\u5f97 BNB \u5f8c\uff0c\u800c Bishares Finance \u92b7\u6bc0 BISON\u3002" } }, { @@ -609,7 +609,7 @@ { "data": { "stringId": 514, - "text": "\u900f\u904e\u5e63\u5b89\u667a\u80fd\u93c8\u4e0a\u6700\u5e38\u7528\u7684 AMM \u5c08\u6848\u548c\u6d41\u52d5\u6027\u63d0\u4f9b\u5546 Goose Finance \u4f86\u767c\u8d77\u60a8\u7684\u5c08\u6848\uff0c\u5c07\u60a8\u7684\u4ee3\u5e63\u76f4\u63a5\u5f15\u5165 BSC \u4e0a\u6700\u6d3b\u8e8d\u4e14\u767c\u5c55\u5feb\u901f\u7684\u793e\u7fa4\u3002" + "text": "\u900f\u904e\u5e63\u5b89\u667a\u80fd\u93c8\u4e0a\u6700\u5e38\u7528\u7684 AMM \u5c08\u6848\u548c\u6d41\u52d5\u6027\u63d0\u4f9b\u5546 Bishares Finance \u4f86\u767c\u8d77\u60a8\u7684\u5c08\u6848\uff0c\u5c07\u60a8\u7684\u4ee3\u5e63\u76f4\u63a5\u5f15\u5165 BSC \u4e0a\u6700\u6d3b\u8e8d\u4e14\u767c\u5c55\u5feb\u901f\u7684\u793e\u7fa4\u3002" } }, { @@ -675,7 +675,7 @@ { "data": { "stringId": 540, - "text": "\u65b0 EGG\/\u5340\u584a" + "text": "\u65b0 BISON\/\u5340\u584a" } }, { @@ -687,19 +687,19 @@ { "data": { "stringId": 544, - "text": "\u5f85\u6536\u5272\u7684 EGG" + "text": "\u5f85\u6536\u5272\u7684 BISON" } }, { "data": { "stringId": 546, - "text": "\u9322\u5305\u4e2d\u7684 EGG" + "text": "\u9322\u5305\u4e2d\u7684 BISON" } }, { "data": { "stringId": 548, - "text": "\u6b63\u5728\u6536\u96c6 EGG" + "text": "\u6b63\u5728\u6536\u96c6 BISON" } }, { @@ -711,7 +711,7 @@ { "data": { "stringId": 552, - "text": "\u5f85\u6536\u96c6\u7684 EGG" + "text": "\u5f85\u6536\u96c6\u7684 BISON" } }, { @@ -765,7 +765,7 @@ { "data": { "stringId": 576, - "text": "Goose Finance" + "text": "Bishares Finance" } }, { @@ -777,7 +777,7 @@ { "data": { "stringId": 580, - "text": "\u8cea\u62bc EGG \u4ee5\u8cfa\u53d6\u65b0\u4ee3\u5e63\u3002" + "text": "\u8cea\u62bc BISON \u4ee5\u8cfa\u53d6\u65b0\u4ee3\u5e63\u3002" } }, { @@ -795,7 +795,7 @@ { "data": { "stringId": 586, - "text": "\u5c07\u92b7\u6bc0\u7684 EGG (USD)" + "text": "\u5c07\u92b7\u6bc0\u7684 BISON (USD)" } }, { @@ -807,7 +807,7 @@ { "data": { "stringId": 590, - "text": "\u2b50\ufe0f \u6bcf\u7576\u60a8\u8cea\u62bc\u548c\u53d6\u56de LP \u4ee3\u5e63\u6642\uff0c\u5408\u7d04\u90fd\u6703\u81ea\u52d5\u70ba\u60a8\u6536\u5272 EGG \u734e\u52f5\uff01" + "text": "\u2b50\ufe0f \u6bcf\u7576\u60a8\u8cea\u62bc\u548c\u53d6\u56de LP \u4ee3\u5e63\u6642\uff0c\u5408\u7d04\u90fd\u6703\u81ea\u52d5\u70ba\u60a8\u6536\u5272 BISON \u734e\u52f5\uff01" } }, { @@ -825,13 +825,13 @@ { "data": { "stringId": 596, - "text": "\u8cfc\u8cb7 EGG \u548c BNB \u4ee3\u5e63" + "text": "\u8cfc\u8cb7 BISON \u548c BNB \u4ee3\u5e63" } }, { "data": { "stringId": 598, - "text": "\u589e\u52a0 EGG \u548c BNB \u6d41\u52d5\u6027\uff0c\u5f9e\u800c\u53d6\u5f97 EGG-BNB LP \u4ee3\u5e63" + "text": "\u589e\u52a0 BISON \u548c BNB \u6d41\u52d5\u6027\uff0c\u5f9e\u800c\u53d6\u5f97 BISON-BNB LP \u4ee3\u5e63" } }, { @@ -843,7 +843,7 @@ { "data": { "stringId": 602, - "text": "\u5728\u92b7\u552e\u904e\u7a0b\u4e2d\uff0c\u63d0\u4ea4\u60a8\u7684 EGG-LP \u4ee3\u5e63\u4f86\u8cfc\u8cb7 IFO \u4ee3\u5e63" + "text": "\u5728\u92b7\u552e\u904e\u7a0b\u4e2d\uff0c\u63d0\u4ea4\u60a8\u7684 BISON-LP \u4ee3\u5e63\u4f86\u8cfc\u8cb7 IFO \u4ee3\u5e63" } }, { @@ -879,7 +879,7 @@ { "data": { "stringId": 614, - "text": "\u7576\u5834\u4ea4\u6613\u6210 EGG\uff0c\u6216\u4f5c\u70ba\u6536\u85cf\u54c1\u800c\u4fdd\u7559\uff01" + "text": "\u7576\u5834\u4ea4\u6613\u6210 BISON\uff0c\u6216\u4f5c\u70ba\u6536\u85cf\u54c1\u800c\u4fdd\u7559\uff01" } }, { @@ -921,7 +921,7 @@ { "data": { "stringId": 628, - "text": "\u82e5\u60a8\u5c07 EGG \u7576\u5834\u4ea4\u6613\u6210 NFT \u4f86\u63a5\u6536\uff0c\u60a8\u4fbf\u6c38\u9060\u7121\u6cd5\u5b58\u53d6\u8a72 EGG\uff01" + "text": "\u82e5\u60a8\u5c07 BISON \u7576\u5834\u4ea4\u6613\u6210 NFT \u4f86\u63a5\u6536\uff0c\u60a8\u4fbf\u6c38\u9060\u7121\u6cd5\u5b58\u53d6\u8a72 BISON\uff01" } }, { @@ -951,7 +951,7 @@ { "data": { "stringId": 638, - "text": "\u7372\u52dd\u8005\u53ef\u4ee5\u5c07\u5176 NFT \u7576\u5834\u4ea4\u6613\u6210 EGG \u50f9\u503c\uff0c\u76f4\u5230\u4e0b\u8ff0\u7684\u5230\u671f\u65e5\u70ba\u6b62\u3002\u5982\u679c\u5230\u90a3\u6642\u60a8\u4ecd\u672a\u514c\u63db\u60a8\u7684 NFT\uff0c\u8acb\u4e0d\u8981\u64d4\u5fc3\uff0c\u60a8\u4ecd\u53ef\u4ee5\u5c07\u5176\u5132\u5b58\u5728\u9322\u5305\u4e2d\uff01" + "text": "\u7372\u52dd\u8005\u53ef\u4ee5\u5c07\u5176 NFT \u7576\u5834\u4ea4\u6613\u6210 BISON \u50f9\u503c\uff0c\u76f4\u5230\u4e0b\u8ff0\u7684\u5230\u671f\u65e5\u70ba\u6b62\u3002\u5982\u679c\u5230\u90a3\u6642\u60a8\u4ecd\u672a\u514c\u63db\u60a8\u7684 NFT\uff0c\u8acb\u4e0d\u8981\u64d4\u5fc3\uff0c\u60a8\u4ecd\u53ef\u4ee5\u5c07\u5176\u5132\u5b58\u5728\u9322\u5305\u4e2d\uff01" } }, { @@ -993,7 +993,7 @@ { "data": { "stringId": 654, - "text": "\u7576\u5834\u4ea4\u6613\u6210 EGG" + "text": "\u7576\u5834\u4ea4\u6613\u6210 BISON" } }, { @@ -1119,7 +1119,7 @@ { "data": { "stringId": 696, - "text": "\u8cea\u62bc LP \u4ee3\u5e63\u4ee5\u8cfa\u53d6 EGG" + "text": "\u8cea\u62bc LP \u4ee3\u5e63\u4ee5\u8cfa\u53d6 BISON" } }, { @@ -1161,13 +1161,13 @@ { "data": { "stringId": 708, - "text": "EGG \u5f69\u5238" + "text": "BISON \u5f69\u5238" } }, { "data": { "stringId": 710, - "text": "\u4f7f\u7528 EGG \u8cfc\u8cb7\u7968\u5238" + "text": "\u4f7f\u7528 BISON \u8cfc\u8cb7\u7968\u5238" } }, { @@ -1209,7 +1209,7 @@ { "data": { "stringId": 10000, - "text": "質押費用將用於回購 EGG" + "text": "質押費用將用於回購 BISON" } }, { @@ -1221,7 +1221,7 @@ { "data": { "stringId": 10002, - "text": "質押代幣以堆疊 EGG" + "text": "質押代幣以堆疊 BISON" } }, { diff --git a/public/images/biChain.png b/public/images/biChain.png new file mode 100644 index 000000000..648e791bb Binary files /dev/null and b/public/images/biChain.png differ diff --git a/public/images/egg/9.png b/public/images/egg/9.png index 298e45d51..93b118bef 100644 Binary files a/public/images/egg/9.png and b/public/images/egg/9.png differ diff --git a/public/images/egg/LogoTextNewWhite.png b/public/images/egg/LogoTextNewWhite.png index 056daef98..e502188d5 100644 Binary files a/public/images/egg/LogoTextNewWhite.png and b/public/images/egg/LogoTextNewWhite.png differ diff --git a/public/images/egg/logo.png b/public/images/egg/logo.png index 48a2f8a19..93b118bef 100644 Binary files a/public/images/egg/logo.png and b/public/images/egg/logo.png differ diff --git a/public/images/farms/bison-bnb.png b/public/images/farms/bison-bnb.png new file mode 100644 index 000000000..93b118bef Binary files /dev/null and b/public/images/farms/bison-bnb.png differ diff --git a/public/images/farms/bison-busd.png b/public/images/farms/bison-busd.png new file mode 100644 index 000000000..93b118bef Binary files /dev/null and b/public/images/farms/bison-busd.png differ diff --git a/public/images/farms/bison.png b/public/images/farms/bison.png new file mode 100644 index 000000000..93b118bef Binary files /dev/null and b/public/images/farms/bison.png differ diff --git a/public/images/tokens/BISON-BNB.png b/public/images/tokens/BISON-BNB.png new file mode 100644 index 000000000..93b118bef Binary files /dev/null and b/public/images/tokens/BISON-BNB.png differ diff --git a/public/images/tokens/BISON.png b/public/images/tokens/BISON.png new file mode 100644 index 000000000..93b118bef Binary files /dev/null and b/public/images/tokens/BISON.png differ diff --git a/public/images/tokens/biAPE.png b/public/images/tokens/biAPE.png new file mode 100644 index 000000000..6f7f93ba5 Binary files /dev/null and b/public/images/tokens/biAPE.png differ diff --git a/public/images/tokens/biChain.png b/public/images/tokens/biChain.png new file mode 100644 index 000000000..648e791bb Binary files /dev/null and b/public/images/tokens/biChain.png differ diff --git a/public/index.html b/public/index.html index bfb01964b..64b5ae475 100644 --- a/public/index.html +++ b/public/index.html @@ -9,25 +9,51 @@ + - Goose Finance + Bishares Finance - + - + + + + +
diff --git a/public/logo.png b/public/logo.png index 4e43cc020..93b118bef 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/public/manifest.json b/public/manifest.json index 8a905ed76..7e2afc1bb 100644 --- a/public/manifest.json +++ b/public/manifest.json @@ -1,7 +1,7 @@ { - "short_name": "Goose Finance", - "name": "Goose Finance", - "description": "Farm EGG with LP Tokens", + "short_name": "Bishares Finance", + "name": "Bishares Finance", + "description": "Farm BISON with LP Tokens", "icons": [ { "src": "favicon.ico", diff --git a/src/App.tsx b/src/App.tsx index ed3aa4b10..e0a8ad19a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,23 +1,19 @@ -import React, { useEffect, Suspense, lazy } from 'react' -import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom' +import React, { useEffect, Suspense, lazy, memo, FC } from 'react' +import { BrowserRouter as Router, Route, Switch } from 'react-router-dom' import { useWallet } from '@binance-chain/bsc-use-wallet' import { ResetCSS } from '@pancakeswap-libs/uikit' import BigNumber from 'bignumber.js' -import { useFetchPublicData } from 'state/hooks' +import { useFetchPublicData, useFetchPriceData, useFetchTotalSupplyData } from 'state/hooks' import GlobalStyle from './style/Global' -import Menu from './components/Menu' + import PageLoader from './components/PageLoader' -import NftGlobalNotification from './views/Nft/components/NftGlobalNotification' +import Layout from './views/Layout' +import ConnectWallet from './views/ConnectWallet' +import ApolloWrap from './views/ApolloWrap' +import BnbPriceContextProvider from './views/BnbPriceContextWrap' -// Route-based code splitting -// Only pool is included in the main bundle because of it's the most visited page' -const Home = lazy(() => import('./views/Home')) -const Farms = lazy(() => import('./views/Farms')) -// const Lottery = lazy(() => import('./views/Lottery')) -// const Pools = lazy(() => import('./views/Pools')) -// const Ifos = lazy(() => import('./views/Ifos')) +const Pools = lazy(() => import('./views/Pools')) const NotFound = lazy(() => import('./views/NotFound')) -// const Nft = lazy(() => import('./views/Nft')) // This config is required for number formating BigNumber.config({ @@ -25,7 +21,7 @@ BigNumber.config({ DECIMAL_PLACES: 80, }) -const App: React.FC = () => { +const App: FC = () => { const { account, connect } = useWallet() useEffect(() => { if (!account && window.localStorage.getItem('accountStatus')) { @@ -35,49 +31,30 @@ const App: React.FC = () => { useFetchPublicData() + useFetchPriceData() + + useFetchTotalSupplyData() + return ( - - - - }> - - - - - - - - - - - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* Redirect */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* */} - {/* 404 */} - - - - - + + + + + + }> + + +
{account ? : }
+
+ +
+
+
+
+
) } -export default React.memo(App) +export default memo(App) diff --git a/src/Providers.tsx b/src/Providers.tsx index e04f1e5bf..9e7e706c7 100644 --- a/src/Providers.tsx +++ b/src/Providers.tsx @@ -12,7 +12,7 @@ import store from 'state' const Providers: React.FC = ({ children }) => { const rpcUrl = getRpcUrl() - const chainId = parseInt(process.env.REACT_APP_CHAIN_ID); + const chainId = parseInt(process.env.REACT_APP_CHAIN_ID) return ( diff --git a/src/components/Balance.tsx b/src/components/Balance.tsx index c95e6724d..63cea4b7d 100644 --- a/src/components/Balance.tsx +++ b/src/components/Balance.tsx @@ -37,7 +37,7 @@ const Balance: React.FC = ({ value, fontSize, color, decimals, isD Balance.defaultProps = { fontSize: '32px', isDisabled: false, - color: 'text', + color: '#ffffff', decimals: 3, } diff --git a/src/components/Button/index.tsx b/src/components/Button/index.tsx new file mode 100644 index 000000000..bab46dda4 --- /dev/null +++ b/src/components/Button/index.tsx @@ -0,0 +1,32 @@ +// @ts-ignore +import React, { FC } from 'react' +import classNames from 'classnames' +import { Button as MaterialButton } from '@material-ui/core' +import { ButtonProps as MuiButtonProps } from '@material-ui/core/Button' + +import CircularProgress from '@material-ui/core/CircularProgress' + +import useStyles from './styles.module' + +type Props = MuiButtonProps & { + className?: string + outLine?: boolean + loader?: boolean + disabled?: boolean +} + +const Button: FC = ({ children, className, outLine, loader, disabled, ...props }) => { + const classes = useStyles() + + return ( + + {loader ? : children} + + ) +} + +export default Button diff --git a/src/components/Button/styles.module.ts b/src/components/Button/styles.module.ts new file mode 100644 index 000000000..e91511e35 --- /dev/null +++ b/src/components/Button/styles.module.ts @@ -0,0 +1,22 @@ +import { makeStyles } from '@material-ui/core/styles' + +const useStyles = makeStyles(() => ({ + button: { + height: '50px', + width: '240px', + border: '1px solid #DAA10E', + background: 'rgba(218, 161, 14, 0.15)', + borderRadius: '100px', + color: '#DAA10E', + textTransform: 'none', + }, + disable: { + '& span': { + fontWeight: 'bold', + color: 'rgba(180, 156, 64, 0.31)', + background: 'rgba(54, 46, 18, 0.36)', + }, + }, +})) + +export default useStyles diff --git a/src/components/Menu/config.ts b/src/components/Menu/config.ts index e705d91d9..0eaf67b53 100644 --- a/src/components/Menu/config.ts +++ b/src/components/Menu/config.ts @@ -87,7 +87,7 @@ const config: MenuEntry[] = [ }, { label: 'Partnerships/IFO', - icon: 'GooseIcon', + icon: 'BisharesIcon', href: 'https://docs.google.com/forms/d/e/1FAIpQLSe7ycrw8Dq4C5Vjc9WNlRtTxEhFDB1Ny6jlAByZ2Y6qBo7SKg/viewform?usp=sf_link', }, { diff --git a/src/components/ModalWrap/index.tsx b/src/components/ModalWrap/index.tsx new file mode 100644 index 000000000..271580764 --- /dev/null +++ b/src/components/ModalWrap/index.tsx @@ -0,0 +1,29 @@ +import React from 'react' +import Modal from '@material-ui/core/Modal' + +import { CloseIcon } from '../../constants/icon.constants' + +import useStyles from './styles.module' + +const ModalWrap = ({ children, iconTitle, title, onClose }) => { + const classes = useStyles() + + return ( + +
+
+ {iconTitle} + {title} + {onClose && ( + + )} +
+ {children} +
+
+ ) +} + +export default ModalWrap diff --git a/src/components/ModalWrap/styles.module.ts b/src/components/ModalWrap/styles.module.ts new file mode 100644 index 000000000..a4eb53640 --- /dev/null +++ b/src/components/ModalWrap/styles.module.ts @@ -0,0 +1,46 @@ +import { makeStyles } from '@material-ui/core/styles' + +const useStyles = makeStyles(() => ({ + modalWrap: { + background: '#1E1F20', + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + borderRadius: '32px', + minWidth: '340px', + boxSizing: 'border-box', + border: '1px solid #333333', + }, + title: { + padding: '24px', + borderBottom: '0.5px solid #333333', + fontSize: '16px', + /* fontWeight: '700', */ + color: '#FFF', + display: 'flex', + alignItems: 'center', + textTransform: 'uppercase', + position: 'relative', + + '& svg': { + marginRight: '15px', + }, + }, + + closeIcon: { + position: 'absolute', + background: 'transparent', + border: 'none', + cursor: 'pointer', + right: '24px', + top: '50%', + transform: 'translate(0, -50%)', + + '& svg': { + marginRight: '0', + }, + }, +})) + +export default useStyles diff --git a/src/components/Tags.tsx b/src/components/Tags.tsx index 1a66ae288..faa1f3a29 100644 --- a/src/components/Tags.tsx +++ b/src/components/Tags.tsx @@ -1,5 +1,5 @@ import React from 'react' -import { Tag, VerifiedIcon, CommunityIcon, BinanceIcon } from '@pancakeswap-libs/uikit' +import { Tag, VerifiedIcon, CommunityIcon, BinanceIcon, Image } from '@pancakeswap-libs/uikit' const NoFeeTag = () => ( }> @@ -14,21 +14,27 @@ const RiskTag = ({ risk }) => ( ) const CoreTag = () => ( - }> + }> Core ) const CommunityTag = () => ( - }> + }> Community ) +const RewardsTag = () => ( + }> + Rewards + +) + const BinanceTag = () => ( - }> + }> Binance ) -export { CoreTag, CommunityTag, BinanceTag, RiskTag, NoFeeTag } +export { CoreTag, CommunityTag, BinanceTag, RiskTag, NoFeeTag, RewardsTag } diff --git a/src/components/TokenInput/TokenInput.tsx b/src/components/TokenInput/TokenInput.tsx index 2d675ec0f..0e0c6de0f 100644 --- a/src/components/TokenInput/TokenInput.tsx +++ b/src/components/TokenInput/TokenInput.tsx @@ -35,15 +35,12 @@ const TokenInput: React.FC = ({ max, symbol, onChange, onSelect placeholder="0" value={value} /> - { - depositFeeBP > 0 ? - - {TranslateString(10001, 'Deposit Fee')}: {new BigNumber(value || 0).times(depositFeeBP/10000).toString()} {symbol} - - : - null - } - + {depositFeeBP > 0 ? ( + + {TranslateString(10001, 'Deposit Fee')}: {new BigNumber(value || 0).times(depositFeeBP / 10000).toString()}{' '} + {symbol} + + ) : null} ) } diff --git a/src/config/abi/Multicall.json b/src/config/abi/Multicall.json index 5eee4ce84..25ebd2914 100644 --- a/src/config/abi/Multicall.json +++ b/src/config/abi/Multicall.json @@ -1,18 +1,20 @@ [ { - "constant": true, "inputs": [ { "components": [ { + "internalType": "address", "name": "target", "type": "address" }, { + "internalType": "bytes", "name": "callData", "type": "bytes" } ], + "internalType": "struct Multicall.Call[]", "name": "calls", "type": "tuple[]" } @@ -20,22 +22,94 @@ "name": "aggregate", "outputs": [ { + "internalType": "uint256", "name": "blockNumber", "type": "uint256" }, { + "internalType": "bytes[]", "name": "returnData", "type": "bytes[]" } ], - "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" + } + ], + "name": "getBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockCoinbase", + "outputs": [ + { + "internalType": "address", + "name": "coinbase", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockDifficulty", + "outputs": [ + { + "internalType": "uint256", + "name": "difficulty", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockGasLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "gaslimit", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getCurrentBlockTimestamp", + "outputs": [ + { + "internalType": "uint256", + "name": "timestamp", + "type": "uint256" + } + ], "stateMutability": "view", "type": "function" }, { - "constant": true, "inputs": [ { + "internalType": "address", "name": "addr", "type": "address" } @@ -43,12 +117,25 @@ "name": "getEthBalance", "outputs": [ { + "internalType": "uint256", "name": "balance", "type": "uint256" } ], - "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getLastBlockHash", + "outputs": [ + { + "internalType": "bytes32", + "name": "blockHash", + "type": "bytes32" + } + ], "stateMutability": "view", "type": "function" } -] +] \ No newline at end of file diff --git a/src/config/abi/cake.json b/src/config/abi/cake.json index dd3166ae5..d1522f4a9 100644 --- a/src/config/abi/cake.json +++ b/src/config/abi/cake.json @@ -129,8 +129,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -143,8 +142,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -168,8 +166,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -212,8 +209,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -242,8 +238,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], @@ -256,8 +251,7 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ @@ -284,100 +278,97 @@ "type": "function" }, { - "inputs": [], - "name": "getOwner", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "delegatee", "type": "address" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "name": "delegate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "spender", + "name": "delegatee", "type": "address" }, { "internalType": "uint256", - "name": "addedValue", + "name": "nonce", "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ + }, { - "internalType": "bool", - "name": "", - "type": "bool" + "internalType": "uint256", + "name": "expiry", + "type": "uint256" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" } ], + "name": "delegateBySig", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "delegator", "type": "address" } ], - "name": "nonces", + "name": "delegates", "outputs": [ { - "internalType": "uint256", + "internalType": "address", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "account", "type": "address" } ], - "name": "numCheckpoints", + "name": "getCurrentVotes", "outputs": [ { - "internalType": "uint32", + "internalType": "uint256", "name": "", - "type": "uint32" + "type": "uint256" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], - "name": "owner", + "name": "getOwner", "outputs": [ { "internalType": "address", @@ -386,33 +377,22 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "symbol", - "outputs": [ + "inputs": [ { - "internalType": "string", - "name": "", - "type": "string" + "internalType": "address", + "name": "account", + "type": "address" + }, + { + "internalType": "uint256", + "name": "blockNumber", + "type": "uint256" } ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "totalSupply", + "name": "getPriorVotes", "outputs": [ { "internalType": "uint256", @@ -421,23 +401,22 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "spender", "type": "address" }, { "internalType": "uint256", - "name": "amount", + "name": "addedValue", "type": "uint256" } ], - "name": "transfer", + "name": "increaseAllowance", "outputs": [ { "internalType": "bool", @@ -452,21 +431,29 @@ "inputs": [ { "internalType": "address", - "name": "sender", + "name": "_to", "type": "address" }, { - "internalType": "address", - "name": "recipient", - "type": "address" - }, + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" } ], - "name": "transferFrom", + "name": "mint", "outputs": [ { "internalType": "bool", @@ -478,123 +465,123 @@ "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "name", + "outputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "string", + "name": "", + "type": "string" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_to", + "name": "", "type": "address" - }, + } + ], + "name": "nonces", + "outputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "", "type": "uint256" } ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "amount", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], - "name": "mint", + "name": "numCheckpoints", "outputs": [ { - "internalType": "bool", + "internalType": "uint32", "name": "", - "type": "bool" + "type": "uint32" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", - "name": "delegator", + "name": "", "type": "address" } ], - "name": "delegates", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", "outputs": [ { - "internalType": "address", + "internalType": "string", "name": "", - "type": "address" + "type": "string" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "totalSupply", + "outputs": [ { - "internalType": "address", - "name": "delegatee", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "delegatee", + "name": "recipient", "type": "address" }, { "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", + "name": "amount", "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, + } + ], + "name": "transfer", + "outputs": [ { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" + "internalType": "bool", + "name": "", + "type": "bool" } ], - "name": "delegateBySig", - "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -602,45 +589,42 @@ "inputs": [ { "internalType": "address", - "name": "account", + "name": "sender", + "type": "address" + }, + { + "internalType": "address", + "name": "recipient", "type": "address" + }, + { + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "getCurrentVotes", + "name": "transferFrom", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "account", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ] \ No newline at end of file diff --git a/src/config/abi/masterchef.json b/src/config/abi/masterchef.json index 889e86697..35932a861 100644 --- a/src/config/abi/masterchef.json +++ b/src/config/abi/masterchef.json @@ -2,8 +2,8 @@ { "inputs": [ { - "internalType": "contract EggToken", - "name": "_egg", + "internalType": "contract LifeToken", + "name": "_life", "type": "address" }, { @@ -18,7 +18,7 @@ }, { "internalType": "uint256", - "name": "_eggPerBlock", + "name": "_lifePerBlock", "type": "uint256" }, { @@ -99,6 +99,63 @@ "name": "OwnershipTransferred", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "SetDevAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "SetFeeAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "goosePerBlock", + "type": "uint256" + } + ], + "name": "UpdateEmissionRate", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -135,68 +192,70 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [], - "name": "devaddr", - "outputs": [ + "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "egg", - "outputs": [ + "internalType": "uint256", + "name": "_allocPoint", + "type": "uint256" + }, { - "internalType": "contract EggToken", - "name": "", + "internalType": "contract IBEP20", + "name": "_lpToken", "type": "address" + }, + { + "internalType": "uint16", + "name": "_depositFeeBP", + "type": "uint16" + }, + { + "internalType": "bool", + "name": "_withUpdate", + "type": "bool" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "name": "add", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "eggPerBlock", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", "type": "uint256" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { - "inputs": [], - "name": "feeAddress", - "outputs": [ + "inputs": [ { "internalType": "address", - "name": "", + "name": "_devaddr", "type": "address" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "name": "dev", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [], - "name": "owner", + "name": "devaddr", "outputs": [ { "internalType": "address", @@ -205,73 +264,74 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_pid", "type": "uint256" } ], - "name": "poolInfo", + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "feeAddress", "outputs": [ { - "internalType": "contract IBEP20", - "name": "lpToken", + "internalType": "address", + "name": "", "type": "address" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "allocPoint", + "name": "_from", "type": "uint256" }, { "internalType": "uint256", - "name": "lastRewardBlock", + "name": "_to", "type": "uint256" - }, + } + ], + "name": "getMultiplier", + "outputs": [ { "internalType": "uint256", - "name": "accEggPerShare", + "name": "", "type": "uint256" - }, - { - "internalType": "uint16", - "name": "depositFeeBP", - "type": "uint16" } ], "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "startBlock", + "name": "life", "outputs": [ { - "internalType": "uint256", + "internalType": "contract LifeToken", "name": "", - "type": "uint256" + "type": "address" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], - "name": "totalAllocPoint", + "name": "lifePerBlock", "outputs": [ { "internalType": "uint256", @@ -280,90 +340,126 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ { "internalType": "address", - "name": "newOwner", + "name": "", "type": "address" } ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_pid", "type": "uint256" }, { "internalType": "address", - "name": "", + "name": "_user", "type": "address" } ], - "name": "userInfo", + "name": "pendingLife", "outputs": [ { "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardDebt", + "name": "", "type": "uint256" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [], - "name": "poolLength", + "inputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "name": "poolExistence", "outputs": [ { - "internalType": "uint256", + "internalType": "bool", "name": "", - "type": "uint256" + "type": "bool" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "_allocPoint", + "name": "", "type": "uint256" - }, + } + ], + "name": "poolInfo", + "outputs": [ { "internalType": "contract IBEP20", - "name": "_lpToken", + "name": "lpToken", "type": "address" }, + { + "internalType": "uint256", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accLifePerShare", + "type": "uint256" + }, { "internalType": "uint16", - "name": "_depositFeeBP", + "name": "depositFeeBP", "type": "uint16" - }, + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolLength", + "outputs": [ { - "internalType": "bool", - "name": "_withUpdate", - "type": "bool" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "add", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -399,17 +495,19 @@ { "inputs": [ { - "internalType": "uint256", - "name": "_from", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_to", - "type": "uint256" + "internalType": "address", + "name": "_feeAddress", + "type": "address" } ], - "name": "getMultiplier", + "name": "setFeeAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "startBlock", "outputs": [ { "internalType": "uint256", @@ -418,23 +516,11 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [ - { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_user", - "type": "address" - } - ], - "name": "pendingEgg", + "inputs": [], + "name": "totalAllocPoint", "outputs": [ { "internalType": "uint256", @@ -443,25 +529,17 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "massUpdatePools", - "outputs": [], - "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { - "internalType": "uint256", - "name": "_pid", - "type": "uint256" + "internalType": "address", + "name": "newOwner", + "type": "address" } ], - "name": "updatePool", + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -470,16 +548,11 @@ "inputs": [ { "internalType": "uint256", - "name": "_pid", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", + "name": "_lifePerBlock", "type": "uint256" } ], - "name": "deposit", + "name": "updateEmissionRate", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -490,14 +563,9 @@ "internalType": "uint256", "name": "_pid", "type": "uint256" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" } ], - "name": "withdraw", + "name": "updatePool", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -506,50 +574,45 @@ "inputs": [ { "internalType": "uint256", - "name": "_pid", + "name": "", "type": "uint256" - } - ], - "name": "emergencyWithdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + }, { "internalType": "address", - "name": "_devaddr", + "name": "", "type": "address" } ], - "name": "dev", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ + "name": "userInfo", + "outputs": [ { - "internalType": "address", - "name": "_feeAddress", - "type": "address" + "internalType": "uint256", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", + "type": "uint256" } ], - "name": "setFeeAddress", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "_eggPerBlock", + "name": "_pid", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_amount", "type": "uint256" } ], - "name": "updateEmissionRate", + "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/src/config/abi/sousChef.json b/src/config/abi/sousChef.json index 407670c5b..e600f7436 100644 --- a/src/config/abi/sousChef.json +++ b/src/config/abi/sousChef.json @@ -6,6 +6,11 @@ "name": "_syrup", "type": "address" }, + { + "internalType": "contract IBEP20", + "name": "_rewardToken", + "type": "address" + }, { "internalType": "uint256", "name": "_rewardPerBlock", @@ -18,7 +23,7 @@ }, { "internalType": "uint256", - "name": "_endBlock", + "name": "_bonusEndBlock", "type": "uint256" } ], @@ -63,6 +68,25 @@ "name": "EmergencyWithdraw", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -93,45 +117,55 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [], - "name": "poolInfo", - "outputs": [ + "inputs": [ { "internalType": "uint256", - "name": "lastRewardBlock", + "name": "_amount", "type": "uint256" - }, + } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "accRewardPerShare", + "name": "_amount", "type": "uint256" } ], - "stateMutability": "view", - "type": "function", - "constant": true + "name": "emergencyRewardWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" }, { "inputs": [], - "name": "rewardPerBlock", - "outputs": [ + "name": "emergencyWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ { "internalType": "uint256", - "name": "", + "name": "_from", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "_to", "type": "uint256" } ], - "stateMutability": "view", - "type": "function", - "constant": true - }, - { - "inputs": [], - "name": "startBlock", + "name": "getMultiplier", "outputs": [ { "internalType": "uint256", @@ -140,62 +174,91 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], - "name": "syrup", + "name": "massUpdatePools", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", "outputs": [ { - "internalType": "contract IBEP20", + "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "", + "name": "_user", "type": "address" } ], - "name": "userInfo", + "name": "pendingReward", "outputs": [ { "internalType": "uint256", - "name": "amount", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "rewardDebt", + "name": "", "type": "uint256" } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [ { "internalType": "uint256", - "name": "_from", + "name": "", "type": "uint256" + } + ], + "name": "poolInfo", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "lpToken", + "type": "address" }, { "internalType": "uint256", - "name": "_to", + "name": "allocPoint", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "lastRewardBlock", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "accCakePerShare", "type": "uint256" } ], - "name": "getMultiplier", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardPerBlock", "outputs": [ { "internalType": "uint256", @@ -204,18 +267,24 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "rewardToken", + "outputs": [ { - "internalType": "address", - "name": "_user", + "internalType": "contract IBEP20", + "name": "", "type": "address" } ], - "name": "pendingReward", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "startBlock", "outputs": [ { "internalType": "uint256", @@ -224,12 +293,43 @@ } ], "stateMutability": "view", - "type": "function", - "constant": true + "type": "function" }, { "inputs": [], - "name": "updatePool", + "name": "syrup", + "outputs": [ + { + "internalType": "contract IBEP20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAllocPoint", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" @@ -238,31 +338,48 @@ "inputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "_pid", "type": "uint256" } ], - "name": "deposit", + "name": "updatePool", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "userInfo", + "outputs": [ { "internalType": "uint256", - "name": "_amount", + "name": "amount", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "rewardDebt", "type": "uint256" } ], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [], - "name": "emergencyWithdraw", + "inputs": [ + { + "internalType": "uint256", + "name": "_amount", + "type": "uint256" + } + ], + "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/src/config/abi/syrup.json b/src/config/abi/syrup.json index b64a9a582..d529b0103 100644 --- a/src/config/abi/syrup.json +++ b/src/config/abi/syrup.json @@ -2,8 +2,13 @@ { "inputs": [ { - "internalType": "contract CakeToken", - "name": "_cake", + "internalType": "address", + "name": "_rewardsToken", + "type": "address" + }, + { + "internalType": "address", + "name": "_stakingToken", "type": "address" } ], @@ -16,48 +21,62 @@ { "indexed": true, "internalType": "address", - "name": "owner", + "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", - "name": "spender", + "name": "newOwner", "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" } ], - "name": "Approval", + "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "delegator", + "name": "account", "type": "address" - }, + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "fromDelegate", + "name": "token", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "toDelegate", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Recovered", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "reward", + "type": "uint256" } ], - "name": "DelegateChanged", + "name": "RewardAdded", "type": "event" }, { @@ -66,23 +85,30 @@ { "indexed": true, "internalType": "address", - "name": "delegate", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "previousBalance", + "name": "reward", "type": "uint256" - }, + } + ], + "name": "RewardPaid", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": false, "internalType": "uint256", - "name": "newBalance", + "name": "newDuration", "type": "uint256" } ], - "name": "DelegateVotesChanged", + "name": "RewardsDurationUpdated", "type": "event" }, { @@ -91,52 +117,59 @@ { "indexed": true, "internalType": "address", - "name": "previousOwner", + "name": "user", "type": "address" }, { - "indexed": true, - "internalType": "address", - "name": "newOwner", - "type": "address" + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" } ], - "name": "OwnershipTransferred", + "name": "Staked", "type": "event" }, { "anonymous": false, "inputs": [ { - "indexed": true, + "indexed": false, "internalType": "address", - "name": "from", + "name": "account", "type": "address" - }, + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ { "indexed": true, "internalType": "address", - "name": "to", + "name": "user", "type": "address" }, { "indexed": false, "internalType": "uint256", - "name": "value", + "name": "amount", "type": "uint256" } ], - "name": "Transfer", + "name": "Withdrawn", "type": "event" }, { "inputs": [], - "name": "DELEGATION_TYPEHASH", + "name": "_totalRewardSupply", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "stateMutability": "view", @@ -144,12 +177,12 @@ }, { "inputs": [], - "name": "DOMAIN_TYPEHASH", + "name": "_totalSupply", "outputs": [ { - "internalType": "bytes32", + "internalType": "uint256", "name": "", - "type": "bytes32" + "type": "uint256" } ], "stateMutability": "view", @@ -159,16 +192,11 @@ "inputs": [ { "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", + "name": "account", "type": "address" } ], - "name": "allowance", + "name": "balanceOf", "outputs": [ { "internalType": "uint256", @@ -181,25 +209,14 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, { "internalType": "uint256", - "name": "amount", + "name": "_amount", "type": "uint256" } ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], + "name": "deposit", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -211,7 +228,7 @@ "type": "address" } ], - "name": "balanceOf", + "name": "earned", "outputs": [ { "internalType": "uint256", @@ -223,31 +240,20 @@ "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "_from", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "burn", + "inputs": [], + "name": "exit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], - "name": "cake", + "name": "geUnlockTime", "outputs": [ { - "internalType": "contract CakeToken", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", @@ -256,27 +262,24 @@ { "inputs": [ { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint32", - "name": "", - "type": "uint32" + "internalType": "uint256", + "name": "time", + "type": "uint256" } ], - "name": "checkpoints", + "name": "lock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "owner", "outputs": [ { - "internalType": "uint32", - "name": "fromBlock", - "type": "uint32" - }, - { - "internalType": "uint256", - "name": "votes", - "type": "uint256" + "internalType": "address", + "name": "", + "type": "address" } ], "stateMutability": "view", @@ -284,31 +287,33 @@ }, { "inputs": [], - "name": "decimals", + "name": "paused", "outputs": [ { - "internalType": "uint8", + "internalType": "bool", "name": "", - "type": "uint8" + "type": "bool" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, + "inputs": [], + "name": "poolEndingBlock", + "outputs": [ { "internalType": "uint256", - "name": "subtractedValue", + "name": "", "type": "uint256" } ], - "name": "decreaseAllowance", + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "poolStarted", "outputs": [ { "internalType": "bool", @@ -316,88 +321,45 @@ "type": "bool" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ + "inputs": [], + "name": "poolStartingBlock", + "outputs": [ { - "internalType": "address", - "name": "delegatee", - "type": "address" + "internalType": "uint256", + "name": "", + "type": "uint256" } ], - "name": "delegate", - "outputs": [], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "delegatee", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "expiry", - "type": "uint256" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "delegateBySig", + "inputs": [], + "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "delegator", - "type": "address" - } - ], - "name": "delegates", + "inputs": [], + "name": "rewardPerBlock", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "getCurrentVotes", + "inputs": [], + "name": "rewardPerToken", "outputs": [ { "internalType": "uint256", @@ -410,31 +372,27 @@ }, { "inputs": [], - "name": "getOwner", + "name": "rewardPerTokenStored", "outputs": [ { - "internalType": "address", + "internalType": "uint256", "name": "", - "type": "address" + "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "blockNumber", - "type": "uint256" - } - ], - "name": "getPriorVotes", + "inputs": [], + "name": "rewardWithdraw", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardableBlocks", "outputs": [ { "internalType": "uint256", @@ -447,73 +405,50 @@ }, { "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, { "internalType": "uint256", - "name": "addedValue", + "name": "timepoint", "type": "uint256" } ], - "name": "increaseAllowance", + "name": "rewardableBlocksAfterTimepoint", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", - "name": "_to", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" } ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "mint", + "name": "rewards", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [], - "name": "name", + "name": "rewardsToken", "outputs": [ { - "internalType": "string", + "internalType": "contract IERC20", "name": "", - "type": "string" + "type": "address" } ], "stateMutability": "view", @@ -527,7 +462,7 @@ "type": "address" } ], - "name": "nonces", + "name": "stakedAt", "outputs": [ { "internalType": "uint256", @@ -538,31 +473,12 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "numCheckpoints", - "outputs": [ - { - "internalType": "uint32", - "name": "", - "type": "uint32" - } - ], - "stateMutability": "view", - "type": "function" - }, { "inputs": [], - "name": "owner", + "name": "stakingToken", "outputs": [ { - "internalType": "address", + "internalType": "contract IERC20", "name": "", "type": "address" } @@ -570,39 +486,38 @@ "stateMutability": "view", "type": "function" }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, { "inputs": [ { - "internalType": "address", - "name": "_to", - "type": "address" + "internalType": "uint256", + "name": "_reward", + "type": "uint256" }, { "internalType": "uint256", - "name": "_amount", + "name": "_poolExpiryTime", "type": "uint256" } ], - "name": "safeCakeTransfer", + "name": "startPool", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { - "inputs": [], - "name": "symbol", + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "totalStakedBlock", "outputs": [ { - "internalType": "string", + "internalType": "uint256", "name": "", - "type": "string" + "type": "uint256" } ], "stateMutability": "view", @@ -625,23 +540,19 @@ "inputs": [ { "internalType": "address", - "name": "recipient", + "name": "newOwner", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" } ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unlock", + "outputs": [], "stateMutability": "nonpayable", "type": "function" }, @@ -649,40 +560,30 @@ "inputs": [ { "internalType": "address", - "name": "sender", - "type": "address" - }, - { - "internalType": "address", - "name": "recipient", + "name": "", "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" } ], - "name": "transferFrom", + "name": "userRewardPerBlockPaid", "outputs": [ { - "internalType": "bool", + "internalType": "uint256", "name": "", - "type": "bool" + "type": "uint256" } ], - "stateMutability": "nonpayable", + "stateMutability": "view", "type": "function" }, { "inputs": [ { - "internalType": "address", - "name": "newOwner", - "type": "address" + "internalType": "uint256", + "name": "_amount", + "type": "uint256" } ], - "name": "transferOwnership", + "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" diff --git a/src/config/constants/contracts.ts b/src/config/constants/contracts.ts index dba7d0e24..c97d4d666 100644 --- a/src/config/constants/contracts.ts +++ b/src/config/constants/contracts.ts @@ -1,15 +1,15 @@ export default { cake: { - 56: '0xF952Fc3ca7325Cc27D15885d37117676d25BfdA6', - 97: '', + 56: '0x50f4220C82c9325dC99f729C3328FB5c338BEaae', + 97: '0xADA2270B0CB5b6254d3d48A6fEE55b72693B746A', }, masterChef: { - 56: '0xe70E9185F5ea7Ba3C5d63705784D8563017f2E57', - 97: '', + 56: '0x67905ff1Ada0C11720E7298840206E5bdB8d3646', + 97: '0xE37Aa693d2Ab77721E11e55bfBC723cf4457b78E', }, wbnb: { 56: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', - 97: '', + 97: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd', }, lottery: { 56: '', @@ -25,6 +25,6 @@ export default { }, busd: { 56: '0xe9e7cea3dedca5984780bafc599bd69add087d56', - 97: '', + 97: '0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee', }, } diff --git a/src/config/constants/farms.ts b/src/config/constants/farms.ts index d0717a880..e22175cd2 100644 --- a/src/config/constants/farms.ts +++ b/src/config/constants/farms.ts @@ -5,15 +5,15 @@ const farms: FarmConfig[] = [ { pid: 0, risk: 5, - lpSymbol: 'EGG-BUSD LP', + lpSymbol: 'BISON-BUSD LP', lpAddresses: { - 97: '', - 56: '0x19e7cbecdd23a16dfa5573df54d98f7caae03019', + 97: '0xE2115e605a81dc6CB448f5111DE6bEf5B8a760DA', + 56: '0x5eE167b75118125e7d46add5cE61F749BB977A00', }, - tokenSymbol: 'EGG', + tokenSymbol: 'BISON', tokenAddresses: { - 97: '', - 56: '0xf952fc3ca7325cc27d15885d37117676d25bfda6', + 97: '0xADA2270B0CB5b6254d3d48A6fEE55b72693B746A', + 56: '0x50f4220C82c9325dC99f729C3328FB5c338BEaae', }, quoteTokenSymbol: QuoteToken.BUSD, quoteTokenAdresses: contracts.busd, @@ -21,367 +21,36 @@ const farms: FarmConfig[] = [ { pid: 1, risk: 5, - lpSymbol: 'EGG-BNB LP', + lpSymbol: 'BISON-BNB LP', lpAddresses: { - 97: '', - 56: '0xd1b59d11316e87c3a0a069e80f590ba35cd8d8d3', + 97: '0x197885A5af8ffdC945f2c5677A6E0F3A84C141A2', + 56: '0x45b2eF2ECe32b34D20F6C6caD49043740B05f2A5', }, - tokenSymbol: 'EGG', + tokenSymbol: 'BISON', tokenAddresses: { - 97: '', - 56: '0xf952fc3ca7325cc27d15885d37117676d25bfda6', + 97: '0xADA2270B0CB5b6254d3d48A6fEE55b72693B746A', + 56: '0x50f4220C82c9325dC99f729C3328FB5c338BEaae', }, quoteTokenSymbol: QuoteToken.BNB, quoteTokenAdresses: contracts.wbnb, }, + { pid: 2, risk: 3, lpSymbol: 'BNB-BUSD LP', lpAddresses: { - 97: '', - 56: '0x1b96b92314c44b159149f7e0303511fb2fc4774f', - }, - tokenSymbol: 'BNB', - tokenAddresses: { - 97: '', - 56: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 3, - risk: 1, - lpSymbol: 'USDT-BUSD LP', - lpAddresses: { - 97: '', - 56: '0xc15fa3e22c912a276550f3e5fe3b0deb87b55acd', - }, - tokenSymbol: 'USDT', - tokenAddresses: { - 97: '', - 56: '0x55d398326f99059ff775485246999027b3197955', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 4, - risk: 2, - lpSymbol: 'BTCB-BNB LP', - lpAddresses: { - 97: '', - 56: '0x7561eee90e24f3b348e1087a005f78b4c8453524', - }, - tokenSymbol: 'BTCB', - tokenAddresses: { - 97: '', - 56: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c', - }, - quoteTokenSymbol: QuoteToken.BNB, - quoteTokenAdresses: contracts.wbnb, - }, - { - pid: 5, - risk: 2, - lpSymbol: 'ETH-BNB LP', - lpAddresses: { - 97: '', - 56: '0x70d8929d04b60af4fb9b58713ebcf18765ade422', - }, - tokenSymbol: 'ETH', - tokenAddresses: { - 97: '', - 56: '0x2170ed0880ac9a755fd29b2688956bd959f933f8', - }, - quoteTokenSymbol: QuoteToken.BNB, - quoteTokenAdresses: contracts.wbnb, - }, - { - pid: 6, - risk: 1, - lpSymbol: 'DAI-BUSD LP', - lpAddresses: { - 97: '', - 56: '0x3ab77e40340ab084c3e23be8e5a6f7afed9d41dc', - }, - tokenSymbol: 'DAI', - tokenAddresses: { - 97: '', - 56: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 7, - risk: 1, - lpSymbol: 'USDC-BUSD LP', - lpAddresses: { - 97: '', - 56: '0x680dd100e4b394bda26a59dd5c119a391e747d18', - }, - tokenSymbol: 'USDC', - tokenAddresses: { - 97: '', - 56: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 9, - risk: 3, - lpSymbol: 'DOT-BNB LP', - lpAddresses: { - 97: '', - 56: '0xbcd62661a6b1ded703585d3af7d7649ef4dcdb5c', - }, - tokenSymbol: 'DOT', - tokenAddresses: { - 97: '', - 56: '0x7083609fce4d1d8dc0c979aab8c869ea2c873402', - }, - quoteTokenSymbol: QuoteToken.BNB, - quoteTokenAdresses: contracts.wbnb, - }, - { - pid: 10, - risk: 4, - lpSymbol: 'CAKE-BUSD LP', - lpAddresses: { - 97: '', - 56: '0x0ed8e0a2d99643e1e65cca22ed4424090b8b7458', - }, - tokenSymbol: 'CAKE', - tokenAddresses: { - 97: '', - 56: '0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 11, - risk: 4, - lpSymbol: 'CAKE-BNB LP', - lpAddresses: { - 97: '', - 56: '0xa527a61703d82139f8a06bc30097cc9caa2df5a6', - }, - tokenSymbol: 'CAKE', - tokenAddresses: { - 97: '', - 56: '0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82', - }, - quoteTokenSymbol: QuoteToken.BNB, - quoteTokenAdresses: contracts.wbnb, - }, - { - pid: 12, - risk: 5, - isTokenOnly: true, - lpSymbol: 'EGG', - lpAddresses: { - 97: '', - 56: '0x19e7cbecdd23a16dfa5573df54d98f7caae03019', // EGG-BUSD LP - }, - tokenSymbol: 'EGG', - tokenAddresses: { - 97: '', - 56: '0xf952fc3ca7325cc27d15885d37117676d25bfda6', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 13, - risk: 1, - isTokenOnly: true, - lpSymbol: 'BUSD', - lpAddresses: { - 97: '', - 56: '0x19e7cbecdd23a16dfa5573df54d98f7caae03019', // EGG-BUSD LP (BUSD-BUSD will ignore) + 97: '0xa75c80e7Ca70505AAB6062cF15A2cFC71b6138C0', + 56: '0x1B96B92314C44b159149f7E0303511fB2Fc4774f', }, tokenSymbol: 'BUSD', tokenAddresses: { - 97: '', - 56: '0xe9e7cea3dedca5984780bafc599bd69add087d56', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 14, - risk: 3, - isTokenOnly: true, - lpSymbol: 'WBNB', - lpAddresses: { - 97: '', - 56: '0x1b96b92314c44b159149f7e0303511fb2fc4774f', // BNB-BUSD LP - }, - tokenSymbol: 'WBNB', - tokenAddresses: { - 97: '', + 97: '0xeD24FC36d5Ee211Ea25A80239Fb8C4Cfd80f12Ee', 56: '0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c', }, quoteTokenSymbol: QuoteToken.BUSD, quoteTokenAdresses: contracts.busd, }, - { - pid: 15, - risk: 1, - isTokenOnly: true, - lpSymbol: 'USDT', - lpAddresses: { - 97: '', - 56: '0xc15fa3e22c912a276550f3e5fe3b0deb87b55acd', // USDT-BUSD LP - }, - tokenSymbol: 'USDT', - tokenAddresses: { - 97: '', - 56: '0x55d398326f99059ff775485246999027b3197955', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 16, - risk: 2, - isTokenOnly: true, - lpSymbol: 'BTCB', - lpAddresses: { - 97: '', - 56: '0xb8875e207ee8096a929d543c9981c9586992eacb', // BTCB-BUSD LP - }, - tokenSymbol: 'BTCB', - tokenAddresses: { - 97: '', - 56: '0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 17, - risk: 2, - isTokenOnly: true, - lpSymbol: 'ETH', - lpAddresses: { - 97: '', - 56: '0xd9a0d1f5e02de2403f68bb71a15f8847a854b494', // ETH-BUSD LP - }, - tokenSymbol: 'ETH', - tokenAddresses: { - 97: '', - 56: '0x2170ed0880ac9a755fd29b2688956bd959f933f8', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 18, - risk: 1, - isTokenOnly: true, - lpSymbol: 'DAI', - lpAddresses: { - 97: '', - 56: '0x3ab77e40340ab084c3e23be8e5a6f7afed9d41dc', // DAI-BUSD LP - }, - tokenSymbol: 'DAI', - tokenAddresses: { - 97: '', - 56: '0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 19, - risk: 1, - isTokenOnly: true, - lpSymbol: 'USDC', - lpAddresses: { - 97: '', - 56: '0x680dd100e4b394bda26a59dd5c119a391e747d18', // USDC-BUSD LP - }, - tokenSymbol: 'USDC', - tokenAddresses: { - 97: '', - 56: '0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 20, - risk: 3, - isTokenOnly: true, - lpSymbol: 'DOT', - lpAddresses: { - 97: '', - 56: '0x54c1ec2f543966953f2f7564692606ea7d5a184e', // DOT-BUSD LP - }, - tokenSymbol: 'DOT', - tokenAddresses: { - 97: '', - 56: '0x7083609fce4d1d8dc0c979aab8c869ea2c873402', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 21, - risk: 4, - isTokenOnly: true, - lpSymbol: 'CAKE', - lpAddresses: { - 97: '', - 56: '0x0ed8e0a2d99643e1e65cca22ed4424090b8b7458', // CAKE-BUSD LP - }, - tokenSymbol: 'CAKE', - tokenAddresses: { - 97: '', - 56: '0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 22, - risk: 3, - isTokenOnly: true, - lpSymbol: 'BSCX', - lpAddresses: { - 97: '', - 56: '0xa32a983a64ce21834221aa0ad1f1533907553136', // BSCX-BUSD LP - }, - tokenSymbol: 'BSCX', - tokenAddresses: { - 97: '', - 56: '0x5ac52ee5b2a633895292ff6d8a89bb9190451587', - }, - quoteTokenSymbol: QuoteToken.BUSD, - quoteTokenAdresses: contracts.busd, - }, - { - pid: 23, - risk: 3, - isTokenOnly: true, - lpSymbol: 'AUTO', - lpAddresses: { - 97: '', - 56: '0x4d0228ebeb39f6d2f29ba528e2d15fc9121ead56', // AUTO-BNB LP - }, - tokenSymbol: 'AUTO', - tokenAddresses: { - 97: '', - 56: '0xa184088a740c695e156f91f5cc086a06bb78b827', - }, - quoteTokenSymbol: QuoteToken.BNB, - quoteTokenAdresses: contracts.wbnb, - }, ] export default farms diff --git a/src/config/constants/nfts.ts b/src/config/constants/nfts.ts index 8e237317a..a542d78ae 100644 --- a/src/config/constants/nfts.ts +++ b/src/config/constants/nfts.ts @@ -1,7 +1,7 @@ import { Nft } from './types' -export const RABBIT_MINTING_FARM_ADDRESS = '0x7c8b60d2b859a38c8B9b5B6CB4565485cb637c7a' -export const PANCAKE_RABBITS_ADDRESS = '0xDf7952B35f24aCF7fC0487D01c8d5690a60DBa07' +export const MINTING_FARM_ADDRESS = '0x556087eFC63E690c1963C26402Fe8EBaA66D11Db' +export const NFT_ADDRESS = '0xa81ab2d03b9e3a62bdbb837d417a5e221f754e14' const Nfts: Nft[] = [ { diff --git a/src/config/constants/pools.ts b/src/config/constants/pools.ts index 246770af0..d5a790cd5 100644 --- a/src/config/constants/pools.ts +++ b/src/config/constants/pools.ts @@ -1,40 +1,113 @@ import { PoolConfig, QuoteToken, PoolCategory } from './types' +import contracts from './contracts' const pools: PoolConfig[] = [ - // { - // sousId: 0, - // tokenName: 'CAKE', - // stakingTokenName: QuoteToken.CAKE, - // stakingTokenAddress: '0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82', - // contractAddress: { - // 97: '0xd3af5fe61dbaf8f73149bfcfa9fb653ff096029a', - // 56: '0x73feaa1eE314F8c655E354234017bE2193C9E24E', - // }, - // poolCategory: PoolCategory.CORE, - // projectLink: 'https://pancakeswap.finance/', - // harvest: true, - // tokenPerBlock: '10', - // sortOrder: 1, - // isFinished: false, - // tokenDecimals: 18, - // }, - // { - // sousId: 1, - // tokenName: 'TWT', - // stakingTokenName: QuoteToken.SYRUP, - // stakingTokenAddress: '0x009cF7bC57584b7998236eff51b98A168DceA9B0', - // contractAddress: { - // 97: '0xAfd61Dc94f11A70Ae110dC0E0F2061Af5633061A', - // 56: '0xAfd61Dc94f11A70Ae110dC0E0F2061Af5633061A', - // }, - // poolCategory: PoolCategory.CORE, - // projectLink: 'https://trustwallet.com/', - // harvest: true, - // tokenPerBlock: '20', - // sortOrder: 999, - // isFinished: true, - // tokenDecimals: 18, - // }, + { + sousId: 5, + poolName: 'BISON', + tokenName: 'BISON', + stakingTokenName: QuoteToken.BISON, + earningToken: '0x19A6Da6e382b85F827088092a3DBe864d9cCba73', + stakingTokenAddress: '0x19A6Da6e382b85F827088092a3DBe864d9cCba73', + contractAddress: { + 97: '0x65114d5af1a33f89d36a79a56c75a4728e02d492', + 56: '0x3d5e1C77e9C81B72b0b0F88Cd63d2Aab38881b96', + }, + poolCategory: PoolCategory.REWARDS, + projectLink: + 'https://app.apeswap.finance/swap?inputCurrency=ETH&outputCurrency=0x19A6Da6e382b85F827088092a3DBe864d9cCba73', + harvest: true, + tokenPerBlock: '0.006751543209876540', + sortOrder: 1, + isFinished: false, + tokenDecimals: 18, + quoteTokenSymbol: QuoteToken.BISON, + quoteTokenAdresses: contracts.cake, + }, + { + sousId: 2, + poolName: 'BISON-BNB APE', + tokenName: 'BISON', + stakingTokenName: QuoteToken.BISONBNB, + earningToken: '0x19a6da6e382b85f827088092a3dbe864d9ccba73', + stakingTokenAddress: '0xec1214ee197304c17eb9e427e246a4fd37ba718e', + contractAddress: { + 97: '0xEA93812aA70eC89932aF6EBe6eCe93135712e4Ab', + 56: '0x99AeB03aCEBAF7b0742a67cE0f3C49E82F5f4897', + }, + poolCategory: PoolCategory.REWARDS, + projectLink: 'https://app.apeswap.finance/add/ETH/0x19a6da6e382b85f827088092a3dbe864d9ccba73', + harvest: true, + tokenPerBlock: '0.014467592592592600', + sortOrder: 1, + isFinished: false, + tokenDecimals: 18, + quoteTokenSymbol: QuoteToken.BISON, + quoteTokenAdresses: contracts.cake, + }, + { + sousId: 3, + poolName: 'BISON-BNB PCS', + tokenName: 'BISON', + stakingTokenName: QuoteToken.BISONBNB, + earningToken: '0x19a6da6e382b85f827088092a3dbe864d9ccba73', + stakingTokenAddress: '0xe5da89fc07cbd30bfc92e14bdbe4c6156d309d12', + contractAddress: { + 97: '0xEA93812aA70eC89932aF6EBe6eCe93135712e4Ab', + 56: '0x26DdcC2DA40c7e0a85b2396B9d46b7a36C5295b2', + }, + poolCategory: PoolCategory.REWARDS, + projectLink: 'https://pancakeswap.finance/add/BNB/0x19A6Da6e382b85F827088092a3DBe864d9cCba73', + harvest: true, + tokenPerBlock: '0.014467592592592600', + sortOrder: 1, + isFinished: false, + tokenDecimals: 18, + quoteTokenSymbol: QuoteToken.BISON, + quoteTokenAdresses: contracts.cake, + }, + { + sousId: 4, + poolName: 'biAPE-BNB APE', + tokenName: 'BISON', + stakingTokenName: QuoteToken.biAPEBNB, + earningToken: '0x19a6da6e382b85f827088092a3dbe864d9ccba73', + stakingTokenAddress: '0x5035a262543f5ca8502e38a5a55b91a1a26b4f9c', + contractAddress: { + 97: '0xEA93812aA70eC89932aF6EBe6eCe93135712e4Ab', + 56: '0x7aB0BEd80042bCa202dA306F7C58C4c8a0b2fF27', + }, + poolCategory: PoolCategory.REWARDS, + projectLink: 'https://app.apeswap.finance/add/ETH/0xf19b6746769132926ee82f47137aeb7a8702c4b9', + harvest: true, + tokenPerBlock: '0.014467592592592600', + sortOrder: 1, + isFinished: false, + tokenDecimals: 18, + quoteTokenSymbol: QuoteToken.BISON, + quoteTokenAdresses: contracts.cake, + }, + { + sousId: 6, + poolName: 'biCHAIN-BNB ARBX', + tokenName: 'BISON', + stakingTokenName: QuoteToken.biCHAINBNB, + earningToken: '0x19a6da6e382b85f827088092a3dbe864d9ccba73', + stakingTokenAddress: '0xDAff7BEB8cAD0E75CcA3d9F36b8f8C0e1cf37b85', + contractAddress: { + 97: '0xEA93812aA70eC89932aF6EBe6eCe93135712e4Ab', + 56: '0xdBf6Afe135e2C4CB599680C2F1554bBDa219CE10', + }, + poolCategory: PoolCategory.REWARDS, + projectLink: 'https://arbex.bishares.finance/add/BNB/0x10A520829C1E9631Ef9E60e37eEA3916092cAa99', + harvest: true, + tokenPerBlock: '0.007440476190476190', + sortOrder: 1, + isFinished: false, + tokenDecimals: 18, + quoteTokenSymbol: QuoteToken.BISON, + quoteTokenAdresses: contracts.cake, + }, ] export default pools diff --git a/src/config/constants/types.ts b/src/config/constants/types.ts index 380b7b2a2..0d894e627 100644 --- a/src/config/constants/types.ts +++ b/src/config/constants/types.ts @@ -26,11 +26,16 @@ export enum QuoteToken { 'BUSD' = 'BUSD', 'TWT' = 'TWT', 'UST' = 'UST', + 'BISON' = 'BISON', + 'BISONBNB' = 'BISON-BNB', + 'biAPEBNB' = 'biAPE-BNB', + 'biCHAINBNB' = 'biCHAIN-BNB', } export enum PoolCategory { 'COMMUNITY' = 'Community', 'CORE' = 'Core', + 'REWARDS' = 'Rewards', 'BINANCE' = 'Binance', // Pools using native BNB behave differently than pools using a token } @@ -51,6 +56,7 @@ export interface FarmConfig { isTokenOnly?: boolean isCommunity?: boolean risk: number + factory?: string dual?: { rewardPerBlock: number earnLabel: string @@ -61,8 +67,10 @@ export interface FarmConfig { export interface PoolConfig { sousId: number image?: string + poolName: string tokenName: string stakingTokenName: QuoteToken + earningToken?: string stakingLimit?: number stakingTokenAddress?: string contractAddress: Address @@ -73,6 +81,8 @@ export interface PoolConfig { harvest?: boolean isFinished?: boolean tokenDecimals: number + quoteTokenSymbol: string + quoteTokenAdresses: { 56: string; 97: string } } export type Nft = { diff --git a/src/constants/global.constants.ts b/src/constants/global.constants.ts new file mode 100644 index 000000000..dc6d9cf8a --- /dev/null +++ b/src/constants/global.constants.ts @@ -0,0 +1,6 @@ +export const BSC_SCAN_URL = 'https://bscscan.com/address/' +export const CHAIN_ID = 56 +export const RPC_URL_56 = 'https://bsc-dataseed1.binance.org' +export const POLLING_INTERVAL = 12000 + +export const WBNB_ADDRESS = '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c'; diff --git a/src/constants/graph.constants.ts b/src/constants/graph.constants.ts new file mode 100644 index 000000000..76426d629 --- /dev/null +++ b/src/constants/graph.constants.ts @@ -0,0 +1,19 @@ +import { gql } from '@apollo/client' + +export const getGraphUniSwapBody = (array) => + gql`query GetPrice { + tokens(where: {id_in: [${array?.map((item) => `"${item?.toLowerCase()}"`)}]}) { + name, + derivedETH, + id, + }}` + +export const BISON_PRICE = gql` + query GetPrice { + token(id: "0x19a6da6e382b85f827088092a3dbe864d9ccba73") { + name + derivedETH + id + } + } +` diff --git a/src/constants/icon.constants.tsx b/src/constants/icon.constants.tsx new file mode 100644 index 000000000..f161b041c --- /dev/null +++ b/src/constants/icon.constants.tsx @@ -0,0 +1,415 @@ +/* eslint-disable max-len */ +import React from 'react' + +export const ZapOffIcon = ( + + + + + + + + + + + + + + + + + + + +) + +export const LogIn = ( + + + + + +) + +export const Wallet = ( + + + +) + +export const TwitterIcon = ( + + + +) + +export const GitHub = ( + + + +) + +export const TelegramIcon = ( + + + +) + +export const MediumSquareIcon = ( + + + +) + +export const DiscordIcon = ( + + + +) + +export const AlertTriangle = ( + + + + + + + + + + + + + + + + + + +) + +export const SwitchIcon = ( + + + + + + + +) + +export const CopyIcon = ( + + + + +) + +export const ArrowUpIcon = ( + + + + +) + +export const ArrowUpGreen = ( + + + + +) + +export const ArrowDownRed = ( + + + + +) + +export const ZapIcon = ( + + + +) + +export const CloseIcon = ( + + + + + +) + +export const MetaMaskIcon = ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +) + +export const WalletConnectIcon = ( + + + + +) + +export const MagicIcon = ( + + + +) + +export const ArrowDownIcon = ( + + + +) diff --git a/src/constants/routes.constants.ts b/src/constants/routes.constants.ts new file mode 100644 index 000000000..0333d7e84 --- /dev/null +++ b/src/constants/routes.constants.ts @@ -0,0 +1,9 @@ +export const PATH_INDEX = '/' +export const MAIN_INDEX = '/' + +export const LINK_PATH_HOME = 'https://bishares.finance/' +export const LINK_PATH_ABOUT = 'https://bishares.finance/about-us' +export const LINK_PATH_FUNDS = 'https://app.bishares.finance/#/' +export const LINK_PATH_ARBX = 'https://arbex.bishares.finance/swap' + +export const API_APE_SWAP_GRAPH = 'https://graph.apeswap.finance/subgraphs/name/ape-swap/apeswap-subgraph' diff --git a/src/contexts/Localisation/languageContext.tsx b/src/contexts/Localisation/languageContext.tsx index 84e68bf85..7677a40c0 100644 --- a/src/contexts/Localisation/languageContext.tsx +++ b/src/contexts/Localisation/languageContext.tsx @@ -57,10 +57,10 @@ const LanguageContextProvider = ({ children }) => { useEffect(() => { if (selectedLanguage) { - console.log(`import(\`../../../public/i18n/${selectedLanguage.code}.json\`)`); + console.log(`import(\`../../../public/i18n/${selectedLanguage.code}.json\`)`) fetch(`./i18n/${selectedLanguage.code}.json`) - .then(r=>r.json()) - // fetchTranslationsForSelectedLanguage(selectedLanguage) + .then((r) => r.json()) + // fetchTranslationsForSelectedLanguage(selectedLanguage) .then((translationApiResponse) => { if (translationApiResponse.data.length < 1) { setTranslations(['error']) @@ -70,8 +70,8 @@ const LanguageContextProvider = ({ children }) => { }) .then(() => setTranslatedLanguage(selectedLanguage)) .catch((e) => { - console.error("ERROR"); - console.error(e); + console.error('ERROR') + console.error(e) setTranslations(['error']) }) } diff --git a/src/contexts/ThemeContext.tsx b/src/contexts/ThemeContext.tsx index 9043d4630..f5ce535c6 100644 --- a/src/contexts/ThemeContext.tsx +++ b/src/contexts/ThemeContext.tsx @@ -21,7 +21,7 @@ const ThemeContextProvider = ({ children }) => { return ( - {children} + {children} ) } diff --git a/src/hooks/useAllEarnings.ts b/src/hooks/useAllEarnings.ts index 5373bca05..e8ca16315 100644 --- a/src/hooks/useAllEarnings.ts +++ b/src/hooks/useAllEarnings.ts @@ -15,7 +15,7 @@ const useAllEarnings = () => { const fetchAllBalances = async () => { const calls = farmsConfig.map((farm) => ({ address: getMasterChefAddress(), - name: 'pendingEgg', + name: 'pendingLife', params: [farm.pid, account], })) diff --git a/src/hooks/useBnbPrice.ts b/src/hooks/useBnbPrice.ts new file mode 100644 index 000000000..b2b1ace06 --- /dev/null +++ b/src/hooks/useBnbPrice.ts @@ -0,0 +1,33 @@ +import { createContext, useContext, useState, useEffect } from 'react' + +const updatedIntervalSec = 30 * 1000 + +export const BnbPriceContext = createContext(undefined) +export const useBnbPriceState = () => useContext(BnbPriceContext) + +export const useBnbPrice = () => { + const [prices, setPrices] = useState(0) + + useEffect(() => { + const updatePrice = () => + fetch( + // eslint-disable-next-line max-len + 'https://api.coingecko.com/api/v3/simple/price?ids=binancecoin,binance-usd,pancakeswap-token,apeswap-finance,tether,usd-coin&vs_currencies=usd', + ) + .then((res) => res.json()) + .then((res) => { + // toDo add condition to update state + setPrices(res) + }) + updatePrice() + try { + setInterval(() => { + updatePrice() + }, updatedIntervalSec) + } catch (error) { + console.log(error) + } + }, []) + + return prices +} diff --git a/src/hooks/useContract.ts b/src/hooks/useContract.ts index be9f18703..dfedff7d8 100644 --- a/src/hooks/useContract.ts +++ b/src/hooks/useContract.ts @@ -14,6 +14,7 @@ import lotteryTicket from 'config/abi/lotteryNft.json' import masterChef from 'config/abi/masterchef.json' import sousChef from 'config/abi/sousChef.json' import sousChefBnb from 'config/abi/sousChefBnb.json' +import univ2lp from 'config/abi/uni_v2_lp.json' const useContract = (abi: AbiItem, address: string, contractOptions?: ContractOptions) => { const web3 = useWeb3() @@ -31,12 +32,12 @@ const useContract = (abi: AbiItem, address: string, contractOptions?: ContractOp */ export const useIfoContract = (address: string) => { - const ifoAbi = (ifo as unknown) as AbiItem + const ifoAbi = ifo as unknown as AbiItem return useContract(ifoAbi, address) } export const useERC20 = (address: string) => { - const erc20Abi = (erc20 as unknown) as AbiItem + const erc20Abi = erc20 as unknown as AbiItem return useContract(erc20Abi, address) } @@ -45,34 +46,39 @@ export const useCake = () => { } export const useRabbitMintingFarm = (address: string) => { - const rabbitMintingFarmAbi = (rabbitmintingfarm as unknown) as AbiItem + const rabbitMintingFarmAbi = rabbitmintingfarm as unknown as AbiItem return useContract(rabbitMintingFarmAbi, address) } export const usePancakeRabbits = (address: string) => { - const pancakeRabbitsAbi = (pancakeRabbits as unknown) as AbiItem + const pancakeRabbitsAbi = pancakeRabbits as unknown as AbiItem return useContract(pancakeRabbitsAbi, address) } export const useLottery = () => { - const abi = (lottery as unknown) as AbiItem + const abi = lottery as unknown as AbiItem return useContract(abi, getLotteryAddress()) } export const useLotteryTicket = () => { - const abi = (lotteryTicket as unknown) as AbiItem + const abi = lotteryTicket as unknown as AbiItem return useContract(abi, getLotteryTicketAddress()) } export const useMasterchef = () => { - const abi = (masterChef as unknown) as AbiItem + const abi = masterChef as unknown as AbiItem return useContract(abi, getMasterChefAddress()) } +export const useLP = (address: string) => { + const lpAbi = univ2lp as unknown as AbiItem + return useContract(lpAbi, address) +} + export const useSousChef = (id) => { const config = poolsConfig.find((pool) => pool.sousId === id) const rawAbi = config.poolCategory === PoolCategory.BINANCE ? sousChefBnb : sousChef - const abi = (rawAbi as unknown) as AbiItem + const abi = rawAbi as unknown as AbiItem return useContract(abi, config.contractAddress[process.env.REACT_APP_CHAIN_ID]) } diff --git a/src/hooks/useFarmsWithBalance.ts b/src/hooks/useFarmsWithBalance.ts index fee1733c1..e235d154d 100644 --- a/src/hooks/useFarmsWithBalance.ts +++ b/src/hooks/useFarmsWithBalance.ts @@ -21,7 +21,7 @@ const useFarmsWithBalance = () => { const fetchBalances = async () => { const calls = farmsConfig.map((farm) => ({ address: getMasterChefAddress(), - name: 'pendingEgg', + name: 'pendingLife', params: [farm.pid, account], })) diff --git a/src/hooks/useGetLpTokenPrice.ts b/src/hooks/useGetLpTokenPrice.ts new file mode 100644 index 000000000..073c17e60 --- /dev/null +++ b/src/hooks/useGetLpTokenPrice.ts @@ -0,0 +1,28 @@ +import { useState, useEffect } from 'react' +import BigNumber from 'bignumber.js' + +import { useBnbPriceState } from 'hooks/useBnbPrice'; + +import { WBNB_ADDRESS } from '../constants/global.constants'; + +const useGetLpTokenPrice = ({ lpTokenContract }) => { + const [lpTokenPrice, setLpTokenPrice] = useState(null); + const { binancecoin } = useBnbPriceState(); + + useEffect(()=> { + (async () => { + const totalSupply = await lpTokenContract.methods.totalSupply().call(); + const token0 = await lpTokenContract.methods.token0().call(); + const {_reserve0, _reserve1} = await lpTokenContract.methods.getReserves().call(); + + const totalSupplyBN = new BigNumber(totalSupply).div(1e18); + const reserve = token0 === WBNB_ADDRESS ? new BigNumber(_reserve0).div(1e18) : new BigNumber(_reserve1).div(1e18); + const result = reserve.multipliedBy(binancecoin?.usd).multipliedBy(2).div(totalSupplyBN); + setLpTokenPrice(result) + })() + },[ lpTokenContract, binancecoin]); + + return { lpTokenPriceUsd: lpTokenPrice }; +} + +export default useGetLpTokenPrice; \ No newline at end of file diff --git a/src/hooks/useUnstake.ts b/src/hooks/useUnstake.ts index 34f02d422..1f32de06e 100644 --- a/src/hooks/useUnstake.ts +++ b/src/hooks/useUnstake.ts @@ -27,7 +27,7 @@ const useUnstake = (pid: number) => { return { onUnstake: handleUnstake } } -const SYRUPIDS = [5, 6, 3, 1, 22, 23] +const SYRUPIDS = [1] export const useSousUnstake = (sousId) => { const dispatch = useDispatch() diff --git a/src/state/actions.ts b/src/state/actions.ts index d2a0a0cb6..43608d913 100644 --- a/src/state/actions.ts +++ b/src/state/actions.ts @@ -1,4 +1,5 @@ export { fetchFarmsPublicDataAsync, fetchFarmUserDataAsync } from './farms' +export { fetchPriceDataAsync, fetchTotalSupplyDataAsync } from './bison' export { fetchPoolsPublicDataAsync, fetchPoolsUserDataAsync, diff --git a/src/state/bison/index.ts b/src/state/bison/index.ts new file mode 100644 index 000000000..1e778d92d --- /dev/null +++ b/src/state/bison/index.ts @@ -0,0 +1,74 @@ +/* eslint-disable no-param-reassign */ +import { createSlice } from '@reduxjs/toolkit' +import { BisonState } from '../types' + +const initialState: BisonState = { data: { price: 0, totalSupply: 0 } } + +export const bisonSlice = createSlice({ + name: 'Bison', + initialState, + reducers: { + setPriceData: (state, action) => { + const priceData = action.payload + return { data: { ...state.data, price: priceData } } + }, + setTotalSupplyData: (state, action) => { + const totalSupplyData = action.payload + return { data: { ...state.data, totalSupply: totalSupplyData } } + }, + }, +}) + +// Actions +export const { setPriceData, setTotalSupplyData } = bisonSlice.actions + +// Thunks +export const fetchPriceDataAsync = () => async (dispatch) => { + let BISONValue = 0 + await fetch( + 'https://api.stosentertainment.com/price-bnbpool.php?key=236547643&pool=0xe0e3f3698ba35487e5285fdfd31a5b8d8f564d8b&token=0x9eab0a93b0cd5d904493694f041bdcedb97b88c6&decimals=18', + ) + .then((res) => res.json()) + .then( + (result) => { + if (result.status === true) { + BISONValue = 4 + } else { + BISONValue = 0 + } + }, + (error) => { + BISONValue = 0 + }, + ) + .catch(() => { + BISONValue = 0 + }) + dispatch(setPriceData(BISONValue)) +} + +export const fetchTotalSupplyDataAsync = () => async (dispatch) => { + let totalSupplyValue = 0 + await fetch( + 'https://api.bscscan.com/api?module=stats&action=tokenCsupply&contractaddress=0x9eab0a93b0cd5d904493694f041bdcedb97b88c6&apikey=5E61V2DWBJANXNURC6Q991F828E6W5KX1P&decimals=18', + ) + .then((res) => res.json()) + .then( + (result) => { + if (result.status === '1') { + totalSupplyValue = result.result / 10 ** 18 + } else { + totalSupplyValue = 0 + } + }, + (error) => { + totalSupplyValue = 0 + }, + ) + .catch(() => { + totalSupplyValue = 0 + }) + dispatch(setTotalSupplyData(totalSupplyValue)) +} + +export default bisonSlice.reducer diff --git a/src/state/farms/fetchFarmUser.ts b/src/state/farms/fetchFarmUser.ts index dfe813668..c3aafa652 100644 --- a/src/state/farms/fetchFarmUser.ts +++ b/src/state/farms/fetchFarmUser.ts @@ -63,7 +63,7 @@ export const fetchFarmUserEarnings = async (account: string) => { const calls = farmsConfig.map((farm) => { return { address: masterChefAdress, - name: 'pendingEgg', + name: 'pendingReward', params: [farm.pid, account], } }) diff --git a/src/state/farms/fetchFarms.ts b/src/state/farms/fetchFarms.ts index 113350248..907b6cff2 100644 --- a/src/state/farms/fetchFarms.ts +++ b/src/state/farms/fetchFarms.ts @@ -6,6 +6,7 @@ import { getMasterChefAddress } from 'utils/addressHelpers' import farmsConfig from 'config/constants/farms' import { QuoteToken } from '../../config/constants/types' +// const web3 = require('web3'); const CHAIN_ID = process.env.REACT_APP_CHAIN_ID const fetchFarms = async () => { @@ -48,27 +49,21 @@ const fetchFarms = async () => { }, ] - const [ - tokenBalanceLP, - quoteTokenBlanceLP, - lpTokenBalanceMC, - lpTotalSupply, - tokenDecimals, - quoteTokenDecimals - ] = await multicall(erc20, calls) + const [tokenBalanceLP, quoteTokenBlanceLP, lpTokenBalanceMC, lpTotalSupply, tokenDecimals, quoteTokenDecimals] = + await multicall(erc20, calls) - let tokenAmount; - let lpTotalInQuoteToken; - let tokenPriceVsQuote; - if(farmConfig.isTokenOnly){ - tokenAmount = new BigNumber(lpTokenBalanceMC).div(new BigNumber(10).pow(tokenDecimals)); - if(farmConfig.tokenSymbol === QuoteToken.BUSD && farmConfig.quoteTokenSymbol === QuoteToken.BUSD){ - tokenPriceVsQuote = new BigNumber(1); - }else{ - tokenPriceVsQuote = new BigNumber(quoteTokenBlanceLP).div(new BigNumber(tokenBalanceLP)); + let tokenAmount + let lpTotalInQuoteToken + let tokenPriceVsQuote + if (farmConfig.isTokenOnly) { + tokenAmount = new BigNumber(lpTokenBalanceMC).div(new BigNumber(10).pow(tokenDecimals)) + if (farmConfig.tokenSymbol === QuoteToken.BUSD && farmConfig.quoteTokenSymbol === QuoteToken.BUSD) { + tokenPriceVsQuote = new BigNumber(1) + } else { + tokenPriceVsQuote = new BigNumber(quoteTokenBlanceLP).div(new BigNumber(tokenBalanceLP)) } - lpTotalInQuoteToken = tokenAmount.times(tokenPriceVsQuote); - }else{ + lpTotalInQuoteToken = tokenAmount.times(tokenPriceVsQuote) + } else { // Ratio in % a LP tokens that are in staking, vs the total number in circulation const lpTokenRatio = new BigNumber(lpTokenBalanceMC).div(new BigNumber(lpTotalSupply)) @@ -84,14 +79,14 @@ const fetchFarms = async () => { .div(new BigNumber(10).pow(quoteTokenDecimals)) .times(lpTokenRatio) - if(tokenAmount.comparedTo(0) > 0){ - tokenPriceVsQuote = quoteTokenAmount.div(tokenAmount); - }else{ - tokenPriceVsQuote = new BigNumber(quoteTokenBlanceLP).div(new BigNumber(tokenBalanceLP)); + if (tokenAmount.comparedTo(0) > 0) { + tokenPriceVsQuote = quoteTokenAmount.div(tokenAmount) + } else { + tokenPriceVsQuote = new BigNumber(quoteTokenBlanceLP).div(new BigNumber(tokenBalanceLP)) } } - const [info, totalAllocPoint, eggPerBlock] = await multicall(masterchefABI, [ + const [info, totalAllocPoint, lifePerBlock] = await multicall(masterchefABI, [ { address: getMasterChefAddress(), name: 'poolInfo', @@ -103,13 +98,12 @@ const fetchFarms = async () => { }, { address: getMasterChefAddress(), - name: 'eggPerBlock', + name: 'lifePerBlock', }, ]) const allocPoint = new BigNumber(info.allocPoint._hex) const poolWeight = allocPoint.div(new BigNumber(totalAllocPoint)) - return { ...farmConfig, tokenAmount: tokenAmount.toJSON(), @@ -119,7 +113,7 @@ const fetchFarms = async () => { poolWeight: poolWeight.toNumber(), multiplier: `${allocPoint.div(100).toString()}X`, depositFeeBP: info.depositFeeBP, - eggPerBlock: new BigNumber(eggPerBlock).toNumber(), + lifePerBlock: new BigNumber(lifePerBlock).toNumber(), } }), ) diff --git a/src/state/hooks.ts b/src/state/hooks.ts index e614020e5..daa4df005 100644 --- a/src/state/hooks.ts +++ b/src/state/hooks.ts @@ -1,10 +1,18 @@ import BigNumber from 'bignumber.js' import { useEffect, useMemo } from 'react' -import { useSelector, useDispatch } from 'react-redux' +import { useSelector, useDispatch, RootStateOrAny } from 'react-redux' import useRefresh from 'hooks/useRefresh' -import { fetchFarmsPublicDataAsync, fetchPoolsPublicDataAsync, fetchPoolsUserDataAsync } from './actions' -import { State, Farm, Pool } from './types' +import { useAppDispatch } from 'state' +import { + fetchFarmsPublicDataAsync, + fetchPoolsPublicDataAsync, + fetchPoolsUserDataAsync, + fetchPriceDataAsync, + fetchTotalSupplyDataAsync, +} from './actions' +import { State, Farm, Pool, PriceState } from './types' import { QuoteToken } from '../config/constants/types' +import { fetchPrices } from './prices' const ZERO = new BigNumber(0) @@ -13,7 +21,25 @@ export const useFetchPublicData = () => { const { slowRefresh } = useRefresh() useEffect(() => { dispatch(fetchFarmsPublicDataAsync()) - // dispatch(fetchPoolsPublicDataAsync()) + dispatch(fetchPoolsPublicDataAsync()) + }, [dispatch, slowRefresh]) +} + +// For Price +export const useFetchPriceData = () => { + const dispatch = useDispatch() + const { slowRefresh } = useRefresh() + useEffect(() => { + dispatch(fetchPriceDataAsync()) + }, [dispatch, slowRefresh]) +} + +// For Total Supply +export const useFetchTotalSupplyData = () => { + const dispatch = useDispatch() + const { slowRefresh } = useRefresh() + useEffect(() => { + dispatch(fetchTotalSupplyDataAsync()) }, [dispatch, slowRefresh]) } @@ -45,7 +71,6 @@ export const useFarmUser = (pid) => { } } - // Pools export const usePools = (account): Pool[] => { @@ -74,34 +99,68 @@ export const usePriceBnbBusd = (): BigNumber => { return farm.tokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : ZERO } +export const useFetchPriceList = () => { + const { slowRefresh } = useRefresh() + const dispatch = useAppDispatch() + + useEffect(() => { + dispatch(fetchPrices()) + }, [dispatch, slowRefresh]) +} + +export const useGetApiPrices = () => { + const prices: PriceState['data'] = useSelector((state: State) => state.prices.data) + return prices +} + +export const useGetApiPrice = (address: string) => { + const prices = useGetApiPrices() + + if (!prices) { + return null + } + + return prices[address.toLowerCase()] +} + export const usePriceCakeBusd = (): BigNumber => { // const pid = 1 // CAKE-BNB LP // const bnbPriceUSD = usePriceBnbBusd() // const farm = useFarmFromPid(pid) // return farm.tokenPriceVsQuote ? bnbPriceUSD.times(farm.tokenPriceVsQuote) : ZERO - const pid = 0; // EGG-BUSD LP - const farm = useFarmFromPid(pid); - return farm.tokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : ZERO; + const pid = 2 // BISON-BUSD LP + const farm = useFarmFromPid(pid) + return farm.tokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : ZERO +} + +export const useBISONPrice = (): BigNumber => { + const { price } = useSelector((state: RootStateOrAny) => state.bison.data) + return price ? new BigNumber(price) : ZERO +} + +export const useTotalSupplyPrice = (): BigNumber => { + const { totalSupply } = useSelector((state: RootStateOrAny) => state.bison.data) + return totalSupply ? new BigNumber(totalSupply) : ZERO } export const useTotalValue = (): BigNumber => { - const farms = useFarms(); - const bnbPrice = usePriceBnbBusd(); - const cakePrice = usePriceCakeBusd(); - let value = new BigNumber(0); + const farms = useFarms() + const bnbPrice = usePriceBnbBusd() + const cakePrice = usePriceCakeBusd() + let value = new BigNumber(0) for (let i = 0; i < farms.length; i++) { const farm = farms[i] if (farm.lpTotalInQuoteToken) { - let val; + let val if (farm.quoteTokenSymbol === QuoteToken.BNB) { - val = (bnbPrice.times(farm.lpTotalInQuoteToken)); - }else if (farm.quoteTokenSymbol === QuoteToken.CAKE) { - val = (cakePrice.times(farm.lpTotalInQuoteToken)); - }else{ - val = (farm.lpTotalInQuoteToken); + val = bnbPrice.times(farm.lpTotalInQuoteToken) + } else if (farm.quoteTokenSymbol === QuoteToken.CAKE) { + val = cakePrice.times(farm.lpTotalInQuoteToken) + } else { + val = farm.lpTotalInQuoteToken } - value = value.plus(val); + value = value.plus(val) } } - return value; -} \ No newline at end of file + return value +} diff --git a/src/state/index.ts b/src/state/index.ts index 612a4c6c2..c04fee09d 100644 --- a/src/state/index.ts +++ b/src/state/index.ts @@ -1,11 +1,24 @@ import { configureStore } from '@reduxjs/toolkit' +import { useDispatch } from 'react-redux' import farmsReducer from './farms' import poolsReducer from './pools' +import pricesReducer from './prices' +import bisonReducer from './bison' -export default configureStore({ +const store = configureStore({ devTools: process.env.NODE_ENV !== 'production', reducer: { farms: farmsReducer, pools: poolsReducer, + bison: bisonReducer, + prices: pricesReducer, }, }) + +/** + * @see https://redux-toolkit.js.org/usage/usage-with-typescript#getting-the-dispatch-type + */ +export type AppDispatch = typeof store.dispatch +export const useAppDispatch = () => useDispatch() + +export default store diff --git a/src/state/pools/fetchPoolsUser.ts b/src/state/pools/fetchPoolsUser.ts index 0ef670ade..08a84aa93 100644 --- a/src/state/pools/fetchPoolsUser.ts +++ b/src/state/pools/fetchPoolsUser.ts @@ -17,7 +17,7 @@ const nonBnbPools = poolsConfig.filter((p) => p.stakingTokenName !== QuoteToken. const bnbPools = poolsConfig.filter((p) => p.stakingTokenName === QuoteToken.BNB) const nonMasterPools = poolsConfig.filter((p) => p.sousId !== 0) const web3 = getWeb3() -const masterChefContract = new web3.eth.Contract((masterChefABI as unknown) as AbiItem, getMasterChefAddress()) +const masterChefContract = new web3.eth.Contract(masterChefABI as unknown as AbiItem, getMasterChefAddress()) export const fetchPoolsAllowance = async (account) => { const calls = nonBnbPools.map((p) => ({ @@ -93,7 +93,7 @@ export const fetchUserPendingRewards = async (account) => { ) // Cake / Cake pool - const pendingReward = await masterChefContract.methods.pendingEgg('0', account).call() + const pendingReward = await masterChefContract.methods.pendingLife('0', account).call() return { ...pendingRewards, 0: new BigNumber(pendingReward).toJSON() } } diff --git a/src/state/prices/index.ts b/src/state/prices/index.ts new file mode 100644 index 000000000..418a60550 --- /dev/null +++ b/src/state/prices/index.ts @@ -0,0 +1,43 @@ +/* eslint-disable no-param-reassign */ +import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit' +import { PriceApiResponse, PriceApiThunk, PriceState } from 'state/types' + +const initialState: PriceState = { + isLoading: false, + lastUpdated: null, + data: null, +} + +// Thunks +export const fetchPrices = createAsyncThunk('prices/fetch', async () => { + const response = await fetch('https://api.pancakeswap.info/api/v2/tokens') + const data = (await response.json()) as PriceApiResponse + // Return normalized token names + return { + updated_at: data.updated_at, + data: Object.keys(data.data).reduce((accum, token) => { + return { + ...accum, + [token.toLowerCase()]: parseFloat(data.data[token].price), + } + }, {}), + } +}) + +export const pricesSlice = createSlice({ + name: 'prices', + initialState, + reducers: {}, + extraReducers: (builder) => { + builder.addCase(fetchPrices.pending, (state) => { + state.isLoading = true + }) + builder.addCase(fetchPrices.fulfilled, (state, action: PayloadAction) => { + state.isLoading = false + state.lastUpdated = action.payload.updated_at + state.data = action.payload.data + }) + }, +}) + +export default pricesSlice.reducer diff --git a/src/state/types.ts b/src/state/types.ts index fcced15e0..d658d5a0d 100644 --- a/src/state/types.ts +++ b/src/state/types.ts @@ -8,8 +8,8 @@ export interface Farm extends FarmConfig { tokenPriceVsQuote?: BigNumber poolWeight?: number depositFeeBP?: number - eggPerBlock?: number - userData?: { + lifePerBlock?: number + userData?: { allowance: BigNumber tokenBalance: BigNumber stakedBalance: BigNumber @@ -34,14 +34,54 @@ export interface Pool extends PoolConfig { export interface FarmsState { data: Farm[] } +export interface BisonState { + data: any +} export interface PoolsState { data: Pool[] } +// API Price State +export interface PriceApiList { + /* eslint-disable camelcase */ + [key: string]: { + name: string + symbol: string + price: string + price_BNB: string + } +} + +export interface PriceApiListThunk { + /* eslint-disable camelcase */ + [key: string]: number +} + +export interface PriceApiResponse { + /* eslint-disable camelcase */ + updated_at: string + data: PriceApiList +} + +export interface PriceApiThunk { + /* eslint-disable camelcase */ + updated_at: string + data: PriceApiListThunk +} + +export interface PriceState { + isLoading: boolean + lastUpdated: string + data: PriceApiListThunk +} + // Global state +// Global state export interface State { farms: FarmsState pools: PoolsState + prices: PriceState + bison: BisonState } diff --git a/src/style/Global.tsx b/src/style/Global.tsx index 9ad075996..29ad6a622 100644 --- a/src/style/Global.tsx +++ b/src/style/Global.tsx @@ -9,10 +9,11 @@ declare module 'styled-components' { const GlobalStyle = createGlobalStyle` * { - font-family: 'Kanit', sans-serif; + font-family: 'Poppins', sans-serif; } body { background-color: ${({ theme }) => theme.colors.background}; + overflow-x: hidden; img { height: auto; diff --git a/src/utils/apr.js b/src/utils/apr.js new file mode 100644 index 000000000..ba7fc7f5f --- /dev/null +++ b/src/utils/apr.js @@ -0,0 +1,39 @@ +import BigNumber from 'bignumber.js' +import { BLOCKS_PER_YEAR, CAKE_PER_BLOCK } from 'config' + +/** + * Get the APR value in % + * @param stakingTokenPrice Token price in the same quote currency + * @param rewardTokenPrice Token price in the same quote currency + * @param totalStaked Total amount of stakingToken in the pool + * @param tokenPerBlock Amount of new cake allocated to the pool for each new block + * @returns Null if the APR is NaN or infinite. + */ +export const getPoolApr = (stakingTokenPrice, rewardTokenPrice, totalStaked, tokenPerBlock) => { + const totalRewardPricePerYear = new BigNumber(rewardTokenPrice).times(tokenPerBlock).times(BLOCKS_PER_YEAR) + const totalStakingTokenInPool = new BigNumber(stakingTokenPrice).times(totalStaked) + const apr = totalRewardPricePerYear.div(totalStakingTokenInPool).times(100) + return apr.isNaN() || !apr.isFinite() ? null : apr.toNumber() +} + +/** + * Get farm APR value in % + * @param poolWeight allocationPoint / totalAllocationPoint + * @param cakePriceUsd Cake price in USD + * @param poolLiquidityUsd Total pool liquidity in USD + * @returns + */ +export const getFarmApr = (poolWeight, cakePriceUsd, poolLiquidityUsd) => { + const yearlyCakeRewardAllocation = CAKE_PER_BLOCK.times(BLOCKS_PER_YEAR).times(poolWeight) + const apr = yearlyCakeRewardAllocation.times(cakePriceUsd).div(poolLiquidityUsd).times(100) + return apr.isNaN() || !apr.isFinite() ? null : apr.toNumber() +} + +export const getLPprice = async () => { + const response = await fetch('https://api.pancakeswap.info/api/v2/pairs') + const data = await response.json() + + return data.data +} + +export default null diff --git a/src/utils/erc20.ts b/src/utils/erc20.ts index 2fde60b89..9ed43084d 100644 --- a/src/utils/erc20.ts +++ b/src/utils/erc20.ts @@ -6,7 +6,7 @@ import erc20 from 'config/abi/erc20.json' export const getContract = (provider: ProviderType, address: string) => { const web3 = new Web3(provider) - const contract = new web3.eth.Contract((erc20 as unknown) as AbiItem, address) + const contract = new web3.eth.Contract(erc20 as unknown as AbiItem, address) return contract } diff --git a/src/utils/getAvatar.ts b/src/utils/getAvatar.ts new file mode 100644 index 000000000..cba0290e1 --- /dev/null +++ b/src/utils/getAvatar.ts @@ -0,0 +1,12 @@ +const getAvatar = (poolName) => { + switch (poolName) { + case 'biAPE-BNB APE': + return 'biAPE' + case 'biCHAIN-BNB ARBX': + return 'biChain' + default: + return 'BISON' + } +} + +export default getAvatar diff --git a/src/utils/multicall.ts b/src/utils/multicall.ts index e0d55afed..98f6cec23 100644 --- a/src/utils/multicall.ts +++ b/src/utils/multicall.ts @@ -12,7 +12,7 @@ interface Call { const multicall = async (abi: any[], calls: Call[]) => { const web3 = getWeb3() - const multi = new web3.eth.Contract((MultiCallAbi as unknown) as AbiItem, getMulticallAddress()) + const multi = new web3.eth.Contract(MultiCallAbi as unknown as AbiItem, getMulticallAddress()) const itf = new Interface(abi) const calldata = calls.map((call) => [call.address.toLowerCase(), itf.encodeFunctionData(call.name, call.params)]) diff --git a/src/utils/web3.ts b/src/utils/web3.ts index 5fc43e3f5..8a4c1d5d8 100644 --- a/src/utils/web3.ts +++ b/src/utils/web3.ts @@ -16,7 +16,7 @@ const getWeb3 = () => { } const getContract = (abi: any, address: string, contractOptions?: ContractOptions) => { const web3 = getWeb3() - return new web3.eth.Contract((abi as unknown) as AbiItem, address, contractOptions) + return new web3.eth.Contract(abi as unknown as AbiItem, address, contractOptions) } export { getWeb3, getContract, httpProvider } diff --git a/src/views/ApolloWrap/index.tsx b/src/views/ApolloWrap/index.tsx new file mode 100644 index 000000000..1db450fa9 --- /dev/null +++ b/src/views/ApolloWrap/index.tsx @@ -0,0 +1,13 @@ +import React, { FC } from 'react' +import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client' + +import { API_APE_SWAP_GRAPH } from '../../constants/routes.constants' + +const client = new ApolloClient({ + uri: API_APE_SWAP_GRAPH, + cache: new InMemoryCache(), +}) + +const ApolloWrap: FC = ({ children }) => {children} + +export default ApolloWrap diff --git a/src/views/BnbPriceContextWrap/index.tsx b/src/views/BnbPriceContextWrap/index.tsx new file mode 100644 index 000000000..d91b4b1f3 --- /dev/null +++ b/src/views/BnbPriceContextWrap/index.tsx @@ -0,0 +1,11 @@ +import React from 'react' + +import { BnbPriceContext, useBnbPrice } from 'hooks/useBnbPrice' + +const BnbPriceContextProvider = ({ children }) => { + const price = useBnbPrice() + + return {children} +} + +export default BnbPriceContextProvider diff --git a/src/views/ConnectWallet/index.tsx b/src/views/ConnectWallet/index.tsx new file mode 100644 index 000000000..85cd8e462 --- /dev/null +++ b/src/views/ConnectWallet/index.tsx @@ -0,0 +1,38 @@ +import React from 'react' +import { useWalletModal } from '@pancakeswap-libs/uikit' +import { useWallet } from '@binance-chain/bsc-use-wallet' + +import Button from '../../components/Button' + +import { ZapOffIcon, LogIn, AlertTriangle } from '../../constants/icon.constants' +import { CHAIN_ID } from '../../constants/global.constants' + +import useStyles from './styles.module' + +const ConnectWallet = () => { + const classes = useStyles() + const { connect, reset, account, chainId } = useWallet() + const { onPresentConnectModal } = useWalletModal(connect, reset) + + return ( +
+ {!!account && chainId !== CHAIN_ID ? ( + <> +
{AlertTriangle}
+
WRONG NETWORK DETECTED
+
Please connect to the Binance Smart Chain Network
+ + ) : ( + <> +
{ZapOffIcon}
+
Connect a Wallet to ACCESS the DASHBOARD
+ + + )} +
+ ) +} + +export default ConnectWallet diff --git a/src/views/ConnectWallet/styles.module.ts b/src/views/ConnectWallet/styles.module.ts new file mode 100644 index 000000000..296050c68 --- /dev/null +++ b/src/views/ConnectWallet/styles.module.ts @@ -0,0 +1,39 @@ +import { makeStyles } from '@material-ui/core/styles' + +const useStyles = makeStyles(() => ({ + wrap: { + background: '#1E1F20', + border: '1px solid #4D4D4D', + borderRadius: '32px', + padding: '40px 65px', + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + position: 'absolute', + top: '50%', + left: '50%', + transform: 'translate(-50%, -50%)', + }, + + text: { + textTransform: 'uppercase', + margin: '20px 0 32px', + maxWidth: '230px', + textAlign: 'center', + lineHeight: '25px', + color: '#FFF', + }, + + description: { + color: '#9F9F9F', + margin: ' -10px 0 32px', + }, + + button: { + '& svg': { + marginRight: '12px', + }, + }, +})) + +export default useStyles diff --git a/src/views/Farms/Farms.tsx b/src/views/Farms/Farms.tsx index 02d5118fc..1e6629d00 100644 --- a/src/views/Farms/Farms.tsx +++ b/src/views/Farms/Farms.tsx @@ -17,7 +17,7 @@ import FarmCard, { FarmWithStakedValue } from './components/FarmCard/FarmCard' import FarmTabButtons from './components/FarmTabButtons' import Divider from './components/Divider' -export interface FarmsProps{ +export interface FarmsProps { tokenMode?: boolean } @@ -28,7 +28,7 @@ const Farms: React.FC = (farmsProps) => { const cakePrice = usePriceCakeBusd() const bnbPrice = usePriceBnbBusd() const { account, ethereum }: { account: string; ethereum: provider } = useWallet() - const {tokenMode} = farmsProps; + const { tokenMode } = farmsProps const dispatch = useDispatch() const { fastRefresh } = useRefresh() @@ -40,8 +40,19 @@ const Farms: React.FC = (farmsProps) => { const [stakedOnly, setStakedOnly] = useState(false) - const activeFarms = farmsLP.filter((farm) => !!farm.isTokenOnly === !!tokenMode && farm.multiplier !== '0X') - const inactiveFarms = farmsLP.filter((farm) => !!farm.isTokenOnly === !!tokenMode && farm.multiplier === '0X') + // const activeFarms = farmsLP.filter( + // (farm) => !!farm.isTokenOnly === !!tokenMode && farm.multiplier !== '0X' && farm.lpSymbol !== 'BNB-BUSD LP', + // ) + // const inactiveFarms = farmsLP.filter( + // (farm) => !!farm.isTokenOnly === !!tokenMode && farm.multiplier === '0X' && farm.lpSymbol !== 'BNB-BUSD LP', + // ) + + const activeFarms = farmsLP.filter( + (farm) => farm.multiplier !== '0X' && farm.lpSymbol !== 'BNB-BUSD LP' && farm.lpSymbol !== 'BISON-BUSD LP', + ) + const inactiveFarms = farmsLP.filter( + (farm) => farm.multiplier === '0X' && farm.lpSymbol !== 'BNB-BUSD LP' && farm.lpSymbol !== 'BISON-BUSD LP', + ) const stakedOnlyFarms = activeFarms.filter( (farm) => farm.userData && new BigNumber(farm.userData.stakedBalance).isGreaterThan(0), @@ -57,19 +68,21 @@ const Farms: React.FC = (farmsProps) => { // if (!farm.tokenAmount || !farm.lpTotalInQuoteToken || !farm.lpTotalInQuoteToken) { // return farm // } - const cakeRewardPerBlock = new BigNumber(farm.eggPerBlock || 1).times(new BigNumber(farm.poolWeight)) .div(new BigNumber(10).pow(18)) + const cakeRewardPerBlock = new BigNumber(farm.lifePerBlock || 1) + .times(new BigNumber(farm.poolWeight)) + .div(new BigNumber(10).pow(18)) const cakeRewardPerYear = cakeRewardPerBlock.times(BLOCKS_PER_YEAR) - let apy = cakePrice.times(cakeRewardPerYear); + let apy = cakePrice.times(cakeRewardPerYear) - let totalValue = new BigNumber(farm.lpTotalInQuoteToken || 0); + let totalValue = new BigNumber(farm.lpTotalInQuoteToken || 0) if (farm.quoteTokenSymbol === QuoteToken.BNB) { - totalValue = totalValue.times(bnbPrice); + totalValue = totalValue.times(bnbPrice) } - if(totalValue.comparedTo(0) > 0){ - apy = apy.div(totalValue); + if (totalValue.comparedTo(0) > 0) { + apy = apy.div(totalValue) } return { ...farm, apy } @@ -92,17 +105,14 @@ const Farms: React.FC = (farmsProps) => { return ( - { - tokenMode ? - TranslateString(10002, 'Stake tokens to earn EGG') - : - TranslateString(320, 'Stake LP tokens to earn EGG') - } + {tokenMode + ? TranslateString(10002, 'Stake tokens to earn BISON') + : TranslateString(320, 'Stake LP tokens to earn BISON')} - {TranslateString(10000, 'Deposit Fee will be used to buyback EGG')} + {TranslateString(10000, 'Deposit Fee will be used to buyback BISON')} - +
@@ -114,7 +124,7 @@ const Farms: React.FC = (farmsProps) => {
- illustration + {/* illustration */}
) } diff --git a/src/views/Farms/components/DepositModal.tsx b/src/views/Farms/components/DepositModal.tsx index b9d27bb04..eafd07bf2 100644 --- a/src/views/Farms/components/DepositModal.tsx +++ b/src/views/Farms/components/DepositModal.tsx @@ -14,7 +14,7 @@ interface DepositModalProps { depositFeeBP?: number } -const DepositModal: React.FC = ({ max, onConfirm, onDismiss, tokenName = '' , depositFeeBP = 0}) => { +const DepositModal: React.FC = ({ max, onConfirm, onDismiss, tokenName = '', depositFeeBP = 0 }) => { const [val, setVal] = useState('') const [pendingTx, setPendingTx] = useState(false) const TranslateString = useI18n() diff --git a/src/views/Farms/components/FarmCard/ApyButton.tsx b/src/views/Farms/components/FarmCard/ApyButton.tsx index dd9562a01..1bf9f68ae 100644 --- a/src/views/Farms/components/FarmCard/ApyButton.tsx +++ b/src/views/Farms/components/FarmCard/ApyButton.tsx @@ -11,6 +11,7 @@ export interface ApyButtonProps { quoteTokenAdresses?: Address quoteTokenSymbol?: string tokenAddresses: Address + factory: string } const ApyButton: React.FC = ({ @@ -20,6 +21,7 @@ const ApyButton: React.FC = ({ tokenAddresses, cakePrice, apy, + factory, }) => { const [onPresentApyModal] = useModal( = ({ tokenAddresses={tokenAddresses} cakePrice={cakePrice} apy={apy} + factory={factory} />, ) diff --git a/src/views/Farms/components/FarmCard/ApyCalculatorModal.tsx b/src/views/Farms/components/FarmCard/ApyCalculatorModal.tsx index c511ef061..f5fbe7e60 100644 --- a/src/views/Farms/components/FarmCard/ApyCalculatorModal.tsx +++ b/src/views/Farms/components/FarmCard/ApyCalculatorModal.tsx @@ -15,6 +15,7 @@ interface ApyCalculatorModalProps { quoteTokenAdresses?: Address quoteTokenSymbol?: string tokenAddresses: Address + factory: string } const Grid = styled.div` @@ -41,6 +42,7 @@ const ApyCalculatorModal: React.FC = ({ tokenAddresses, cakePrice, apy, + factory, }) => { const TranslateString = useI18n() const liquidityUrlPathParts = getLiquidityUrlPathParts({ quoteTokenAdresses, quoteTokenSymbol, tokenAddresses }) @@ -67,7 +69,7 @@ const ApyCalculatorModal: React.FC = ({ - {TranslateString(999, 'EGG per $1000')} + {TranslateString(999, 'BISON per $1000')} {/* 1 day row */} @@ -126,9 +128,16 @@ const ApyCalculatorModal: React.FC = ({ )} - - {TranslateString(999, 'Get')} {lpLabel} - + {factory === 'pcs' && ( + + {TranslateString(999, 'Get')} {lpLabel} + + )} + {factory === 'ape' && ( + + {TranslateString(999, 'Get')} {lpLabel} + + )} ) diff --git a/src/views/Farms/components/FarmCard/CardActionsContainer.tsx b/src/views/Farms/components/FarmCard/CardActionsContainer.tsx index 07816bc8f..7a2cbc820 100644 --- a/src/views/Farms/components/FarmCard/CardActionsContainer.tsx +++ b/src/views/Farms/components/FarmCard/CardActionsContainer.tsx @@ -31,15 +31,15 @@ const CardActions: React.FC = ({ farm, ethereum, account } const { pid, lpAddresses, tokenAddresses, isTokenOnly, depositFeeBP } = useFarmFromPid(farm.pid) const { allowance, tokenBalance, stakedBalance, earnings } = useFarmUser(pid) const lpAddress = lpAddresses[process.env.REACT_APP_CHAIN_ID] - const tokenAddress = tokenAddresses[process.env.REACT_APP_CHAIN_ID]; + const tokenAddress = tokenAddresses[process.env.REACT_APP_CHAIN_ID] const lpName = farm.lpSymbol.toUpperCase() const isApproved = account && allowance && allowance.isGreaterThan(0) const lpContract = useMemo(() => { - if(isTokenOnly){ - return getContract(ethereum as provider, tokenAddress); + if (isTokenOnly) { + return getContract(ethereum as provider, tokenAddress) } - return getContract(ethereum as provider, lpAddress); + return getContract(ethereum as provider, lpAddress) }, [ethereum, lpAddress, tokenAddress, isTokenOnly]) const { onApprove } = useApprove(lpContract) @@ -56,7 +56,13 @@ const CardActions: React.FC = ({ farm, ethereum, account } const renderApprovalOrStakeButton = () => { return isApproved ? ( - + ) : ( - : null} + ) : null} ) : ( diff --git a/src/views/Home/components/TotalValueLockedCard.tsx b/src/views/Home/components/TotalValueLockedCard.tsx index 79dc9a8ac..4ff60d606 100644 --- a/src/views/Home/components/TotalValueLockedCard.tsx +++ b/src/views/Home/components/TotalValueLockedCard.tsx @@ -15,7 +15,7 @@ const StyledTotalValueLockedCard = styled(Card)` const TotalValueLockedCard = () => { const TranslateString = useI18n() // const data = useGetStats() - const totalValue = useTotalValue(); + const totalValue = useTotalValue() // const tvl = totalValue.toFixed(2); return ( @@ -27,7 +27,7 @@ const TotalValueLockedCard = () => { <> {/* {`$${tvl}`} */} {/* */} - + {/* */} {TranslateString(999, 'Across all Farms and Pools')} diff --git a/src/views/Home/components/TwitterCard.tsx b/src/views/Home/components/TwitterCard.tsx index bbf98af3a..7a98d8f33 100644 --- a/src/views/Home/components/TwitterCard.tsx +++ b/src/views/Home/components/TwitterCard.tsx @@ -35,12 +35,12 @@ const TwitterCard = () => { diff --git a/src/views/Layout/Footer/index.tsx b/src/views/Layout/Footer/index.tsx new file mode 100644 index 000000000..8aa6ab9d6 --- /dev/null +++ b/src/views/Layout/Footer/index.tsx @@ -0,0 +1,107 @@ +import React from 'react' +import classNames from 'classnames' +import { Grid, AppBar, Toolbar, Typography, Link as MaterialLink } from '@material-ui/core' +import useMediaQuery from '@material-ui/core/useMediaQuery' + +import { TwitterIcon, GitHub, TelegramIcon, MediumSquareIcon, DiscordIcon } from '../../../constants/icon.constants' + +import useStyles from './styles.module' + +const footerLinks = [ + { + icon: TwitterIcon, + href: 'https://twitter.com/BiSharesFinance', + }, + { + icon: GitHub, + href: 'https://github.com/bisharesindexfund', + }, + { + icon: TelegramIcon, + href: 'https://t.me/bishares', + }, + { + icon: MediumSquareIcon, + href: 'https://bi-shares.medium.com', + }, + { + icon: DiscordIcon, + href: 'https://discord.com/invite/w2jejq5rBP', + }, +] + +const Footer = () => { + const classes = useStyles() + const matches = useMediaQuery('(max-width:1350px)') + + return ( + + + + + {footerLinks.map((item) => ( + + + {item.icon} + + + ))} + + + + + Gordian Audit + + + + + DefiYield Audit + + + + + + + © 2021 by Bishares Finance + + + + + + + ) +} + +export default Footer diff --git a/src/views/Layout/Footer/styles.module.ts b/src/views/Layout/Footer/styles.module.ts new file mode 100644 index 000000000..c7b9b7816 --- /dev/null +++ b/src/views/Layout/Footer/styles.module.ts @@ -0,0 +1,37 @@ +import { makeStyles } from '@material-ui/core/styles' + +const useStyles = makeStyles(() => ({ + footer: { + width: '100vw', + backgroundColor: '#1E1F20', + padding: '49px 33px', + boxSizing: 'border-box', + }, + title: { + color: '#9F9F9F', + }, + + link: { + display: 'flex', + alignItems: 'flex-end', + }, + mobileIcon: { + '@media (max-width: 1280px)': { + marginBottom: '10px', + }, + }, + copyrightTitle: { + display: 'flex', + justifyContent: 'flex-end', + '@media (max-width: 1280px)': { + justifyContent: 'center', + }, + }, + centerLink: { + display: 'flex', + justifyContent: 'center', + marginBottom: '5px', + }, +})) + +export default useStyles diff --git a/src/views/Layout/Header/index.tsx b/src/views/Layout/Header/index.tsx new file mode 100644 index 000000000..9c7bcb732 --- /dev/null +++ b/src/views/Layout/Header/index.tsx @@ -0,0 +1,128 @@ +import React, { useState, useMemo } from 'react' +import classNames from 'classnames' +import { Grid, AppBar, Toolbar, Button as MuButton } from '@material-ui/core' +import { Link } from 'react-router-dom' +import useMediaQuery from '@material-ui/core/useMediaQuery' +import { Image, useWalletModal } from '@pancakeswap-libs/uikit' +import { useWallet } from '@binance-chain/bsc-use-wallet' +import Menu from '@material-ui/core/Menu' +import MenuItem from '@material-ui/core/MenuItem' + +import Button from '../../../components/Button' + +import LogOutModal from '../../modal/LogOutModal' + +import { LogIn, Wallet, ArrowDownIcon } from '../../../constants/icon.constants' +import { + PATH_INDEX, + LINK_PATH_HOME, + LINK_PATH_ABOUT, + LINK_PATH_FUNDS, + LINK_PATH_ARBX, +} from '../../../constants/routes.constants' + +import useStyles from './styles.module' + +const Header = () => { + const classes = useStyles() + const [isLogOutModal, setLogOutModal] = useState(false) + const [isDropDown, setDropDown] = useState(null) + const matches = useMediaQuery('(max-width:960px)') + const { connect, reset, account } = useWallet() + const { onPresentConnectModal } = useWalletModal(connect, reset) + + const walletAddress = useMemo( + () => account && `${account?.slice(0, 7)}...${account?.slice(account?.length - 4, account?.length)}`, + [account], + ) + + return ( + + + + + + logo + + + {!matches && ( + + + Home + + + About + + + Funds + + + ArbEx + + + )} + + {account ? ( + + ) : ( + + )} + + {matches && ( + + + setDropDown(null)} + > + + Home + + + About + + + Funds + + + ArbEx + + + + )} + + {isLogOutModal && setLogOutModal(false)} title={walletAddress} account={account} />} + + + ) +} + +export default Header diff --git a/src/views/Layout/Header/styles.module.ts b/src/views/Layout/Header/styles.module.ts new file mode 100644 index 000000000..4fcedc626 --- /dev/null +++ b/src/views/Layout/Header/styles.module.ts @@ -0,0 +1,39 @@ +import { makeStyles } from '@material-ui/core/styles' + +const useStyles = makeStyles(() => ({ + header: { + padding: '36px 32px', + backgroundColor: '#191919', + minHeight: '5vh', + background: 'linear-gradient(90deg, rgba(0,0,0,0) 60%, rgba(219,165,23,0.542454481792717) 160%)', + borderBottom: '1px solid #4D4D4D', + }, + link: { + color: '#CACACA', + fontSize: '16px', + textTransform: 'capitalize', + fontWeight: 'bold', + margin: '0 6px', + }, + button: { + textTransform: 'none', + fontSize: '18px', + position: 'relative', + '& svg': { + marginRight: '8px', + }, + }, + mobileButton: { + width: '51px', + height: '63px', + '& svg': { + marginRight: '0', + }, + }, + linMenu: { + textDecoration: 'none', + color: '#DAA10E', + }, +})) + +export default useStyles diff --git a/src/views/Layout/index.tsx b/src/views/Layout/index.tsx new file mode 100644 index 000000000..6f841d877 --- /dev/null +++ b/src/views/Layout/index.tsx @@ -0,0 +1,26 @@ +import React, { FC } from 'react' +import { Grid } from '@material-ui/core' + +import Header from './Header' +import Footer from './Footer' + +import useStyles from './styles.module' + +const Layout: FC = ({ children }) => { + const classes = useStyles() + return ( + + +
+ + + {children} + + +