import { ethers } from 'ethers' import { BaseProject } from './base' export const peaqChain = { id: 3338, name: 'PEAQ', nativeCurrency: { name: 'PEAQ', symbol: 'PEAQ', decimals: 18, }, rpcUrls: { default: { http: ['https://quicknode1.peaq.xyz'] }, }, blockExplorers: { default: { name: 'Agung Network', url: 'https://peaq.subscan.io', }, }, } export const peaqTestnetChain = { id: 9990, name: 'Agung Network', nativeCurrency: { name: 'AGNG', symbol: 'AGNG', decimals: 18, }, rpcUrls: { default: { http: ['https://wss-async.agung.peaq.network'] }, }, blockExplorers: { default: { name: 'Agung Network', url: 'https://polkadot.js.org/apps/?rpc=wss:///wss-async.agung.peaq.network#/explorer', }, }, testnet: true, } export const peaqContract = { delegationPool: '0x84C1d56B082E913AE7416a7b50586E26D6D8C69e', pToken: '0xe36e7Ac6e7a93D3C40f287f3857b01d6e46c565A', miningToken: '0x0000000000000000000000000000000000000000', wpToken: '0xE5330a9fBA99504C534127D39727729899c9a506', withdrawQueue: '0x618d55566CA6a7c642a853687eDC6873E50f31DD', } export const peaqTestnetContract = { delegationPool: '0x9029D26E51DeD067d12908AC5EFCFEfA8b646b37', pToken: '0xEE9c1c98bc1785A833F493f6484c2A8E003c979f', miningToken: '0x0000000000000000000000000000000000000000', wpToken: '0x4e95cE1bdF42b88d8581572702885F7B3B3d73C4', withdrawQueue: '0xF594917a2b317F0C674B5cdb64B07e00E9D9eabD', } export class PeaqProject extends BaseProject { name = 'peaq' thawingEnabled = false withdrawQueueEnabled = true withdrawCancelEnabled = true minRequestAmount = 1 miningToken = { name: 'PEAQ', symbol: 'PEAQ', decimals: 18, isNative: true, icon: 'https://d135ugxgwtnu1c.cloudfront.net/peaq-91c54343.png', } pToken = { name: 'stPEAQ', symbol: 'stPEAQ', decimals: 18, icon: 'https://d135ugxgwtnu1c.cloudfront.net/peaq-91c54343.png', } wpToken = { name: 'wstPEAQ', symbol: 'wstPEAQ', decimals: 18, icon: 'https://d135ugxgwtnu1c.cloudfront.net/peaq-91c54343.png', } chainConfig = peaqChain contracts: { delegationPool: string pToken: string miningToken: string } metadata = { guideLink: 'https://docs.parasail.network/delegation-guides/guide-for-peaq-users/', website: 'https://www.peaq.xyz', description: 'peaq focuses on powering Decentralized Physical Infrastructure Networks (DePIN) and the Machine Economy. It offers modular functions designed to power and tokenize vehicles, robots, and various devices across any DePIN. peaq is built as a highly decentralized and environmentally friendly network, supporting diverse DePINs in sectors such as energy, mobility, and connectivity. It has earned the trust of companies like Bosch, Mastercard, and Airbus.', about: 'peaq focuses on powering Decentralized Physical Infrastructure Networks (DePIN) and the Machine Economy. It offers modular functions designed to power and tokenize vehicles, robots, and various devices across any DePIN. peaq is built as a highly decentralized and environmentally friendly network, supporting diverse DePINs in sectors such as energy, mobility, and connectivity. It has earned the trust of companies like Bosch, Mastercard, and Airbus.', withdrawTips: 'The amount of tokens available for immediate withdrawal. Larger withdrawals need to request withdraw and wait for the reserve to be replenished by new deposits or operator repayments', } constructor({ isTestnet, provider, contracts = {}, }: { isTestnet: boolean provider?: ethers.providers.JsonRpcProvider contracts?: { delegationPool?: string pToken?: string } }) { super(provider) this.chainConfig = isTestnet ? peaqTestnetChain : peaqChain this.contracts = isTestnet ? { ...peaqTestnetContract, ...contracts } : { ...peaqContract, ...contracts } this.isTestnet = isTestnet } getAssetsInfo = async () => { const totalSupply = await this.getTokenContract( this.contracts.pToken ).totalSupply() return { apy: 0.0323, lockedAssets: +ethers.utils.formatUnits( totalSupply, this.pToken.decimals ), } } }