Skip to content

Commit

Permalink
chore(core): update folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
JosesGabriel committed Feb 4, 2025
1 parent 09e6ca3 commit 1d46c7f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
3 changes: 2 additions & 1 deletion lib/configs/web3_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import 'package:web3dart/web3dart.dart';

/// Get deployed greeter contract
Future<DeployedContract> get deployedGreeterContract async {
const String abiDirectory = 'lib/contracts/staging/greeter.abi.json';
const String abiDirectory =
'lib/core/infrastructures/contracts/staging/greeter.abi.json';
final String contractAddress = dotenv.get('GREETER_CONTRACT_ADDRESS');
final String contractABI = await rootBundle.loadString(abiDirectory);

Expand Down
7 changes: 1 addition & 6 deletions lib/core/application/service/cubit/web3_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,11 @@ import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:reown_appkit/reown_appkit.dart';
import 'package:sophon/configs/web3_config.dart';
import 'package:sophon/internal/enums.dart';
import 'package:sophon/internal/web3_contract.dart';

part 'web3_state.dart';

enum HomeScreenActionButton {
upgradeWallet,
writeToContract,
connectWallet,
}

class Web3Cubit extends Cubit<Web3State> {
Web3Cubit() : super(const Web3State());

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions lib/core/module/home/interfaces/screens/home_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import 'package:sophon/configs/themes.dart';
import 'package:sophon/core/application/service/cubit/web3_cubit.dart';
import 'package:sophon/core/module/auth/interfaces/screens/authentication_screen.dart';
import 'package:sophon/gen/fonts.gen.dart';
import 'package:sophon/internal/enums.dart';
import 'package:url_launcher/url_launcher.dart';

class HomeScreen extends StatefulWidget {
Expand Down
5 changes: 5 additions & 0 deletions lib/internal/enums.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enum HomeScreenActionButton {
upgradeWallet,
writeToContract,
connectWallet,
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ flutter:

assets:
- .env
- lib/contracts/staging/greeter.abi.json
- lib/core/infrastructures/contracts/staging/greeter.abi.json
- assets/images/


Expand Down

0 comments on commit 1d46c7f

Please sign in to comment.