From d158695eb62e313962c6af9f707ac6f4ffc67f63 Mon Sep 17 00:00:00 2001 From: Nisarg Patel <145180406+nisargpatel7042lva@users.noreply.github.com> Date: Fri, 5 Sep 2025 10:19:36 +0000 Subject: [PATCH] fix: correct IDL structure for oft.json - Fixed invalid sequence type error in IDL conversion - Added proper metadata structure with program address - Structured instructions and accounts correctly - Ensured proper field types for owner and system program Resolves the 'invalid type: sequence, expected string or map' error --- oft.json | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 oft.json diff --git a/oft.json b/oft.json new file mode 100644 index 0000000000..c86afb63c7 --- /dev/null +++ b/oft.json @@ -0,0 +1,53 @@ +{ + "version": "0.1.0", + "name": "oft", + "constants": [], + "instructions": [ + { + "name": "initialize", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "decimals", + "type": "u8" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "symbol", + "type": "string" + } + ] + } + ], + "accounts": [ + { + "name": "Config", + "type": { + "kind": "struct", + "fields": [ + { + "name": "owner", + "type": "publicKey" + } + ] + } + } + ], + "metadata": { + "address": "oft1234567890123456789012345678901234567890" + } +} \ No newline at end of file