1+ // FlareNetwork interface for Flare-family chains
2+ export interface FlareNetwork {
3+ name : string ;
4+ family : CoinFamily ;
5+ explorerUrl : string ;
6+ accountExplorerUrl : string ;
7+ chainId ?: number ;
8+ nativeCoinOperationHashPrefix ?: string ;
9+ batcherContractAddress ?: string ;
10+ forwarderFactoryAddress ?: string ;
11+ forwarderImplementationAddress ?: string ;
12+ blockchainID ?: string ;
13+ cChainBlockchainID ?: string ;
14+ avaxAssetID ?: string ;
15+ networkID ?: number ;
16+ hrp ?: string ;
17+ alias ?: string ;
18+ vm ?: string ;
19+ txFee ?: string ;
20+ maxImportFee ?: string ;
21+ createSubnetTx ?: string ;
22+ createChainTx ?: string ;
23+ creationTxFee ?: string ;
24+ minConsumption ?: string ;
25+ maxConsumption ?: string ;
26+ maxSupply ?: string ;
27+ minStake ?: string ;
28+ minStakeDuration ?: string ;
29+ maxStakeDuration ?: string ;
30+ minDelegationStake ?: string ;
31+ minDelegationFee ?: string ;
32+ }
33+
134import { CoinFamily } from './base' ;
235
336export enum NetworkType {
@@ -1678,7 +1711,61 @@ class Somi extends Mainnet implements EthereumNetwork {
16781711 batcherContractAddress = '0x3e1e5d78e44f15593b3b61ed278f12c27f0ff33e' ;
16791712}
16801713
1681- class Flare extends Mainnet implements EthereumNetwork {
1714+ export class FlareP extends Mainnet implements FlareNetwork {
1715+ name = 'FlareP' ;
1716+ family = CoinFamily . FLRP ;
1717+ explorerUrl = 'https://flarescan.com/blockchain/pvm/transactions/' ;
1718+ accountExplorerUrl = 'https://flarescan.com/blockchain/pvm/address/' ;
1719+ blockchainID = '11111111111111111111111111111111LpoYY' ;
1720+ cChainBlockchainID = '2q9e4r6Mu3U68nU1fYjgbR6JvwrRx36CohpAX5UQxse55x1Q5' ;
1721+ avaxAssetID = '' ; // This is not applicable to our chain, so just any string that passes validation will suffice
1722+ networkID = 14 ;
1723+ hrp = 'flare' ; //The Human-Readable Part for Bech32 addresses on the network (e.g., avax for Mainnet). It's the prefix before the 1 in an address.
1724+ alias = 'P' ;
1725+ vm = 'platformvm' ;
1726+ txFee = '1000000' ; // defaults
1727+ maxImportFee = '10000000' ; // defaults
1728+ createSubnetTx = '100000000' ; // defaults
1729+ createChainTx = '100000000' ; // defaults
1730+ creationTxFee = '10000000' ; // defaults
1731+ minConsumption = '0.1' ;
1732+ maxConsumption = '0.12' ;
1733+ maxSupply = '103688266974000000000' ; // 103B tokens
1734+ minStake = '1000000000000000' ; // 1M FLR
1735+ minStakeDuration = '5256000' ; // 2 months
1736+ maxStakeDuration = '31536000' ; // 1 year
1737+ minDelegationStake = '50000000000000' ; // 50000 FLR
1738+ minDelegationFee = '0' ;
1739+ }
1740+
1741+ export class FlarePTestnet extends Testnet implements FlareNetwork {
1742+ name = 'FlarePTestnet' ;
1743+ family = CoinFamily . FLRP ;
1744+ explorerUrl = 'https://coston2.testnet.flarescan.com/blockchain/pvm/transactions' ;
1745+ accountExplorerUrl = 'https://coston2.testnet.flarescan.com/blockchain/pvm/address/' ;
1746+ blockchainID = '11111111111111111111111111111111LpoYY' ;
1747+ cChainBlockchainID = 'vE8M98mEQH6wk56sStD1ML8HApTgSqfJZLk9gQ3Fsd4i6m3Bi' ;
1748+ avaxAssetID = '' ; // This is not applicable to our chain, so just any string that passes validation will suffice
1749+ networkID = 114 ;
1750+ hrp = 'costwo' ; //The Human-Readable Part for Bech32 addresses on the network (e.g., avax for Mainnet). It's the prefix before the 1 in an address.
1751+ alias = 'P' ;
1752+ vm = 'platformvm' ;
1753+ txFee = '1000000' ; // defaults
1754+ maxImportFee = '10000000' ; // defaults
1755+ createSubnetTx = '100000000' ; // defaults
1756+ createChainTx = '100000000' ; // defaults
1757+ creationTxFee = '10000000' ; // defaults
1758+ minConsumption = '0.1' ;
1759+ maxConsumption = '0.12' ;
1760+ maxSupply = '79000000000000000000000' ; // 79 trillion tokens
1761+ minStake = '1000000000000000' ; // 1M FLR
1762+ minStakeDuration = '5256000' ; // 2 months
1763+ maxStakeDuration = '31536000' ; // 1 year
1764+ minDelegationStake = '50000000000000' ; // 50000 FLR
1765+ minDelegationFee = '0' ;
1766+ }
1767+
1768+ export class Flare extends Mainnet implements FlareNetwork , EthereumNetwork {
16821769 name = 'Flarechain' ;
16831770 family = CoinFamily . FLR ;
16841771 explorerUrl = 'https://flare-explorer.flare.network/tx/' ;
@@ -1689,7 +1776,8 @@ class Flare extends Mainnet implements EthereumNetwork {
16891776 forwarderFactoryAddress = '0x37996e762fa8b671869740c79eb33f625b3bf92a' ;
16901777 forwarderImplementationAddress = '0xd5fe1c1f216b775dfd30638fa7164d41321ef79b' ;
16911778}
1692- class FlareTestnet extends Testnet implements EthereumNetwork {
1779+
1780+ export class FlareTestnet extends Testnet implements FlareNetwork , EthereumNetwork {
16931781 name = 'FlarechainTestnet' ;
16941782 family = CoinFamily . FLR ;
16951783 explorerUrl = 'https://coston2-explorer.flare.network/tx/' ;
@@ -1831,6 +1919,7 @@ export const Networks = {
18311919 fiat : Object . freeze ( new Fiat ( ) ) ,
18321920 fetchai : Object . freeze ( new FetchAi ( ) ) ,
18331921 flr : Object . freeze ( new Flare ( ) ) ,
1922+ flrP : Object . freeze ( new FlareP ( ) ) ,
18341923 hash : Object . freeze ( new Hash ( ) ) ,
18351924 hedera : Object . freeze ( new Hedera ( ) ) ,
18361925 icp : Object . freeze ( new Icp ( ) ) ,
@@ -1919,6 +2008,7 @@ export const Networks = {
19192008 fiat : Object . freeze ( new FiatTestnet ( ) ) ,
19202009 fetchai : Object . freeze ( new FetchAiTestnet ( ) ) ,
19212010 flr : Object . freeze ( new FlareTestnet ( ) ) ,
2011+ flrP : Object . freeze ( new FlarePTestnet ( ) ) ,
19222012 mon : Object . freeze ( new MonadTestnet ( ) ) ,
19232013 pyrmont : Object . freeze ( new Pyrmont ( ) ) ,
19242014 ethereumClassicTestnet : Object . freeze ( new EthereumClassicTestnet ( ) ) ,
0 commit comments