Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/security-and-profile #12

Merged
merged 7 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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