CINXE.COM
Staking
<!DOCTYPE html><!-- Last Published: Thu Mar 21 2024 22:53:00 GMT+0000 (Coordinated Universal Time) --><html data-wf-domain="nft.bsc.news" data-wf-page="65f8809120c3b08e1614bbe4" data-wf-site="62da93af6e138f59513385a7"><head><meta charset="utf-8"/><title>Staking</title><meta content="Staking" property="og:title"/><meta content="Staking" property="twitter:title"/><meta content="width=device-width, initial-scale=1" name="viewport"/><link href="https://assets-global.website-files.com/62da93af6e138f59513385a7/css/vofqdco4bxmkuc5j.webflow.bc987c296.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com" rel="preconnect"/><link href="https://fonts.gstatic.com" rel="preconnect" crossorigin="anonymous"/><script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js" type="text/javascript"></script><script type="text/javascript">WebFont.load({ google: { families: ["Inter:regular,500,600,700","Noto Serif:regular,italic,700,700italic","Poppins:regular,500,600,700,800","Archivo:regular,500,600,700,800,900","Mulish:regular,500,600,700,800,900","Nunito:regular,500,600,700,800,900","Nunito Sans:regular,500,600,700,800,900"] }});</script><script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script><link href="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/646202a4363076eb170a82dd_bscnews32.png" rel="shortcut icon" type="image/x-icon"/><link href="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/6462029bf620b3a3ab7e6384_bscnews256.png" rel="apple-touch-icon"/><script src="https://cdn.jsdelivr.net/gh/ethereum/web3.js@1.3.0/dist/web3.min.js"></script><!-- [Attributes by Finsweet] CMS Slider --> <script async src="https://cdn.jsdelivr.net/npm/@finsweet/attributes-cmsslider@1/cmsslider.js"></script></head><body class="body-2"><div class="main"><a href="https://www.rareboard.com/bscnewsnft" target="_blank" class="link-block w-inline-block"><div id="N-bar" class="n-bar"><div data-w-id="fff0be80-b49a-618f-0058-1ee45b6d9dff" style="opacity:0" class="n-bar-text">Minting Live Now!</div></div></a><div class="w-layout-blockcontainer container-9 w-container"><div data-animation="default" data-collapse="small" data-duration="400" data-easing="ease" data-easing2="ease" role="banner" class="navbar w-nav"><div data-w-id="12d1c846-c0de-df13-972a-aeec598a9fa6" class="nav-container-2"><a href="https://bsc.news/" class="brand-logo w-nav-brand"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635cb16b78332f9aca28f212_Logo.png" loading="lazy" width="106" alt=""/></a><nav role="navigation" class="nav-menu-2 w-nav-menu"><a href="#" class="nav-item w-nav-link">About</a><a href="#" class="nav-item w-nav-link">Partners</a><a href="#" class="nav-item w-nav-link">Gaming Guild</a><a href="#" class="nav-item w-nav-link">Premium Content</a><a href="https://bscnewsnft.gitbook.io/" target="_blank" class="nav-item w-nav-link">Gitbook</a><a href="https://nft.bsc.news/holder-portal" class="nav-item w-nav-link">Holder Portal</a></nav><a href="https://t.me/DrewtheAce" target="_blank" class="nav-contact-btn w-button">Contact us</a><div class="humburger w-nav-button"><div data-is-ix2-target="1" class="lottie-animation" data-w-id="12d1c846-c0de-df13-972a-aeec598a9fb7" data-animation-type="lottie" data-src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635d0312618e0a8581aa0a0b_lottieflow-menu-nav-09-CFF800-easey.json" data-loop="0" data-direction="1" data-autoplay="0" data-renderer="svg" data-default-duration="2.5" data-duration="0" data-ix2-initial-state="0"></div></div></div></div><section id="Hero-Section" class="section-2 hero-seciton"></section><section class="main-title-section"><div class="header-section-left"><h1 class="staking-header">Staking Pools</h1><div class="text-block-35">Stake your BSC聽News NFTs聽and earn tokens by the second.</div></div></section><section class="staking-section-2"><div class="staking-content-wrap"><div class="staking-block staking-f3"><div class="staking-block-left"><a href="https://4ignorefud.com/" class="w-inline-block"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/657f9c68d33075f5618fac1a_White-icon.png" loading="lazy" width="185" alt=""/></a><div class="staking-block-left-right"><h4 class="staking-pool-heading">Friend 3</h4><div class="stat-wrap"><div class="stat-title">Total Staked</div><div id="total-staked-F3" class="stat-value">99</div></div><div><strong>Stake:</strong> <a href="https://www.rareboard.com/bscnewsnft" target="_blank" class="link-6">BSC聽News NFT</a><br/><strong>Recieve:</strong> <a href="https://bscscan.com/address/0x61b83edf87ea662c695439a807c386455c9e797c" class="link-5">$F3</a></div><a href="#" class="action-button checkf31 w-button">check rewards</a><a href="#" class="action-button claimf3 w-button">Claim Rewards</a></div></div><div class="staking-block-right"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1).png" loading="lazy" data-w-id="4741e96d-b74f-7d30-0992-27ff1e5f02f5" sizes="100vw" alt="" srcset="https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1)-p-500.png 500w, https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1)-p-800.png 800w, https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1).png 1000w" class="down-arrow-img"/><div class="staking-details-left"><div class="stat-wrap"><div class="stat-title import">IMPORTANT:聽This token is NOT聽the $F3/Friend3 token. It is an IOU that can be held, traded, or anything inbetween. The $F3 tokens allocated to BSCN are vested for 6 months. At the vesting unlock time a snapshot of the above F3 IOU聽token will be taken and then $F3 tokens will be airdropped to holders. CA聽for F3 IOU: 0x886f6A2Cb429F4746B587535A9DF4768491146C7</div></div><div class="stat-wrap"><div class="stat-title">You've Staked</div><div id="user-staked-F3" class="stat-value">3</div></div><div class="stat-wrap"><div class="stat-title">Your Staked Token IDs</div><div id="staked-tokens-F3" class="stat-value">3</div></div><div class="form-block-2 w-form"><form id="email-form" name="email-form" data-name="Email Form" method="get" data-wf-page-id="65f8809120c3b08e1614bbe4" data-wf-element-id="4741e96d-b74f-7d30-0992-27ff1e5f0304"><div class="stat-wrap"><div class="stat-title">Token IDs:</div></div><input class="token-id-input-f3 w-input" maxlength="256" name="name-3" data-name="Name 3" placeholder="Enter the Token IDs to Stake/Unstake (e.g 0,1,2)" type="text" id="name-3"/></form><div class="w-form-done"><div>Thank you! Your submission has been received!</div></div><div class="w-form-fail"><div>Oops! Something went wrong while submitting the form.</div></div></div><div class="action-button-wrap"><a id="StakeF3" href="#" class="action-button stakef3 w-button">Stake</a><a href="#" class="action-button unstakef3 w-button">Unstake</a></div></div></div></div></div></section><section class="staking-section-2"><div class="staking-content-wrap"><div class="staking-block chainstaking"><div class="staking-block-left"><a href="https://www.chaingpt.org/" class="w-inline-block"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/64f27bd9c76cc900d1af9d38_85ed5133cec57a34916594915930eb57.png" loading="lazy" alt="" class="staking-logo"/></a><div class="staking-block-left-right"><h4 class="staking-pool-heading">Chain GPT - <span class="text-span-2">Finished, please withdraw</span></h4><div class="stat-wrap"><div class="stat-title">Total Staked</div><div id="total-staked-Chain" class="stat-value">99</div></div><div><strong>Stake:</strong> <a href="https://www.rareboard.com/bscnewsnft" target="_blank">BSC聽News NFT</a><br/><strong>Recieve:</strong> <a href="https://bscscan.com/token/0x9840652DC04fb9db2C43853633f0F62BE6f00f98">$CGPT</a></div><a href="#" class="action-button checkchain w-button">check rewards</a><a href="#" class="action-button claimchain w-button">Claim Rewards</a></div></div><div class="staking-block-right"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1).png" loading="lazy" data-w-id="6d4135fc-771e-761a-6ed4-02fe59189e4a" sizes="100vw" alt="" srcset="https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1)-p-500.png 500w, https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1)-p-800.png 800w, https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1).png 1000w" class="down-arrow-img-2"/></div><div><div class="staking-details-left"><div class="stat-wrap"><div class="stat-title">You've Staked</div><div id="user-staked-Chain" class="stat-value">3</div></div><div class="stat-wrap"><div class="stat-title">Your Staked Token IDs</div><div id="staked-tokens-Chain" class="stat-value">3</div></div><div class="stat-wrap"><div class="stat-title">Token IDs:</div></div><div class="form-block-2 w-form"><form id="email-form" name="email-form" data-name="Email Form" method="get" data-wf-page-id="65f8809120c3b08e1614bbe4" data-wf-element-id="ad48b0d7-71dd-4f4a-160a-e283d4f6b41a"><input class="token-id-input-chain w-input" maxlength="256" name="name-2" data-name="Name 2" placeholder="Enter the Token IDs to Stake/Unstake (e.g 0,1,2)" type="text" id="name-2"/></form><div class="w-form-done"><div>Thank you! Your submission has been received!</div></div><div class="w-form-fail"><div>Oops! Something went wrong while submitting the form.</div></div></div><div class="action-button-wrap"><a href="#" class="action-button stakechain w-button">Stake</a><a href="#" class="action-button unstakechain w-button">Unstake</a></div></div></div></div></div></section><section class="staking-section-2"><div class="staking-content-wrap"><div class="staking-block stakingfud"><div class="staking-block-left"><a href="https://4ignorefud.com/" class="w-inline-block"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/64d556291fdac99df37f596b_24136.png" loading="lazy" alt="" class="staking-logo"/></a><div class="staking-block-left-right"><h4 class="staking-pool-heading">Ignore Fud - <span class="text-span-3">Finished, please withdraw</span></h4><div class="stat-wrap"><div class="stat-title">Total Staked</div><div id="total-staked-Fud" class="stat-value">99</div></div><div><strong>Stake:</strong> <a href="https://www.rareboard.com/bscnewsnft" target="_blank" class="link-6">BSC聽News NFT</a><br/><strong>Recieve:</strong> <a href="https://bscscan.com/address/0x61b83edf87ea662c695439a807c386455c9e797c" class="link-5">$4TOKEN</a></div><a href="#" class="action-button checkfud w-button">check rewards</a><a href="#" class="action-button claimfud w-button">Claim Rewards</a></div></div><div class="staking-block-right"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1).png" loading="lazy" data-w-id="aa76e864-c2a4-a68e-e27d-dacaac068998" sizes="100vw" alt="" srcset="https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1)-p-500.png 500w, https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1)-p-800.png 800w, https://assets-global.website-files.com/62da93af6e138f59513385a7/6492edb665d1855cb15fd89e_cards%20(1).png 1000w" class="down-arrow-img"/><div class="staking-details-left"><div class="stat-wrap"><div class="stat-title">You've Staked</div><div id="user-staked-Fud" class="stat-value">3</div></div><div class="stat-wrap"><div class="stat-title">Your Staked Token IDs</div><div id="staked-tokens-Fud" class="stat-value">3</div></div><div class="form-block-2 w-form"><form id="email-form" name="email-form" data-name="Email Form" method="get" data-wf-page-id="65f8809120c3b08e1614bbe4" data-wf-element-id="8d611825-15e9-3039-21c3-0848e535d6ff"><div class="stat-wrap"><div class="stat-title">Token IDs:</div></div><input class="token-id-input-fud w-input" maxlength="256" name="name" data-name="Name" placeholder="Enter the Token IDs to Stake/Unstake (e.g 0,1,2)" type="text" id="name"/></form><div class="w-form-done"><div>Thank you! Your submission has been received!</div></div><div class="w-form-fail"><div>Oops! Something went wrong while submitting the form.</div></div></div><div class="action-button-wrap"><a id="StakeFud" href="#" class="action-button stakefud w-button">Stake</a><a href="#" class="action-button unstakefud w-button">Unstake</a></div></div></div></div></div></section><section class="staking-section-2"><div class="staking-content-wrap"><div class="staking-block asx"><div class="staking-block-left"><a href="https://www.asx.capital/" class="w-inline-block"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/6584bf277213dc221ce96246_ASX_Logo_400px.png" loading="lazy" alt="" class="staking-logo"/></a><div class="staking-block-left-right"><h4 class="staking-pool-heading">ASX</h4><div><strong>Stake:</strong> <a href="https://www.rareboard.com/bscnewsnft" target="_blank">BSC聽News NFT</a><br/><strong>Recieve:</strong> $ASX</div></div></div><div class="staking-block-right"><h2>Coming Soon</h2></div></div></div></section><section class="staking-section-2"><div class="staking-content-wrap"><div class="staking-block"><div class="staking-block-left"><a href="https://dcntrl.network/" class="w-inline-block"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/64d559813eb0f9648b46b42e_USDEFI_Coin.svg" loading="lazy" alt="" class="staking-logo"/></a><div class="staking-block-left-right"><h4 class="staking-pool-heading">DCNTRL聽Network</h4><div><strong>Stake:</strong> <a href="https://www.rareboard.com/bscnewsnft" target="_blank">BSC聽News NFT</a><br/><strong>Recieve:</strong> $DCNX</div></div></div><div class="staking-block-right"><h2>Coming Soon</h2></div></div></div></section><section class="staking-section-2"><div class="staking-content-wrap"><div class="staking-block"><div class="staking-block-left"><a href="https://spacecatch.io/" class="w-inline-block"><img src="https://cdn.prod.website-files.com/62da93af6e138f59513385a7/65136954f811d17b688c21a3_lo234go%20(1).png" loading="lazy" alt="" class="staking-logo"/></a><div class="staking-block-left-right"><h4 class="staking-pool-heading">SpaceCatch</h4><div><strong>Stake:</strong> <a href="https://www.rareboard.com/bscnewsnft" target="_blank">BSC聽News NFT</a><br/><strong>Recieve:</strong> $CATCH</div></div></div><div class="staking-block-right"><h2>Coming Soon</h2></div></div></div></section><section id="Banner" class="section-2 banner"><div class="container-3"><div class="banner-wrap"><div data-w-id="fff0be80-b49a-618f-0058-1ee45b6d9f22" style="opacity:0" class="cta-texts"><h2 class="h2-for-banner">Want to <span class="color-italic">Get Your </span> 聽Hands On a <em class="italic-text">BSC</em> <span class="color-italic">News NFT?</span> </h2><a href="https://www.rareboard.com/bscnewsnft" target="_blank" class="mint-nao w-button">Mint Now</a></div><div class="cta-image-wrap"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f3c0f47d1612ab7966c30_Banner%20(1).png" loading="lazy" style="opacity:0" data-w-id="fff0be80-b49a-618f-0058-1ee45b6d9f31" alt="" class="cta-banner-image"/></div><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f55fc799bcedca01a9de1_Vector%202%20(1).png" loading="lazy" alt="" class="cta-image"/></div></div></section></div><section id="Footer" class="footer-2"><div class="container-3"><div class="footer-content"><a href="#" class="f_logo w-inline-block"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635cb16b78332f9aca28f212_Logo.png" loading="lazy" alt=""/></a><div class="f-social-icon"><a href="http://www.twitter.com/BSCNewsNFT" target="_blank" class="s-icon w-inline-block"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f747cb5963621377b2284_twitter.svg" loading="lazy" width="14" alt="" class="icon-svg"/></a><a href="https://t.me/BSCNewsAnn" target="_blank" class="s-icon w-inline-block"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f747c799bcec2701b92a0_telegram.svg" loading="lazy" width="14" alt="" class="icon-svg"/></a><a href="https://www.linkedin.com/company/bsc-news/" class="s-icon w-inline-block"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f747c3ea935ae8512782c_In.svg" loading="lazy" width="14" alt="" class="icon-svg"/></a><a href="mailto:andrew@bsc.news" class="s-icon hide w-inline-block"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f747cc917937ab0500350_mail.svg" loading="lazy" width="14" alt="" class="icon-svg"/></a><a href="https://discord.gg/bscnewsnft" target="_blank" class="s-icon w-inline-block"><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f747c70620b649de0753a_descord.svg" loading="lazy" width="14" alt="" class="icon-svg"/></a></div><div class="f-texts"><div class="text-block-33">A unique collection of 10,000 NFT鈥檚</div><a href="https://www.rareboard.com/bscnewsnft" target="_blank" class="minting-now-link w-inline-block">Minting Now!</a></div></div><img src="https://cdn.prod.website-files.com/635ca6c978332f6b37289db4/635f552db16556536ef797b1_Vector%202.png" loading="lazy" alt="" class="f-image-1"/></div></section></div><div class="w-embed w-script"><script> let accounts; // Initialize web3 const web3 = new Web3(window.ethereum); //NFT contract details const nftAbi = [ { inputs: [ { internalType: "address", name: "operator", type: "address" }, { internalType: "bool", name: "approved", type: "bool" }, ], name: "setApprovalForAll", outputs: [], stateMutability: "nonpayable", type: "function", }, { "constant": true, "inputs": [ { "name": "_owner", "type": "address" }, { "name": "_operator", "type": "address" } ], "name": "isApprovedForAll", "outputs": [{ "name": "", "type": "bool" }], "payable": false, "stateMutability": "view", "type": "function" } ]; const nftContractAddress = "0xD15360dEF9f520c4b6449299d24C5Be08751307E"; // Initialize the nftContract const nftContract = new web3.eth.Contract(nftAbi, nftContractAddress); const totalStakesElement = document.getElementById('totalStakes'); const userStakesElement = document.getElementById('userStakes'); const userStakedTokensElement = document.getElementById('userStakedTokens'); // BSC Mainnet Configuration const networkId = "0x38"; const chainId = "0x38"; const rpcUrl = "https://bsc.rpc.blxrbdn.com/"; window.addEventListener("load", async () => { if (window.ethereum) { try { accounts = await web3.eth.getAccounts(); if (!accounts || accounts.length === 0) { // Request user to connect their MetaMask account accounts = await ethereum.request({ method: 'eth_requestAccounts' }); if (!accounts || accounts.length === 0) { throw new Error("No accounts connected. Please ensure you're connected to the correct network."); } } // Update data for both pools updateData(accounts[0], stakingContractAddressIgnoreFud); updateData(accounts[0], stakingContractAddressChainGPT); updateData(accounts[0], stakingContractAddressF3); } catch (e) { console.error("Error fetching accounts:", e.message); alert("Error fetching connected accounts. Please ensure you're connected to the correct network and try again."); } } }); // Staking contract details for "Ignore Fud" pool const stakingContractAddressIgnoreFud = "0xe1ffa6019F8C9aD629E1bC9997723565D0Dd2E0D"; // Staking contract details for "Chain GPT" pool const stakingContractAddressChainGPT = "0x136080F5f31f620B3cf331bc83c059043bAe3331"; // Staking contract details for "F3" pool const stakingContractAddressF3 = "0x886f6A2Cb429F4746B587535A9DF4768491146C7"; let stakingContractAddress = stakingContractAddressIgnoreFud; // Default const stakingAbi = [ { inputs: [ { internalType: "address", name: "_nftCollection", type: "address" }, { internalType: "address", name: "_rewardToken", type: "address" }, ], stateMutability: "nonpayable", type: "constructor", }, { inputs: [{ internalType: "uint256[]", name: "tokenIds", type: "uint256[]" }], name: "stake", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [], name: "totalStakedSupply", outputs: [{ internalType: "uint256", name: "", type: "uint256" }], stateMutability: "view", type: "function", }, { inputs: [ { internalType: "uint256[]", name: "tokenIds", type: "uint256[]" }, ], name: "withdraw", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [{ internalType: "address", name: "_user", type: "address" }], name: "userStakedTokens", outputs: [ { internalType: "uint256[]", name: "_tokensStaked", type: "uint256[]" }, ], stateMutability: "view", type: "function", }, { inputs: [], name: "claimRewards", outputs: [], stateMutability: "nonpayable", type: "function", }, { inputs: [{ internalType: "address", name: "_user", type: "address" }], name: "userStakeRewards", outputs: [{ internalType: "uint256", name: "_rewardAmount", type: "uint256" }], stateMutability: "view", type: "function", }, ]; function setStakingContract(contractChoice) { if (contractChoice === "ChainGPT") { stakingContractAddress = stakingContractAddressChainGPT; } else if (contractChoice === "4token") { stakingContractAddress = stakingContractAddressIgnoreFud; } else if (contractChoice === "F3") { stakingContractAddress = stakingContractAddressF3; } } // Elements for "Ignore Fud" pool const totalStakesElementFud = document.getElementById('total-staked-Fud'); const userStakesElementFud = document.getElementById('user-staked-Fud'); const userStakedTokensElementFud = document.getElementById('staked-tokens-Fud'); // Elements for "Chain GPT" pool const totalStakesElementChain = document.getElementById('total-staked-Chain'); const userStakesElementChain = document.getElementById('user-staked-Chain'); const userStakedTokensElementChain = document.getElementById('staked-tokens-Chain'); // Elements for "F3" pool const totalStakesElementF3 = document.getElementById('total-staked-F3'); const userStakesElementF3 = document.getElementById('user-staked-F3'); const userStakedTokensElementF3 = document.getElementById('staked-tokens-F3'); // Dynamic Text async function updateData(account, stakingAddress) { try { // Contract declarations const stakingContract = new web3.eth.Contract(stakingAbi, stakingAddress); let totalStakes = await stakingContract.methods.totalStakedSupply().call(); let userStakesCount = ( await stakingContract.methods.userStakedTokens(account).call() ).length; let userStakedTokens = await stakingContract.methods .userStakedTokens(account) .call(); if (stakingAddress === stakingContractAddressIgnoreFud) { totalStakesElementFud.textContent = totalStakes; userStakesElementFud.textContent = userStakesCount; userStakedTokensElementFud.textContent = userStakedTokens.join(', '); } else if (stakingAddress === stakingContractAddressChainGPT) { totalStakesElementChain.textContent = totalStakes; userStakesElementChain.textContent = userStakesCount; userStakedTokensElementChain.textContent = userStakedTokens.join(', '); } else if (stakingAddress === stakingContractAddressF3) { totalStakesElementF3.textContent = totalStakes; userStakesElementF3.textContent = userStakesCount; userStakedTokensElementF3.textContent = userStakedTokens.join(', '); } } catch (error) { alert( `Failed to dynamically update relevant variables! Error: ${error.message}` ); } } async function checkAndSwitchChain() { const currentChainIdHex = await window.ethereum.request({ method: 'eth_chainId' }); if (currentChainIdHex !== chainId) { try { await ethereum.request({ method: "wallet_switchEthereumChain", params: [{ chainId: chainId }], }); } catch (switchError) { console.error(switchError); } } } async function approveNFTForStaking(stakingAddress) { try { const isApproved = await nftContract.methods.isApprovedForAll(accounts[0], stakingAddress).call(); if (!isApproved) { await nftContract.methods.setApprovalForAll(stakingAddress, true).send({ from: accounts[0] }); console.log('NFT approval successful for', stakingAddress); } } catch (error) { console.error('NFT approval failed', error); alert('Failed to approve NFT for staking. Please try again.'); } } </script></div><div class="w-embed w-script"><script> //Functions async function stakeToken(pool) { const stakingContract = new web3.eth.Contract(stakingAbi, stakingContractAddress); let tokenIds; //FUD STAKING if (pool === "4token") { // Fetch token IDs from the 'Token Id Input Fud' input field tokenIds = document.querySelector('.token-id-input-fud').value.split(',').map(id => { const parsedId = parseInt(id.trim()); if (isNaN(parsedId)) { throw new Error("Invalid Token ID provided"); } return parsedId; }); // Logic for staking in "Ignore Fud" pool await approveNFTForStaking(stakingContractAddressIgnoreFud); try { const receipt = await stakingContract.methods.stake(tokenIds).send({ from: accounts[0] }); console.log('Staked successfully in Ignore Fud pool:', receipt); } catch (error) { console.error('Error staking in Ignore Fud pool:', error); } //CHAIN STAKING } else if (pool === "ChainGPT") { // Fetch token IDs from the 'Token ID Input Chain' input field tokenIds = document.querySelector('.token-id-input-chain').value.split(',').map(id => { const parsedId = parseInt(id.trim()); if (isNaN(parsedId)) { throw new Error("Invalid Token ID provided"); } return parsedId; }); // Logic for staking in "ChainGPT" pool await approveNFTForStaking(stakingContractAddressChainGPT); try { const receipt = await stakingContract.methods.stake(tokenIds).send({ from: accounts[0] }); console.log('Staked successfully in ChainGPT pool:', receipt); } catch (error) { console.error('Error staking in ChainGPT pool:', error); } //F3 Staking } else if (pool === "F3") { // Fetch token IDs from the 'Token ID Input Chain' input field tokenIds = document.querySelector('.token-id-input-f3').value.split(',').map(id => { const parsedId = parseInt(id.trim()); if (isNaN(parsedId)) { throw new Error("Invalid Token ID provided"); } return parsedId; }); // Logic for staking in "F3" pool await approveNFTForStaking(stakingContractAddressF3); try { const receipt = await stakingContract.methods.stake(tokenIds).send({ from: accounts[0] }); console.log('Staked successfully in Friend3 pool:', receipt); } catch (error) { console.error('Error staking in Friend3 pool:', error); } } } async function unstakeToken(pool) { const stakingContract = new web3.eth.Contract(stakingAbi, stakingContractAddress); let tokenIds; if (pool === "4token") { // Fetch token IDs from the 'Token Id Input Fud' input field tokenIds = document.querySelector('.token-id-input-fud').value.split(',').map(id => parseInt(id.trim())); // Logic for unstaking in "Ignore Fud" pool try { const receipt = await stakingContract.methods.withdraw(tokenIds).send({ from: accounts[0] }); console.log('Unstaked successfully from Ignore Fud pool:', receipt); } catch (error) { console.error('Error unstaking from Ignore Fud pool:', error); } // Fetch token IDs from the 'Token ID Input Chain' input field } else if (pool === "ChainGPT") { tokenIds = document.querySelector('.token-id-input-chain').value.split(',').map(id => parseInt(id.trim())); // Logic for unstaking in "ChainGPT" pool try { const receipt = await stakingContract.methods.withdraw(tokenIds).send({ from: accounts[0] }); console.log('Unstaked successfully from ChainGPT pool:', receipt); } catch (error) { console.error('Error unstaking from ChainGPT pool:', error); } // Fetch token IDs from the 'Token ID Input F3' input field } else if (pool === "F3") { tokenIds = document.querySelector('.token-id-input-f3').value.split(',').map(id => parseInt(id.trim())); // Logic for unstaking in "ChainGPT" pool try { const receipt = await stakingContract.methods.withdraw(tokenIds).send({ from: accounts[0] }); console.log('Unstaked successfully from Friend3 pool:', receipt); } catch (error) { console.error('Error unstaking from Friend3 pool:', error); } } } async function claimRewards(pool) { const stakingContract = new web3.eth.Contract(stakingAbi, stakingContractAddress); if (pool === "4token") { // Logic for claiming rewards in "Ignore Fud" pool try { const receipt = await stakingContract.methods.claimRewards().send({ from: accounts[0] }); console.log('Rewards claimed successfully from Ignore Fud pool:', receipt); } catch (error) { console.error('Error claiming rewards from Ignore Fud pool:', error); } } else if (pool === "ChainGPT") { // Logic for claiming rewards in "ChainGPT" pool try { const receipt = await stakingContract.methods.claimRewards().send({ from: accounts[0] }); console.log('Rewards claimed successfully from ChainGPT pool:', receipt); } catch (error) { console.error('Error claiming rewards from ChainGPT pool:', error); } } else if (pool === "F3") { // Logic for claiming rewards in "F3" pool try { const receipt = await stakingContract.methods.claimRewards().send({ from: accounts[0] }); console.log('Rewards claimed successfully from Friend3 pool:', receipt); } catch (error) { console.error('Error claiming rewards from Friend3 pool:', error); } } } async function checkRewards(pool) { const stakingContract = new web3.eth.Contract(stakingAbi, stakingContractAddress); if (pool === "4token") { // Logic for checking rewards in "Ignore Fud" pool try { const rewardsWei = await stakingContract.methods.userStakeRewards(accounts[0]).call(); const rewards = Math.floor(rewardsWei / 10**18); console.log('Rewards for Ignore Fud pool:', rewards); alert(`Rewards for Ignore Fud pool: ${rewards} $4TOKEN`); } catch (error) { console.error('Error checking rewards for Ignore Fud pool:', error); alert(`Error checking rewards for Ignore Fud pool: ${error.message}`); } } else if (pool === "ChainGPT") { // Logic for checking rewards in "ChainGPT" pool try { const rewardsWei = await stakingContract.methods.userStakeRewards(accounts[0]).call(); const rewards = Math.floor(rewardsWei / 10**18); console.log('Rewards for ChainGPT pool:', rewards); alert(`Rewards for ChainGPT pool: ${rewards} $CGPT`); } catch (error) { console.error('Error checking rewards for ChainGPT pool:', error); alert(`Error checking rewards for ChainGPT pool: ${error.message}`); } } else if (pool === "F3") { // Logic for checking rewards in "F3" pool try { const rewardsWei = await stakingContract.methods.userStakeRewards(accounts[0]).call(); const rewards = Math.floor(rewardsWei / 10**18); console.log('Rewards for F3 pool:', rewards); alert(`Rewards for Friend3 pool: ${rewards} $F3 IOU`); } catch (error) { console.error('Error checking rewards for Friend3 pool:', error); alert(`Error checking rewards for Friend pool: ${error.message}`); } } } </script></div><div class="w-embed w-script"><script> // enhanced (buttons) event listeners document.querySelector(".action-button.stakefud").addEventListener("click", async function () { try { setStakingContract("4token"); // Set the correct contract address await checkAndSwitchChain(); await stakeToken("4token"); } catch (error) { console.error("Error staking NFT:", error); alert("Error staking NFT. Please try again and ensure all parameters are met."); } }); document.querySelector(".action-button.unstakefud").addEventListener("click", async function () { try { setStakingContract("4token"); // Set the correct contract address await checkAndSwitchChain(); await unstakeToken("4token"); } catch (error) { console.error("Error unstaking FUD token:", error); alert("Error unstaking NFT. Please try again and ensure all parameters are met."); } }); document.querySelector(".action-button.claimfud").addEventListener("click", async function () { try { setStakingContract("4token"); // Set the correct contract address await checkAndSwitchChain(); await claimRewards("4token"); } catch (error) { console.error("Error claiming rewards for 4Token:", error); alert("Error claiming rewards for 4Token."); } }); document.querySelector(".action-button.checkfud").addEventListener("click", async function () { try { setStakingContract("4token"); // Set the correct contract address await checkAndSwitchChain(); await checkRewards("4token"); } catch (error) { console.error("Error checking rewards for 4Token:", error); alert("Error checking rewards for 4Token. Please try again."); } }); // Event listeners for "ChainGPT" pool document.querySelector(".action-button.stakechain").addEventListener("click", async function () { try { setStakingContract("ChainGPT"); // Set the correct contract address await checkAndSwitchChain(); await stakeToken("ChainGPT"); } catch (error) { console.error("Error staking NFT:", error); alert("Error staking NFT. Please try again."); } }); document.querySelector(".action-button.unstakechain").addEventListener("click", async function () { try { setStakingContract("ChainGPT"); // Set the correct contract address await checkAndSwitchChain(); await unstakeToken("ChainGPT"); } catch (error) { console.error("Error unstaking NFT:", error); alert("Error unstaking NFT. Please try again."); } }); document.querySelector(".action-button.claimchain").addEventListener("click", async function () { try { setStakingContract("ChainGPT"); // Set the correct contract address await checkAndSwitchChain(); await claimRewards("ChainGPT"); } catch (error) { console.error("Error claiming rewards for ChainGPT token:", error); alert("Error claiming rewards for ChainGPT token. Please try again."); } }); document.querySelector(".action-button.checkchain").addEventListener("click", async function () { try { setStakingContract("ChainGPT"); // Set the correct contract address await checkAndSwitchChain(); await checkRewards("ChainGPT"); } catch (error) { console.error("Error checking rewards for ChainGPT token:", error); alert("Error checking rewards for ChainGPT token. Please try again."); } }); // Event listeners for "F3" pool document.querySelector(".action-button.stakef3").addEventListener("click", async function () { try { setStakingContract("F3"); // Set the correct contract address await checkAndSwitchChain(); await stakeToken("F3"); } catch (error) { console.error("Error staking NFT:", error); alert("Error staking NFT. Please try again."); } }); document.querySelector(".action-button.unstakef3").addEventListener("click", async function () { try { setStakingContract("F3"); // Set the correct contract address await checkAndSwitchChain(); await unstakeToken("F3"); } catch (error) { console.error("Error unstaking NFT:", error); alert("Error unstaking NFT. Please try again."); } }); document.querySelector(".action-button.claimf3").addEventListener("click", async function () { try { setStakingContract("F3"); // Set the correct contract address await checkAndSwitchChain(); await claimRewards("F3"); } catch (error) { console.error("Error claiming rewards for Friend3 token:", error); alert("Error claiming rewards for Friend3 token. Please try again."); } }); document.querySelector(".action-button.checkf31").addEventListener("click", async function () { try { setStakingContract("F3"); // Set the correct contract address await checkAndSwitchChain(); await checkRewards("F3"); } catch (error) { console.error("Error checking rewards for Friend3 token:", error); alert("Error checking rewards for Friend3 token. Please try again."); } }); </script></div><script src="https://d3e54v103j8qbb.cloudfront.net/js/jquery-3.5.1.min.dc5e7f18c8.js?site=62da93af6e138f59513385a7" type="text/javascript" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script><script src="https://assets-global.website-files.com/62da93af6e138f59513385a7/js/webflow.7795ff061.js" type="text/javascript"></script><script> jQuery('#arrow_right_click').on('click', function() { jQuery('#arrow_right').click(); }); jQuery('#arrow_left_click').on('click', function() { jQuery('#arrow_left').click(); }); </body></html>