From e8d893928a97dbb17fe64ac95b6022019da39369 Mon Sep 17 00:00:00 2001 From: ngundotra Date: Mon, 31 Oct 2022 15:40:12 -0400 Subject: [PATCH] idl instruction: add Write + test --- .../single_file/create_idl_instructions.json | 25 +++++++++++++++++++ .../single_file/create_idl_instructions.rs | 2 ++ 2 files changed, 27 insertions(+) diff --git a/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.json b/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.json index 784bc06..8f544ca 100644 --- a/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.json +++ b/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.json @@ -118,6 +118,31 @@ "type": "u8", "value": 3 } + }, + { + "name": "Write", + "accounts": [ + { + "name": "idl", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "idlData", + "type": "bytes" + } + ], + "discriminant": { + "type": "u8", + "value": 4 + } } ], "metadata": { diff --git a/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.rs b/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.rs index 942d8a2..96da3e8 100644 --- a/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.rs +++ b/shank-idl/tests/fixtures/instructions/single_file/create_idl_instructions.rs @@ -8,4 +8,6 @@ pub enum Instruction { SetBuffer, #[idl_instruction(SetAuthority)] SetAuthority, + #[idl_instruction(Write)] + Write, }