├── .env ├── .env,devnet ├── .env.mainnet ├── .env.testnet ├── .gitignore ├── .htaccess ├── README.md ├── components ├── BrowserHelper.js ├── CoinStaking │ ├── Admin.tsx │ └── Flip.tsx ├── Layout │ ├── Footer.tsx │ ├── Layout.tsx │ ├── Navbar.tsx │ ├── SSilder.tsx │ └── TopHeader.tsx ├── Notification │ ├── context.ts │ ├── element.tsx │ ├── index.tsx │ └── useData.ts ├── Shared │ └── GoTop.tsx ├── StarryGalaxy.js └── ToggleSwitch │ └── index.tsx ├── contexts ├── ThemeContext.tsx └── cosmwasm.tsx ├── hooks ├── cosmwasm.tsx └── useTheme.tsx ├── lib └── useInterval.js ├── next-env.d.ts ├── next.config.js ├── package.json ├── pages ├── Home │ └── index.tsx ├── _app.tsx ├── adminview.tsx └── index.tsx ├── public ├── css │ ├── animate.min.css │ ├── blackHole.css │ ├── bootstrap.min.css │ ├── boxicons.min.css │ ├── custom.css │ ├── dataTables.min.css │ ├── fontawesome.min.css │ ├── meanmenu.min.css │ ├── responsive.css │ ├── responsive.css.map │ ├── responsive.scss │ ├── style.css │ ├── style.css.map │ └── style.scss ├── fonts │ ├── boxicons.eot │ ├── boxicons.svg │ ├── boxicons.ttf │ ├── boxicons.woff │ ├── boxicons.woff2 │ ├── fa-brands-400.eot │ ├── fa-brands-400.svg │ ├── fa-brands-400.ttf │ ├── fa-brands-400.woff │ ├── fa-brands-400.woff2 │ ├── fa-regular-400.eot │ ├── fa-regular-400.svg │ ├── fa-regular-400.ttf │ ├── fa-regular-400.woff │ ├── fa-regular-400.woff2 │ ├── fa-solid-900.eot │ ├── fa-solid-900.svg │ ├── fa-solid-900.ttf │ ├── fa-solid-900.woff │ └── fa-solid-900.woff2 └── images │ ├── Discord-Logo-White.png │ ├── about.jpg │ ├── advisor │ ├── advisor-img1.jpg │ ├── advisor-img2.jpg │ ├── advisor-img3.jpg │ ├── advisor-img4.jpg │ ├── advisor-img5.jpg │ ├── advisor-img6.jpg │ ├── advisor-img7.jpg │ └── advisor-img8.jpg │ ├── aggregator │ ├── logo.png │ └── metahuahua.png │ ├── app.png │ ├── apple-store.png │ ├── banner │ ├── banner-bg1.jpg │ ├── banner-img1.png │ ├── banner-img2.png │ └── banner-img3.png │ ├── bg.jpg │ ├── bg2.jpg │ ├── bg3.jpg │ ├── bg4.jpg │ ├── bg5.jpg │ ├── bitcoin.png │ ├── bitcoin2.png │ ├── bitconnect.png │ ├── blog │ ├── blog1.jpg │ ├── blog2.jpg │ ├── blog3.jpg │ ├── blog4.jpg │ ├── blog5.jpg │ └── blog6.jpg │ ├── cardano.png │ ├── coinflip │ ├── logo.png │ └── logo_old.png │ ├── confirm-order.jpg │ ├── convert-currency.png │ ├── create-account.jpg │ ├── cryptocurrency-platform │ ├── cryptocurrency-platform-1.jpg │ ├── cryptocurrency-platform-2.jpg │ ├── cryptocurrency-platform-3.jpg │ └── cryptocurrency-platform-4.jpg │ ├── cryptocurrency │ ├── atom.png │ ├── binance.png │ ├── bitcoin.png │ ├── btt.png │ ├── cardano.png │ ├── chart1.png │ ├── chart2.png │ ├── chart3.png │ ├── chart4.png │ ├── cryptocurrency1.png │ ├── cryptocurrency2.png │ ├── cryptocurrency3.png │ ├── cryptocurrency4.png │ ├── cryptocurrency5.png │ ├── cryptocurrency6.png │ ├── cryptocurrency7.png │ ├── cryptocurrency8.png │ ├── dash.png │ ├── ethereum.png │ ├── kusama.png │ ├── lightcoin.png │ ├── link.png │ ├── neo.png │ ├── polkadot.png │ ├── stellar.png │ ├── sushi.png │ ├── tether.png │ ├── tezos.png │ ├── tron.png │ ├── uniswap.png │ ├── usd-coin.png │ ├── wrapped.png │ └── xrp.png │ ├── digibyte.png │ ├── ethereum.png │ ├── favicon.png │ ├── features │ ├── features-img1.png │ ├── features-img2.png │ ├── features-img3.png │ ├── features-img4.png │ ├── features-img5.png │ └── features-img6.png │ ├── groestlcoin.png │ ├── gulden.png │ ├── history │ ├── history1.jpg │ ├── history2.jpg │ ├── history3.jpg │ ├── history4.jpg │ └── history5.jpg │ ├── icon-bg.png │ ├── icon │ ├── icon1.png │ ├── icon10.png │ ├── icon11.png │ ├── icon12.png │ ├── icon13.png │ ├── icon14.png │ ├── icon15.png │ ├── icon16.png │ ├── icon17.png │ ├── icon18.png │ ├── icon19.png │ ├── icon2.png │ ├── icon20.png │ ├── icon3.png │ ├── icon4.png │ ├── icon5.png │ ├── icon6.png │ ├── icon7.png │ ├── icon8.png │ └── icon9.png │ ├── juno.png │ ├── logo.png │ ├── logo10.png │ ├── man-with-ipad.png │ ├── man.png │ ├── master-card.png │ ├── noise.gif │ ├── omisego.png │ ├── ontology.png │ ├── payment-method.jpg │ ├── payment │ ├── american-express.png │ ├── apple-pay.png │ ├── giro-pay.png │ ├── google-pay.png │ ├── ideal.png │ ├── master-card.png │ ├── paypal.png │ ├── skrill.png │ ├── stripe.png │ └── visa.png │ ├── paypal.png │ ├── peercoin.png │ ├── play-store.png │ ├── portfolio │ └── portfolio-img1.png │ ├── qtum.png │ ├── select-coin.jpg │ ├── select-payment.jpg │ ├── shape │ ├── shape1.png │ ├── shape10.png │ ├── shape11.png │ ├── shape12.png │ ├── shape13.png │ ├── shape14.png │ ├── shape15.png │ ├── shape2.png │ ├── shape3.png │ ├── shape4.png │ ├── shape5.png │ ├── shape6.png │ ├── shape7.png │ ├── shape8.png │ └── shape9.png │ ├── sort_asc.png │ ├── sort_both.png │ ├── sort_desc.png │ ├── stake │ ├── loading.gif │ └── rocket.gif │ ├── star.png │ ├── telegram2.png │ ├── tokens.jpg │ ├── user │ ├── user1.jpg │ ├── user2.jpg │ ├── user3.jpg │ ├── user4.jpg │ ├── user5.jpg │ └── user6.jpg │ ├── visa.png │ ├── wallet.png │ ├── women-with-tab.png │ ├── women.png │ └── zcash.png ├── services └── keplr.tsx ├── store.tsx ├── themes ├── index.tsx ├── primary.tsx └── theme1.tsx ├── tsconfig.json ├── util ├── ActiveLink.tsx └── conversion.tsx ├── yarn-error.log └── yarn.lock /.env: -------------------------------------------------------------------------------- 1 | # Token sale site config 2 | NEXT_PUBLIC_SITE_TITLE=Staking 3 | NEXT_PUBLIC_SITE_ICON_URL=/juno.svg 4 | 5 | 6 | # Chain config 7 | NEXT_PUBLIC_STAKING_CONTRACT=juno1g7v2vrx95uxpwhpdyj6r0qgrlt3kqjqygwp6wy6ayktrklz4v04s06apfn 8 | NEXT_PUBLIC_STAKING_TOKEN_ADDRESS=juno17pevjnfrg36h80refmsdgqn4puxmp9d6lqtkhh6xn45r2q3flp2qsmmzep 9 | NEXT_PUBLIC_CHAIN_ID=uni-5 10 | NEXT_PUBLIC_CHAIN_NAME=Juno Testnet - Uni 11 | NEXT_PUBLIC_CHAIN_BECH32_PREFIX=juno 12 | NEXT_PUBLIC_CHAIN_RPC_ENDPOINT=https://rpc.juno.giansalex.dev 13 | NEXT_PUBLIC_CHAIN_REST_ENDPOINT=https://lcd.juno.giansalex.dev 14 | NEXT_PUBLIC_STAKING_DENOM=ujunox 15 | -------------------------------------------------------------------------------- /.env,devnet: -------------------------------------------------------------------------------- 1 | # Token sale site config 2 | NEXT_PUBLIC_SITE_TITLE=CoinFlip 3 | NEXT_PUBLIC_SITE_ICON_URL=/juno.svg 4 | 5 | 6 | NEXT_PUBLIC_COINFLIP_CONTRACT=juno14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9skjuwg8 7 | NEXT_PUBLIC_CHAIN_ID=testing 8 | NEXT_PUBLIC_CHAIN_NAME=Juno Local Testnet 9 | NEXT_PUBLIC_CHAIN_BECH32_PREFIX=juno 10 | #NEXT_PUBLIC_CHAIN_RPC_ENDPOINT=http://95.217.56.252:26657 11 | #NEXT_PUBLIC_CHAIN_REST_ENDPOINT=http://95.217.56.252:1317 12 | NEXT_PUBLIC_CHAIN_RPC_ENDPOINT=http://localhost:26657 13 | NEXT_PUBLIC_CHAIN_REST_ENDPOINT=http://localhost:1317 14 | NEXT_PUBLIC_STAKING_DENOM=ujunox 15 | 16 | -------------------------------------------------------------------------------- /.env.mainnet: -------------------------------------------------------------------------------- 1 | # Token sale site config 2 | NEXT_PUBLIC_SITE_TITLE=Staking 3 | NEXT_PUBLIC_SITE_ICON_URL=/juno.svg 4 | 5 | 6 | # Chain config 7 | NEXT_PUBLIC_STAKING_CONTRACT=juno1z8aj6l5m758nz8ru3n2zf86ttyell7htns9jtanahrzfsrey40nskakqtg 8 | NEXT_PUBLIC_STAKING_TOKEN_ADDRESS=juno1t46z6hg8vvsena7sue0vg6w85ljar3cundplkre9sz0skeqkap9sxyyy6m 9 | NEXT_PUBLIC_CHAIN_ID=juno-1 10 | NEXT_PUBLIC_CHAIN_NAME=Juno 11 | NEXT_PUBLIC_CHAIN_BECH32_PREFIX=juno 12 | NEXT_PUBLIC_CHAIN_RPC_ENDPOINT=https://rpc-juno.itastakers.com 13 | NEXT_PUBLIC_CHAIN_REST_ENDPOINT=https://lcd-juno.itastakers.com 14 | NEXT_PUBLIC_STAKING_DENOM=ujuno 15 | -------------------------------------------------------------------------------- /.env.testnet: -------------------------------------------------------------------------------- 1 | # Token sale site config 2 | NEXT_PUBLIC_SITE_TITLE=Staking 3 | NEXT_PUBLIC_SITE_ICON_URL=/juno.svg 4 | 5 | 6 | # Chain config 7 | NEXT_PUBLIC_STAKING_CONTRACT=juno100gwhcjsfdjyq2nd2lqss7w6fg68j25cj73tweqesqgpylyzaffsazu4wh 8 | NEXT_PUBLIC_STAKING_TOKEN_ADDRESS=juno1x57danrk4j8yf28wwqj8ndnfgwzehy709lfnwjjzgusefmtlasasw6xr9d 9 | NEXT_PUBLIC_CHAIN_ID=uni-5 10 | NEXT_PUBLIC_CHAIN_NAME=Juno Testnet - Uni 11 | NEXT_PUBLIC_CHAIN_BECH32_PREFIX=juno 12 | NEXT_PUBLIC_CHAIN_RPC_ENDPOINT=https://rpc.juno.giansalex.dev 13 | NEXT_PUBLIC_CHAIN_REST_ENDPOINT=https://lcd.juno.giansalex.dev 14 | NEXT_PUBLIC_STAKING_DENOM=ujunox 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | out 4 | .vscode/ 5 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | RewriteEngine on 2 | RewriteCond %{REQUEST_FILENAME} !-d 3 | RewriteCond %{REQUEST_FILENAME}\.html -f 4 | RewriteRule ^(.*)$ https://www.fortisoeconomia.space/$1.html [NC,L] 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /components/BrowserHelper.js: -------------------------------------------------------------------------------- 1 | export const isMobile = () => { 2 | window.mobileAndTabletCheck = function() { 3 | let check = false; 4 | (function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))) check = true;})(navigator.userAgent||navigator.vendor||window.opera); 5 | return check; 6 | }; 7 | return window.mobileAndTabletCheck() 8 | } -------------------------------------------------------------------------------- /components/CoinStaking/Admin.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState, MouseEvent, ChangeEvent } from 'react' 2 | import TextField from '@mui/material/TextField' 3 | import {NotificationContainer, NotificationManager} from 'react-notifications' 4 | import 'react-notifications/lib/notifications.css' 5 | 6 | import AdapterDateFns from '@mui/lab/AdapterDateFns' 7 | import LocalizationProvider from '@mui/lab/LocalizationProvider' 8 | import DateTimePicker from '@mui/lab/DateTimePicker' 9 | import InputLabel from '@mui/material/InputLabel'; 10 | import MenuItem from '@mui/material/MenuItem'; 11 | import FormControl from '@mui/material/FormControl'; 12 | import Select, { SelectChangeEvent } from '@mui/material/Select'; 13 | 14 | import { useSigningClient } from '../../contexts/cosmwasm' 15 | import { fromBase64, toBase64 } from '@cosmjs/encoding' 16 | import { 17 | convertMicroDenomToDenom, 18 | convertDenomToMicroDenom, 19 | convertFromMicroDenom 20 | } from '../../util/conversion' 21 | const Admin = () => { 22 | 23 | const { 24 | walletAddress, 25 | signingClient, 26 | executeRemoveTreasury, 27 | getConfig, 28 | config 29 | 30 | } = useSigningClient() 31 | 32 | //Work Variables 33 | 34 | const [level, setLevel] = useState(1) 35 | const [fetchAmount, setFetchAmount] = useState(0) 36 | 37 | useEffect(() => { 38 | if (!signingClient || walletAddress.length === 0) 39 | return 40 | getConfig() 41 | }, [walletAddress, signingClient, ]) 42 | 43 | 44 | 45 | const handleSubmit = async (event: MouseEvent) => { 46 | if (!signingClient || walletAddress.length === 0) { 47 | NotificationManager.error('Please connect wallet first') 48 | return 49 | } 50 | event.preventDefault() 51 | executeRemoveTreasury(fetchAmount) 52 | } 53 | 54 | return ( 55 | <> 56 |
57 |
58 |
59 |
60 |
61 |

