Skip to content

Commit d158695

Browse files
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
1 parent 18d0ca0 commit d158695

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

oft.json

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"version": "0.1.0",
3+
"name": "oft",
4+
"constants": [],
5+
"instructions": [
6+
{
7+
"name": "initialize",
8+
"accounts": [
9+
{
10+
"name": "owner",
11+
"isMut": true,
12+
"isSigner": true
13+
},
14+
{
15+
"name": "systemProgram",
16+
"isMut": false,
17+
"isSigner": false
18+
}
19+
],
20+
"args": [
21+
{
22+
"name": "decimals",
23+
"type": "u8"
24+
},
25+
{
26+
"name": "name",
27+
"type": "string"
28+
},
29+
{
30+
"name": "symbol",
31+
"type": "string"
32+
}
33+
]
34+
}
35+
],
36+
"accounts": [
37+
{
38+
"name": "Config",
39+
"type": {
40+
"kind": "struct",
41+
"fields": [
42+
{
43+
"name": "owner",
44+
"type": "publicKey"
45+
}
46+
]
47+
}
48+
}
49+
],
50+
"metadata": {
51+
"address": "oft1234567890123456789012345678901234567890"
52+
}
53+
}

0 commit comments

Comments
 (0)