yamaswap-sdk
Version:
ETF SDK for Solana and Evm
726 lines • 14.5 kB
JSON
{
"address": "dXgZyuguvD2m5G5385XkdokZBryUoSE6LbNJeWiFiN5",
"metadata": {
"name": "iswap",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
"name": "close",
"discriminator": [
98,
165,
201,
177,
108,
65,
206,
96
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "iswap",
"writable": true
}
],
"args": []
},
{
"name": "decrement",
"discriminator": [
106,
227,
168,
59,
248,
27,
150,
101
],
"accounts": [
{
"name": "iswap",
"writable": true
}
],
"args": []
},
{
"name": "etf_burn",
"discriminator": [
185,
203,
114,
195,
129,
70,
235,
23
],
"accounts": [
{
"name": "etf_token_info",
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
116,
102,
95,
116,
111,
107,
101,
110,
95,
118,
51
]
},
{
"kind": "account",
"path": "etf_token_mint_account"
}
]
}
},
{
"name": "etf_token_mint_account",
"writable": true
},
{
"name": "etf_token_ata",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "authority"
},
{
"kind": "const",
"value": [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
"kind": "account",
"path": "etf_token_mint_account"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "authority",
"writable": true,
"signer": true
},
{
"name": "token_program",
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "lamports",
"type": "u64"
}
]
},
{
"name": "etf_create",
"discriminator": [
0,
81,
62,
85,
242,
37,
4,
245
],
"accounts": [
{
"name": "etf_token_info",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
116,
102,
95,
116,
111,
107,
101,
110,
95,
118,
51
]
},
{
"kind": "account",
"path": "etf_token_mint_account"
}
]
}
},
{
"name": "metadata_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
109,
101,
116,
97,
100,
97,
116,
97
]
},
{
"kind": "account",
"path": "token_metadata_program"
},
{
"kind": "account",
"path": "etf_token_mint_account"
}
],
"program": {
"kind": "account",
"path": "token_metadata_program"
}
}
},
{
"name": "etf_token_mint_account",
"writable": true,
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
116,
102,
95,
116,
111,
107,
101,
110,
95,
118,
51
]
},
{
"kind": "arg",
"path": "args.symbol"
}
]
}
},
{
"name": "rent",
"address": "SysvarRent111111111111111111111111111111111"
},
{
"name": "authority",
"writable": true,
"signer": true
},
{
"name": "token_metadata_program",
"address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
},
{
"name": "token_program",
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "args",
"type": {
"defined": {
"name": "EtfTokenArgs"
}
}
}
]
},
{
"name": "etf_mint",
"discriminator": [
253,
102,
37,
173,
154,
46,
245,
224
],
"accounts": [
{
"name": "etf_token_info",
"pda": {
"seeds": [
{
"kind": "const",
"value": [
101,
116,
102,
95,
116,
111,
107,
101,
110,
95,
118,
51
]
},
{
"kind": "account",
"path": "etf_token_mint_account"
}
]
}
},
{
"name": "etf_token_mint_account",
"writable": true
},
{
"name": "etf_token_ata",
"writable": true,
"pda": {
"seeds": [
{
"kind": "account",
"path": "authority"
},
{
"kind": "const",
"value": [
6,
221,
246,
225,
215,
101,
161,
147,
217,
203,
225,
70,
206,
235,
121,
172,
28,
180,
133,
237,
95,
91,
55,
145,
58,
140,
245,
133,
126,
255,
0,
169
]
},
{
"kind": "account",
"path": "etf_token_mint_account"
}
],
"program": {
"kind": "const",
"value": [
140,
151,
37,
143,
78,
36,
137,
241,
187,
61,
16,
41,
20,
142,
13,
131,
11,
90,
19,
153,
218,
255,
16,
132,
4,
142,
123,
216,
219,
233,
248,
89
]
}
}
},
{
"name": "authority",
"writable": true,
"signer": true
},
{
"name": "token_program",
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
},
{
"name": "associated_token_program",
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": [
{
"name": "lamports",
"type": "u64"
}
]
},
{
"name": "increment",
"discriminator": [
11,
18,
104,
9,
104,
174,
59,
33
],
"accounts": [
{
"name": "iswap",
"writable": true
}
],
"args": []
},
{
"name": "initialize",
"discriminator": [
175,
175,
109,
31,
13,
152,
155,
237
],
"accounts": [
{
"name": "payer",
"writable": true,
"signer": true
},
{
"name": "iswap",
"writable": true,
"signer": true
},
{
"name": "system_program",
"address": "11111111111111111111111111111111"
}
],
"args": []
},
{
"name": "set",
"discriminator": [
198,
51,
53,
241,
116,
29,
126,
194
],
"accounts": [
{
"name": "iswap",
"writable": true
}
],
"args": [
{
"name": "value",
"type": "u8"
}
]
}
],
"accounts": [
{
"name": "EtfToken",
"discriminator": [
187,
90,
26,
73,
137,
112,
105,
60
]
},
{
"name": "Iswap",
"discriminator": [
228,
5,
227,
43,
35,
87,
170,
87
]
}
],
"errors": [
{
"code": 6000,
"name": "InvalidAccounts",
"msg": "Lack of necessary accounts"
},
{
"code": 6001,
"name": "InsufficientBalance",
"msg": "Insufficient balance"
}
],
"types": [
{
"name": "EtfAsset",
"type": {
"kind": "struct",
"fields": [
{
"name": "token",
"type": "pubkey"
},
{
"name": "weight",
"type": "u16"
}
]
}
},
{
"name": "EtfToken",
"type": {
"kind": "struct",
"fields": [
{
"name": "mint_account",
"type": "pubkey"
},
{
"name": "creator",
"type": "pubkey"
},
{
"name": "create_at",
"type": "i64"
},
{
"name": "description",
"type": "string"
},
{
"name": "assets",
"type": {
"vec": {
"defined": {
"name": "EtfAsset"
}
}
}
}
]
}
},
{
"name": "EtfTokenArgs",
"type": {
"kind": "struct",
"fields": [
{
"name": "name",
"type": "string"
},
{
"name": "symbol",
"type": "string"
},
{
"name": "description",
"type": "string"
},
{
"name": "url",
"type": "string"
},
{
"name": "assets",
"type": {
"vec": {
"defined": {
"name": "EtfAsset"
}
}
}
}
]
}
},
{
"name": "Iswap",
"type": {
"kind": "struct",
"fields": [
{
"name": "count",
"type": "u8"
}
]
}
}
]
}