62 | Treasury Amount
{convertMicroDenomToDenom(config.treasury_amount)} JUNO
63 |

64 | 65 |
66 |
67 |
68 |
69 | 70 |
71 | 72 |

Hole amount

73 |

74 | { 79 | setFetchAmount(Number(e.target.value)) 80 | 81 | }} 82 | error={fetchAmount==0} 83 | /> 84 | 85 | 86 |

87 | 88 |
89 | 90 | 91 | 92 |
93 | 98 |
99 |
100 |
101 |
102 | 103 |
104 | 105 | ); 106 | }; 107 | 108 | export default Admin; 109 | -------------------------------------------------------------------------------- /components/CoinStaking/Flip.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useState, MouseEvent, ChangeEvent } from 'react' 2 | import TextField from '@mui/material/TextField' 3 | import { NotificationContainer, NotificationManager } from 'react-notifications' 4 | import 'react-notifications/lib/notifications.css' 5 | 6 | import AdapterDateFns from '@mui/lab/AdapterDateFns' 7 | import LocalizationProvider from '@mui/lab/LocalizationProvider' 8 | import DateTimePicker from '@mui/lab/DateTimePicker' 9 | import InputLabel from '@mui/material/InputLabel'; 10 | import MenuItem from '@mui/material/MenuItem'; 11 | import FormControl from '@mui/material/FormControl'; 12 | import StarryGalaxy from '../StarryGalaxy.js'; 13 | 14 | import SSilder from '../Layout/SSilder'; 15 | import Select from "react-select"; 16 | import { useSigningClient } from '../../contexts/cosmwasm' 17 | import { fromBase64, toBase64 } from '@cosmjs/encoding' 18 | import Slider from '@mui/material/Slider'; 19 | import GradeIcon from '@mui/icons-material/Grade.js'; 20 | import ReplyOutlinedIcon from '@mui/icons-material/ReplyOutlined.js'; 21 | import PaidOutlinedIcon from '@mui/icons-material/PaidOutlined.js'; 22 | import TwitterIcon from '@mui/icons-material/Twitter.js'; 23 | import AccountBalanceWalletOutlinedIcon from '@mui/icons-material/AccountBalanceWalletOutlined.js'; 24 | import Autocomplete from '@mui/material/Autocomplete'; 25 | import Button from '@mui/material/Button'; 26 | import CircularProgress from '@mui/material/CircularProgress'; 27 | import { makeStyles } from "@material-ui/core/styles"; 28 | import Link from 'next/link.js'; 29 | import Backdrop from '@mui/material/Backdrop'; 30 | 31 | 32 | const useStyles = makeStyles((theme) => ({ 33 | root: { 34 | "& .MuiInputLabel-outlined:not(.MuiInputLabel-shrink)": { 35 | // Default transform is "translate(14px, 20px) scale(1)"" 36 | // This lines up the label with the initial cursor position in the input 37 | // after changing its padding-left. 38 | transform: "translate(20px, 16px) scale(1);" 39 | }, 40 | "&.Mui-focused .MuiInputLabel-outlined": { 41 | color: "white" 42 | } 43 | }, 44 | inputRoot: { 45 | color: "white", 46 | // This matches the specificity of the default styles at https://github.com/mui-org/material-ui/blob/v4.11.3/packages/material-ui-lab/src/Autocomplete/Autocomplete.js#L90 47 | '&[class*="MuiOutlinedInput-root"] .MuiAutocomplete-input:first-child': { 48 | // Default left padding is 6px 49 | paddingLeft: 20 50 | }, 51 | "& .MuiOutlinedInput-notchedOutline": { 52 | borderColor: "white" 53 | }, 54 | "&:hover .MuiOutlinedInput-notchedOutline": { 55 | borderColor: "white" 56 | }, 57 | "&.Mui-focused .MuiOutlinedInput-notchedOutline": { 58 | borderColor: "white" 59 | } 60 | }, 61 | paper: { 62 | backgroundColor: "#303030", 63 | color: "white", 64 | marginLeft: "5%", 65 | width: "90%", 66 | padding: "10px" 67 | } 68 | })); 69 | 70 | const apyLists = [ 71 | "100% @ 2 year stake", 72 | "40% @ 1 year", 73 | "20% @ 6 month", 74 | "10% @ 30 days" 75 | ]; 76 | 77 | const Flip = () => { 78 | 79 | const [loadingView, setLoadingView] = useState(false); 80 | const [rocketView, setRocketView] = useState(false); 81 | 82 | const hideLoading = () => { 83 | setLoadingView(false); 84 | }; 85 | 86 | const hideRocket = () => { 87 | setRocketView(false); 88 | } 89 | 90 | const classes = useStyles(); 91 | 92 | const { 93 | walletAddress, 94 | signingClient, 95 | executeStake, 96 | executeUnStake, 97 | executeReward, 98 | connectWallet, 99 | disconnect, 100 | loading, 101 | getConfig, 102 | isAdmin, 103 | getBalances, 104 | nativeBalanceStr, 105 | getHoleAmount 106 | } = useSigningClient(); 107 | 108 | //Work Variables 109 | 110 | const [apyValue, setApyValue] = useState(apyLists[0]); 111 | 112 | const [level, setLevel] = useState(""); 113 | 114 | const [artistValue, setArtistValue] = useState(25); 115 | const [burnValue, setBurnValue] = useState(25); 116 | const [charityValue, setCharityValue] = useState(25); 117 | const [myValue, setMyValue] = useState(25); 118 | 119 | const onChangeSliderValue = (value_, sliderNo_) => { 120 | console.log("onChangeSliderValue log - 1", value_, sliderNo_); 121 | 122 | let _value_1 = artistValue; 123 | let _value_2 = burnValue; 124 | let _value_3 = charityValue; 125 | let _value_4 = myValue; 126 | 127 | if (sliderNo_ === 1) { 128 | _value_1 = artistValue; 129 | _value_2 = burnValue; 130 | _value_3 = charityValue; 131 | _value_4 = myValue; 132 | } else if (sliderNo_ === 2) { 133 | _value_1 = burnValue; 134 | _value_2 = charityValue; 135 | _value_3 = myValue; 136 | _value_4 = artistValue; 137 | } else if (sliderNo_ === 3) { 138 | _value_1 = charityValue; 139 | _value_2 = myValue; 140 | _value_3 = artistValue; 141 | _value_4 = burnValue; 142 | } else if (sliderNo_ === 4) { 143 | _value_1 = myValue; 144 | _value_2 = artistValue; 145 | _value_3 = burnValue; 146 | _value_4 = charityValue; 147 | } 148 | 149 | _value_1 = value_; 150 | _value_2 = 100 - _value_1 - _value_3 - _value_4; 151 | 152 | if (_value_2 < 0) { 153 | _value_3 += _value_2; 154 | _value_2 = 0; 155 | } 156 | 157 | if (_value_2 > 100) { 158 | _value_3 += _value_2 - 100; 159 | _value_2 = 100; 160 | } 161 | 162 | if (_value_3 < 0) { 163 | _value_4 += _value_3; 164 | _value_3 = 0; 165 | } 166 | 167 | if (_value_3 > 100) { 168 | _value_4 += _value_3 - 100; 169 | _value_3 = 100; 170 | } 171 | 172 | if (sliderNo_ === 1) { 173 | setArtistValue(_value_1); 174 | setBurnValue(_value_2); 175 | setCharityValue(_value_3); 176 | setMyValue(_value_4); 177 | } else if (sliderNo_ === 2) { 178 | setBurnValue(_value_1); 179 | setCharityValue(_value_2); 180 | setMyValue(_value_3); 181 | setArtistValue(_value_4); 182 | } else if (sliderNo_ === 3) { 183 | setCharityValue(_value_1); 184 | setMyValue(_value_2); 185 | setArtistValue(_value_3); 186 | setBurnValue(_value_4); 187 | } else if (sliderNo_ === 4) { 188 | setMyValue(_value_1); 189 | setArtistValue(_value_2); 190 | setBurnValue(_value_3); 191 | setCharityValue(_value_4); 192 | } 193 | 194 | } 195 | 196 | const handleStake = async (event: MouseEvent) => { 197 | 198 | if (!signingClient || walletAddress.length === 0) { 199 | console.log("luca wallet not connected") 200 | NotificationManager.error('Please connect wallet first') 201 | 202 | return 203 | } 204 | 205 | 206 | setLoadingView(true); 207 | event.preventDefault() 208 | 209 | const _index = apyLists.findIndex((value) => value === apyValue); 210 | await executeStake(parseInt(level), _index); 211 | setLoadingView(false); 212 | } 213 | const handleUnStake = async (event: MouseEvent) => { 214 | 215 | if (!signingClient || walletAddress.length === 0) { 216 | NotificationManager.error('Please connect wallet first') 217 | return 218 | } 219 | setLoadingView(true); 220 | event.preventDefault() 221 | await executeUnStake() 222 | setLoadingView(false); 223 | } 224 | const handleReward = async (event: MouseEvent) => { 225 | 226 | 227 | if (!signingClient || walletAddress.length === 0) { 228 | NotificationManager.error('Please connect wallet first') 229 | return 230 | } 231 | setLoadingView(true); 232 | event.preventDefault() 233 | let _tempSliderValue = []; 234 | _tempSliderValue.push(artistValue); 235 | _tempSliderValue.push(artistValue + burnValue); 236 | _tempSliderValue.push(artistValue + burnValue + charityValue); 237 | await executeReward(_tempSliderValue) 238 | setLoadingView(false); 239 | } 240 | 241 | const [sliderValue, setSliderValue] = useState([25, 50, 75]); 242 | 243 | const onChangeValue = (value) => { 244 | console.log("onChangeValue log - 1 : ", value); 245 | setSliderValue(value); 246 | } 247 | 248 | const handleConnect = () => { 249 | if (walletAddress.length === 0) { 250 | connectWallet(false) 251 | } else { 252 | disconnect() 253 | } 254 | } 255 | 256 | const selectMaxAmount = async () => { 257 | const maxAmount = await getHoleAmount(); 258 | setLevel(maxAmount); 259 | console.log("selectMaxAmount log - 1 ", maxAmount); 260 | } 261 | 262 | return ( 263 | <> 264 |
265 |
276 | 277 | 278 | 279 |
284 | 285 |

Drops

286 | 287 | 288 |

Staking

289 | 290 |
291 |
292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 |
302 |
303 | 304 |
305 |
306 |
307 | 330 |
331 |
341 |
342 |
343 | 344 |

Hole staking amount

345 | { 351 | setLevel(event.target.value.toString()) 352 | }} 353 | style={{ 354 | marginTop: "50px", 355 | width: "100%", 356 | backgroundColor: "transparent", 357 | borderRadius: "32px", 358 | height: "48px", 359 | fontSize: "18px", 360 | padding: "5px 20px", 361 | color: "grey" 362 | }} 363 | /> 364 | 365 |
366 |
367 | { 374 | setApyValue(newValue); 375 | }} 376 | sx={{ width: "100%" }} 377 | renderInput={(params) => } 378 | /> 379 |
380 | 389 |
390 |
391 | 400 |
401 |
402 |
409 |
410 |
411 |

Artist Wallet :

412 |
418 | onChangeSliderValue(value, 1)} /> 419 | 420 |
421 |
422 |
423 |

Burn Wallet :

424 |
430 | onChangeSliderValue(value, 2)} /> 431 | 432 |
433 |
434 |
435 |

Charity Wallet :

436 |
442 | onChangeSliderValue(value, 3)} /> 443 | 444 |
445 |
446 |
447 |

