Skip to content

Commit e632c14

Browse files
committed
Implement Fuego testnet configuration
- Add NetworkConfig model with mainnet/testnet support - Configure testnet ports: daemon 20808, wallet 28280 - Add address prefix and network ID configuration - Update FuegoRPCService to use network-specific ports - Update WalletDaemonService to support network config - Add NetworkSelectionScreen for choosing mainnet/testnet - Update WalletProvider with network configuration support - Add network selection option in settings screen - Include testnet seed nodes and explorer URLs - Support for testnet faucet integration Testnet Configuration: - Daemon RPC Port: 20808 - Wallet RPC Port: 28280 - Address Prefix: FUEGO-TEST - Network ID: fuego-testnet
1 parent a016c68 commit e632c14

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2540
-29
lines changed

App/Configuration/README.md

Whitespace-only changes.

App/Configuration/logo.png

74.5 KB
Loading

App/Configuration/project.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?xml version="1.0"?><Configuration DisplayName="App" PackageName="com.example.App" App="true" Pad="false" Introduction="" MajorVersion="1" MinorVersion="0" Revision="1"><Code><Strings><Item>Flutter</Item></Strings></Code></Configuration>

App/Pages/Home.uiapp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?xml version="1.0"?><UI Version="1" PullVersion="701bf79b-eec0-4cb1-94b2-6a8676bd47a9" LastVersion="701bf79b-eec0-4cb1-94b2-6a8676bd47a9" Type="App" ID="f292c148-f2eb-48dc-aec8-639f30735358" Name="Home" Alias="" Description=""><View Width="375.0" Height="812.0" Left="20.0" Top="20.0" Zoom="1.0" IsTable="false" ShowAppBar="false" ShowBottomNavigationBar="false" ShowFloatingActionButton="false" StatusBarBrightness="Brightness.light" Background="surface" FabBackgroundColor="primary" FabForegroundColor="onPrimary" FabFocusColor="onPrimaryContainer" FabHoverColor="primaryContainer" FabSplashColor="tertiary" FabElevation="4.0" FabFocusElevation="4.0" FabHoverElevation="4.0" FabHighlightElevation="4.0" FabLocation="centerDocked" FabIcon="" FabMode="FloatingActionButtonBorderType.roundedRectangle" FabMini="false" FabRadius="20"><AppBar Type="center" MainAxisAlignment="start" CrossAxisAlignment="start" VerticalDirection="down" TextDirection="ltr" Background="surface" Icon="" IconColor="onSurface" ActionIcon="" ActionIconColor="onSurface" ShadowColor="onSurface" Elevation="0.0" TitleSpacing="0.0" Height="60.0"><Controls/></AppBar><Body Type="column" MainAxisAlignment="start" CrossAxisAlignment="start" VerticalDirection="down" TextDirection="ltr" Background="surface"><Padding><Padding Left="0.0" Top="0.0" Right="0.0" Bottom="0.0"/></Padding><Controls/></Body><BottomNavigationBar Type="stack" MainAxisAlignment="start" CrossAxisAlignment="start" VerticalDirection="down" TextDirection="ltr" Background="surface" Height="56.0"><Padding><Padding Left="0.0" Top="0.0" Right="0.0" Bottom="0.0"/></Padding><Controls/></BottomNavigationBar></View><PadView Width="1024.0" Height="768.0" Left="20.0" Top="20.0" Zoom="1.0" IsTable="false" ShowAppBar="false" ShowBottomNavigationBar="false" ShowFloatingActionButton="false" StatusBarBrightness="Brightness.light" Background="surface" FabBackgroundColor="primary" FabForegroundColor="onPrimary" FabFocusColor="onPrimaryContainer" FabHoverColor="primaryContainer" FabSplashColor="tertiary" FabElevation="4.0" FabFocusElevation="4.0" FabHoverElevation="4.0" FabHighlightElevation="4.0" FabLocation="centerDocked" FabIcon="" FabMode="FloatingActionButtonBorderType.roundedRectangle" FabMini="false" FabRadius="20"><AppBar Type="center" MainAxisAlignment="start" CrossAxisAlignment="start" VerticalDirection="down" TextDirection="ltr" Background="surface" Icon="" IconColor="onSurface" ActionIcon="" ActionIconColor="onSurface" ShadowColor="onSurface" Elevation="0.0" TitleSpacing="0.0" Height="60.0"><Controls/></AppBar><Body Type="column" MainAxisAlignment="start" CrossAxisAlignment="start" VerticalDirection="down" TextDirection="ltr" Background="surface"><Padding><Padding Left="0.0" Top="0.0" Right="0.0" Bottom="0.0"/></Padding><Controls/></Body><BottomNavigationBar Type="stack" MainAxisAlignment="start" CrossAxisAlignment="start" VerticalDirection="down" TextDirection="ltr" Background="surface" Height="56.0"><Padding><Padding Left="0.0" Top="0.0" Right="0.0" Bottom="0.0"/></Padding><Controls/></BottomNavigationBar></PadView><DataPage><Controls/></DataPage></UI>

