Skip to content

Commit

Permalink
adding new features, fix borsh
Browse files Browse the repository at this point in the history
  • Loading branch information
sistemaseltigre committed Oct 21, 2023
1 parent b1e6343 commit 234e6ad
Show file tree
Hide file tree
Showing 11 changed files with 404 additions and 21 deletions.
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.

Loading

0 comments on commit 234e6ad

Please sign in to comment.