My Wallet :

448 |
454 | onChangeSliderValue(value, 4)} /> 455 | 456 |
457 |
458 |
459 | 468 |
469 |
470 |
471 |
472 |
473 | theme.zIndex.drawer + 1 }} 475 | open={loadingView} 476 | > 477 | 478 | 479 | {/* theme.zIndex.drawer + 1 }} 481 | open={lodingView} 482 | // onClick={hideLoading} 483 | > 484 | ... 485 | 486 | theme.zIndex.drawer + 1 }} 488 | open={rocketView} 489 | // onClick={hideRocket} 490 | > 491 | ... 492 | */} 493 | 494 |
495 | 496 | ); 497 | }; 498 | 499 | export default Flip; 500 | -------------------------------------------------------------------------------- /components/Layout/Footer.tsx: -------------------------------------------------------------------------------- 1 | import Link from 'next/link'; 2 | 3 | const Footer = () => { 4 | return ( 5 | <> 6 |
7 | 8 |
9 |
10 |

11 | Copyright 2022 Juno Staking. All Rights Reserved by{' '} 12 | 13 | Juno Staking 14 | 15 |

16 |
17 |
18 |
19 | 20 | ); 21 | }; 22 | 23 | export default Footer; 24 | -------------------------------------------------------------------------------- /components/Layout/Layout.tsx: -------------------------------------------------------------------------------- 1 | import Head from 'next/head'; 2 | import { useRouter } from 'next/router'; 3 | import React, { useState, createContext, useContext, useEffect } from 'react' 4 | //top header 5 | import TopHeader from './TopHeader'; 6 | 7 | //navbar 8 | import Navbar from './Navbar'; 9 | 10 | //footer 11 | import Footer from './Footer'; 12 | 13 | import ThemeContext from '../../contexts/ThemeContext' 14 | import useTheme from '../../hooks/useTheme' 15 | import styled from 'styled-components' 16 | 17 | const Wrapper = styled.div` 18 | background: ${props => { 19 | switch (props.slot) { 20 | case '/gFOTmodule': 21 | return !props.defaultChecked ? 'transparent' : `transparent` 22 | case '/fortisDungeon': 23 | return `var(--background-color)` 24 | case '/communitySale': 25 | return !props.defaultChecked 26 | ? `url('/images/MacBook Pro 14_ - 2.png')` 27 | : `transparent` 28 | default: 29 | return `transparent` 30 | } 31 | }}; 32 | background-repeat: round; 33 | min-height: 100vh; 34 | display: flex; 35 | flex-direction: column; 36 | align-items: center; 37 | filter: ${props => 38 | !props.defaultChecked && props.slot === '/sFOTVault' 39 | ? 'hue-rotate(240deg)' 40 | : !props.defaultChecked && props.slot === '/castleDex' 41 | ? 'hue-rotate(15deg)' 42 | : ''}; 43 | ` 44 | export const ToggleContext = createContext({ 45 | toggle: false, 46 | setToggle: null, 47 | asset: 0, 48 | setAsset: null, 49 | page: 0, 50 | setPage: null, 51 | }) 52 | 53 | const Layout = ({ children }) => { 54 | const router = useRouter(); 55 | const { pathname } = router; 56 | 57 | const themeContext = useTheme('theme1') 58 | 59 | const [toggle, setToggle] = useState(false) 60 | const [page, setPage] = useState(0) 61 | const [asset, setAsset] = useState(0) 62 | 63 | useEffect(() => { 64 | let temp = localStorage.getItem('toggle') 65 | if (temp) { 66 | setToggle(JSON.parse(temp)) 67 | } 68 | }, []) 69 | 70 | return ( 71 | <> 72 | 73 | 74 | 84 | 85 | Coreum Aggregator 86 | 90 | 94 | 99 | 103 | 104 | 105 | 106 | {/* {pathname === '/' ? : ''} */} 107 | {/* { 110 | localStorage.setItem('toggle', toggle.toString()) 111 | setToggle(toggle) 112 | }} 113 | /> */} 114 | 115 | 116 | {children} 117 | 118 | {/*