App/project.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?xml version="1.0"?><Project Version="2" Type="Client" PullVersion="9836c0b2-8d71-4e08-82e1-cfcdd5cb1868" LastVersion="a5ddaf19-fe04-448b-b09e-504ae015a2f1" ID="2168111e-2f45-45bf-9c14-943f13e1a61c" Name="App" Description="" MainPage="f292c148-f2eb-48dc-aec8-639f30735358"/>

COMPLETE_FUEGO_WALLET_OVERVIEW.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ I have successfully created a **complete, production-ready Flutter mobile wallet
4949
### 🌐 **Network & Node Management**
5050
**Full Fuego RPC Integration** - Complete daemon communication
5151
**Connection Status Monitoring** - Real-time network connectivity tracking
52-
**Custom Node Support** - Connect to any Fuego node
52+
**Custom Node Support** - Connect to any daemon remote or local
5353
**Sync Progress Display** - Visual blockchain synchronization progress
5454
**Network Health Indicators** - Connection quality and status reporting
5555

56-
### 🔥 **Elderfier Staking System**
57-
**Elderfier Node Registration** - Complete node registration with 800 XFG minimum stake
58-
**My Nodes Management** - Track personal Elderfier nodes with status monitoring
56+
### 🔥 **Elderfyre StayKing System**
57+
**Elderfier Node Registration** - Complete node registration ceremony with 800 XFG stake
58+
**MyFier Node Management** - Track your personal Elderfier node with status monitoring
5959
**Network Overview** - View all network Elderfier nodes and statistics
6060
**Stake Management** - Full staking interface with balance validation
6161
**Consensus Participation** - Support for Fast-Pass, Fall-Back, and Full-Quorum consensus

FUEGO_WALLET_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ lib/
109109
### Network Requirements
110110
- **Fuego Daemon**: Requires running Fuego daemon for full functionality
111111
- **RPC Ports**:
112-
- 28180 (Daemon RPC)
112+
- 18180 (Daemon RPC)
113113
- 8070 (Wallet Service RPC)
114114

115115
## 🚀 Getting Started

LICENSE

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
MIT License
22

3-
Copyright (c) 2024 Fuego Project
3+
Copyright (c) 2017-2025 Fuego Project Developers
4+
Copyright (c) 2023-2025 Elderfire Privacy Group
5+
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy
68
of this software and associated documentation files (the "Software"), to deal

lib/main.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import 'package:flutter/services.dart';
44
import 'providers/wallet_provider.dart';
55
import 'services/fuego_rpc_service.dart';
66
import 'services/wallet_daemon_service.dart';
7+
import 'models/network_config.dart';
78
import 'screens/splash_screen.dart';
89
import 'utils/theme.dart';
910

