diff --git a/src/components/topbar.ts b/src/components/topbar.ts index 9c6c63b..04e3464 100644 --- a/src/components/topbar.ts +++ b/src/components/topbar.ts @@ -31,6 +31,9 @@ export class Topbar extends Component { + @@ -132,5 +135,9 @@ export class Topbar extends Component { this.selectProviderModal.hide(); }); } + disconnect() { + this.wallet.disconnect(); + } + } diff --git a/src/pages/avax.ts b/src/pages/avax.ts new file mode 100644 index 0000000..083b91e --- /dev/null +++ b/src/pages/avax.ts @@ -0,0 +1,261 @@ +/* +Network name + Fantom Opera +New RPC URL +https://rpc.ankr.com/fantom/ +Chain ID +250 +Currency symbol +FTM +Block explorer URL +(Optional) +https://ftmscan.com/ + + +=============================== + +Network Name: Fantom testnet +New RPC Url: https://rpc.testnet.fantom.network/ +ChainID: 0xfa2 +Symbol: FTM + +*/ + + +import { Component, xml, useState, reactive, useRef, } from "@odoo/owl"; +import { useContract, useWallet, switchChain } from "@web/core/wallet"; +import {OPage} from "@web/components/page"; + +import img06 from "@web/img/fantom.svg"; +import FantomABI from "@web/data/fantom.json" + + +const genzAdderss = "0x5a1b57f87b59e093d332c945c66b602843099f97"; +const testAddress = "0xaa3a160e91f63f1db959640e0a7b8911b6bd5b95"; +const FantomContract = "0xFC00FACE00000000000000000000000000000000"; +const weiRate = 1000000000000000000; +const testnetChainId = "0xfa2"; +const mainnetChainId = "0xfa"; + + + +export class FantomStaking extends OPage { + static route = '/staking/fantom'; + static template = xml` +