Skip to content

Commit

Permalink
Merge pull request #12 from sistemaseltigre/feature/security-and-profile
Browse files Browse the repository at this point in the history
feature/security-and-profile
  • Loading branch information
dnielopez authored Oct 31, 2023
2 parents b1e6343 + 771cf20 commit 4d5995d
Show file tree
Hide file tree
Showing 27 changed files with 1,536 additions and 151 deletions.
Binary file added assets/images/icons/add_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/icons/no_user.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions lib/anchor_types/get_dino_score.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import 'package:borsh_annotation/borsh_annotation.dart';
import 'package:solana/solana.dart';

part 'get_dino_score.g.dart';

@BorshSerializable()
class GetScoreArguments with _$GetScoreArguments {
factory GetScoreArguments(
{
@BU64() required BigInt deterministicId,
@BU32() required int score,
@BU32() required int game,
@BPublicKey() required Ed25519HDPublicKey playerkey,
@BPublicKey() required Ed25519HDPublicKey dinokey,
}) = _GetScoreArguments;

const GetScoreArguments._();

factory GetScoreArguments.fromBorsh(Uint8List data) =>
_$GetScoreArgumentsFromBorsh(data);
}
69 changes: 69 additions & 0 deletions lib/anchor_types/get_dino_score.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions lib/anchor_types/get_profile_info.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import 'package:borsh_annotation/borsh_annotation.dart';
import 'package:solana/solana.dart';

part 'get_profile_info.g.dart';

@BorshSerializable()
class GetProfileArguments with _$GetProfileArguments {
factory GetProfileArguments(
{
@BU64() required BigInt deterministicId,
@BString() required String nickname,
@BString() required String bio,
@BString() required String status,
@BString() required String uri,
@BPublicKey() required Ed25519HDPublicKey playerkey,
}) = _GetProfileArguments;

const GetProfileArguments._();

factory GetProfileArguments.fromBorsh(Uint8List data) =>
_$GetProfileArgumentsFromBorsh(data);
}
74 changes: 74 additions & 0 deletions lib/anchor_types/get_profile_info.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions lib/anchor_types/put_dino_score.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import 'package:borsh_annotation/borsh_annotation.dart';

part 'put_dino_score.g.dart';

@BorshSerializable()
class PutScoreArguments with _$PutScoreArguments {
factory PutScoreArguments(
{
@BU32() required int game,
@BU32() required int score,
}) = _PutScoreArguments;

const PutScoreArguments._();

factory PutScoreArguments.fromBorsh(Uint8List data) =>
_$PutScoreArgumentsFromBorsh(data);
}
54 changes: 54 additions & 0 deletions lib/anchor_types/put_dino_score.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions lib/anchor_types/put_profile_info.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'package:borsh_annotation/borsh_annotation.dart';
import 'package:solana/solana.dart';

part 'put_profile_info.g.dart';

@BorshSerializable()
class PutProfileArguments with _$PutProfileArguments {
factory PutProfileArguments(
{
@BString() required String nickname,
@BString() required String bio,
@BString() required String status,
@BString() required String uri,
}) = _PutProfileArguments;

const PutProfileArguments._();

factory PutProfileArguments.fromBorsh(Uint8List data) =>
_$PutProfileArgumentsFromBorsh(data);
}
64 changes: 64 additions & 0 deletions lib/anchor_types/put_profile_info.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import 'package:dinogrow/pages/mini-games/mini_games.dart';
import 'package:dinogrow/pages/mini-games/up/up.dart';
import 'package:dinogrow/pages/mini-games/up/down.dart';
import 'package:dinogrow/pages/mini-games/coming_soon.dart';
import 'package:dinogrow/pages/profile.dart';

void main() {
WidgetsFlutterBinding.ensureInitialized();
Expand Down Expand Up @@ -71,6 +72,11 @@ final GoRouter _router = GoRouter(routes: <GoRoute>[
builder: (context, state) {
return const ComingSoonScreen();
}),
GoRoute(
path: '/profile',
builder: (context, state) {
return const ProfileScreen();
}),
]);

class MyApp extends StatelessWidget {
Expand Down
Loading

0 comments on commit 4d5995d

Please sign in to comment.