@@ -14,6 +15,7 @@ void main() async {
1415
await WalletDaemonService.initialize(
1516
daemonAddress: '207.244.247.64',
1617
daemonPort: 18180,
18+
networkConfig: NetworkConfig.mainnet,
1719
);
1820

1921
// Set preferred orientations
@@ -47,6 +49,7 @@ class XFGWalletApp extends StatelessWidget {
4749
rpcService: FuegoRPCService(
4850
host: '207.244.247.64',
4951
port: 18180,
52+
networkConfig: NetworkConfig.mainnet,
5053
),
5154
),
5255
),

lib/models/network_config.dart

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
enum NetworkType {
2+
mainnet,
3+
testnet,
4+
}
5+
6+
class NetworkConfig {
7+
final NetworkType type;
8+
final String name;
9+
final String addressPrefix;
10+
final String networkId;
11+
final int daemonRpcPort;
12+
final int walletRpcPort;
13+
final List<String> seedNodes;
14+
final String? explorerUrl;
15+
final String? faucetUrl;
16+
17+
const NetworkConfig({
18+
required this.type,
19+
required this.name,
20+
required this.addressPrefix,
21+
required this.networkId,
22+
required this.daemonRpcPort,
23+
required this.walletRpcPort,
24+
required this.seedNodes,
25+
this.explorerUrl,
26+
this.faucetUrl,
27+
});
28+
29+
// Mainnet configuration
30+
static const NetworkConfig mainnet = NetworkConfig(
31+
type: NetworkType.mainnet,
32+
name: 'Fuego Mainnet',
33+
addressPrefix: 'FUEGO',
34+
networkId: 'fuego-mainnet',
35+
daemonRpcPort: 18180,
36+
walletRpcPort: 8070,
37+
seedNodes: [
38+
'207.244.247.64:18180',
39+
'node1.usexfg.org:18180',
40+
'node2.usexfg.org:18180',
41+
'fuego.seednode1.com:18180',
42+
'fuego.seednode2.com:18180',
43+
'fuego.communitynode.net:18180',
44+
],
45+
explorerUrl: 'https://explorer.usexfg.org',
46+
);
47+
48+
// Testnet configuration
49+
static const NetworkConfig testnet = NetworkConfig(
50+
type: NetworkType.testnet,
51+
name: 'Fuego Testnet',
52+
addressPrefix: 'FUEGO-TEST',
53+
networkId: 'fuego-testnet',
54+
daemonRpcPort: 20808,
55+
walletRpcPort: 28280,
56+
seedNodes: [
57+
'testnet1.usexfg.org:20808',
58+
'testnet2.usexfg.org:20808',
59+
'fuego-testnet.seednode1.com:20808',
60+
'fuego-testnet.seednode2.com:20808',
61+
],
62+
explorerUrl: 'https://testnet-explorer.usexfg.org',
63+
faucetUrl: 'https://testnet-faucet.usexfg.org',
64+
);
65+
66+
// Get configuration by type
67+
static NetworkConfig getConfig(NetworkType type) {
68+
switch (type) {
69+
case NetworkType.mainnet:
70+
return mainnet;
71+
case NetworkType.testnet:
72+
return testnet;
73+
}
74+
}
75+
76+
// Get all available configurations
77+
static List<NetworkConfig> getAllConfigs() {
78+
return [mainnet, testnet];
79+
}
80+
81+
// Check if this is testnet
82+
bool get isTestnet => type == NetworkType.testnet;
83+
84+
// Check if this is mainnet
85+
bool get isMainnet => type == NetworkType.mainnet;
86+
87+
// Get formatted network info
88+
String get networkInfo => '$name ($networkId)';
89+
90+
// Get default seed node
91+
String get defaultSeedNode => seedNodes.isNotEmpty ? seedNodes.first : '';
92+
93+
@override
94+
String toString() {
95+
return 'NetworkConfig(type: $type, name: $name, daemonPort: $daemonRpcPort, walletPort: $walletRpcPort)';
96+
}
97+
98+
@override
99+
bool operator ==(Object other) {
100+
if (identical(this, other)) return true;
101+
return other is NetworkConfig && other.type == type;
102+
}
103+
104+
@override
105+
int get hashCode => type.hashCode;
106+
}

0 commit comments

Comments
 (0)