-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fix Solana pre-instruction serialization issues
- Loading branch information
1 parent
1dde91e
commit bcb3f29
Showing
515 changed files
with
3,037 additions
and
1,428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
lib/solana/src/borsh_serialization/instuction/instuction.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,25 @@ | ||
import 'package:on_chain/solana/solana.dart'; | ||
|
||
abstract class ProgramLayoutInstruction { | ||
abstract final dynamic insturction; | ||
abstract final String name; | ||
abstract final String programName; | ||
abstract final SolAddress programAddress; | ||
} | ||
|
||
class UnknownProgramInstruction implements ProgramLayoutInstruction { | ||
@override | ||
final dynamic insturction; | ||
@override | ||
final String name; | ||
const UnknownProgramInstruction(this.insturction, this.name); | ||
static const UnknownProgramInstruction unknown = | ||
UnknownProgramInstruction(null, "Unknown"); | ||
|
||
static const List<UnknownProgramInstruction> values = [unknown]; | ||
|
||
@override | ||
String get programName => "Unknown"; | ||
@override | ||
SolAddress get programAddress => throw UnimplementedError(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import 'package:blockchain_utils/exception/exceptions.dart'; | ||
|
||
class SolanaPluginException extends BlockchainUtilsException { | ||
const SolanaPluginException(this.message, {this.details}); | ||
|
||
@override | ||
final String message; | ||
|
||
@override | ||
final Map<String, dynamic>? details; | ||
|
||
@override | ||
String toString() { | ||
String msg = message; | ||
if (details?.isNotEmpty ?? false) { | ||
msg += ' Details: $details'; | ||
} | ||
return msg; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.