File tree Expand file tree Collapse file tree 3 files changed +28
-4
lines changed
e2e/dummy/src/generated/instructions Expand file tree Collapse file tree 3 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -35,3 +35,17 @@ export function getInstruction1Instruction<
3535
3636 return instruction ;
3737}
38+
39+ export type ParsedInstruction1Instruction <
40+ TProgram extends string = typeof DUMMY_PROGRAM_ADDRESS ,
41+ > = {
42+ programAddress : Address < TProgram > ;
43+ } ;
44+
45+ export function parseInstruction1Instruction < TProgram extends string > (
46+ instruction : IInstruction < TProgram >
47+ ) : ParsedInstruction1Instruction < TProgram > {
48+ return {
49+ programAddress : instruction . programAddress ,
50+ } ;
51+ }
Original file line number Diff line number Diff line change @@ -48,3 +48,17 @@ export function getInstruction2Instruction<
4848
4949 return instruction ;
5050}
51+
52+ export type ParsedInstruction2Instruction <
53+ TProgram extends string = typeof DUMMY_PROGRAM_ADDRESS ,
54+ > = {
55+ programAddress : Address < TProgram > ;
56+ } ;
57+
58+ export function parseInstruction2Instruction < TProgram extends string > (
59+ instruction : IInstruction < TProgram >
60+ ) : ParsedInstruction2Instruction < TProgram > {
61+ return {
62+ programAddress : instruction . programAddress ,
63+ } ;
64+ }
Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ export function getInstructionParseFunctionFragment(
2121 : instructionNode . accounts . length ;
2222 const hasData = ! ! customData || instructionNode . arguments . length > 0 ;
2323
24- if ( ! hasAccounts && ! hasData ) {
25- return fragment ( '' ) ;
26- }
27-
2824 const instructionDataName = nameApi . instructionDataType ( instructionNode . name ) ;
2925 const programAddressConstant = nameApi . programAddressConstant ( programNode . name ) ;
3026 const dataTypeFragment = fragment (
You can’t perform that action at this time.
0 commit comments