693 lines
22 KiB
JSON
693 lines
22 KiB
JSON
{
|
|
"address": "treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5",
|
|
"metadata": {
|
|
"name": "treasury_management",
|
|
"version": "0.2.3",
|
|
"spec": "0.1.0",
|
|
"description": "Created with Anchor"
|
|
},
|
|
"instructions": [
|
|
{
|
|
"name": "initialize_treasury_management_v0",
|
|
"discriminator": [
|
|
149,
|
|
3,
|
|
201,
|
|
108,
|
|
130,
|
|
56,
|
|
56,
|
|
210
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "payer",
|
|
"writable": true,
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "treasury_management",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
116,
|
|
114,
|
|
101,
|
|
97,
|
|
115,
|
|
117,
|
|
114,
|
|
121,
|
|
95,
|
|
109,
|
|
97,
|
|
110,
|
|
97,
|
|
103,
|
|
101,
|
|
109,
|
|
101,
|
|
110,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "supply_mint"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "treasury_mint"
|
|
},
|
|
{
|
|
"name": "supply_mint"
|
|
},
|
|
{
|
|
"name": "mint_authority",
|
|
"signer": true
|
|
},
|
|
{
|
|
"name": "circuit_breaker",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
99,
|
|
99,
|
|
111,
|
|
117,
|
|
110,
|
|
116,
|
|
95,
|
|
119,
|
|
105,
|
|
110,
|
|
100,
|
|
111,
|
|
119,
|
|
101,
|
|
100,
|
|
95,
|
|
98,
|
|
114,
|
|
101,
|
|
97,
|
|
107,
|
|
101,
|
|
114
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "treasury"
|
|
}
|
|
],
|
|
"program": {
|
|
"kind": "account",
|
|
"path": "circuit_breaker_program"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "treasury",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "account",
|
|
"path": "treasury_management"
|
|
},
|
|
{
|
|
"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": "treasury_mint"
|
|
}
|
|
],
|
|
"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": "system_program",
|
|
"address": "11111111111111111111111111111111"
|
|
},
|
|
{
|
|
"name": "circuit_breaker_program",
|
|
"address": "circAbx64bbsscPbQzZAUvuXpHqrCe6fLMzc2uKXz9g"
|
|
},
|
|
{
|
|
"name": "associated_token_program",
|
|
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "args",
|
|
"type": {
|
|
"defined": {
|
|
"name": "InitializeTreasuryManagementArgsV0"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "redeem_v0",
|
|
"discriminator": [
|
|
235,
|
|
127,
|
|
171,
|
|
139,
|
|
119,
|
|
77,
|
|
235,
|
|
118
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "treasury_management",
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
116,
|
|
114,
|
|
101,
|
|
97,
|
|
115,
|
|
117,
|
|
114,
|
|
121,
|
|
95,
|
|
109,
|
|
97,
|
|
110,
|
|
97,
|
|
103,
|
|
101,
|
|
109,
|
|
101,
|
|
110,
|
|
116
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "supply_mint"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "treasury_mint",
|
|
"relations": [
|
|
"treasury_management"
|
|
]
|
|
},
|
|
{
|
|
"name": "supply_mint",
|
|
"writable": true,
|
|
"relations": [
|
|
"treasury_management"
|
|
]
|
|
},
|
|
{
|
|
"name": "treasury",
|
|
"writable": true,
|
|
"relations": [
|
|
"treasury_management"
|
|
]
|
|
},
|
|
{
|
|
"name": "circuit_breaker",
|
|
"writable": true,
|
|
"pda": {
|
|
"seeds": [
|
|
{
|
|
"kind": "const",
|
|
"value": [
|
|
97,
|
|
99,
|
|
99,
|
|
111,
|
|
117,
|
|
110,
|
|
116,
|
|
95,
|
|
119,
|
|
105,
|
|
110,
|
|
100,
|
|
111,
|
|
119,
|
|
101,
|
|
100,
|
|
95,
|
|
98,
|
|
114,
|
|
101,
|
|
97,
|
|
107,
|
|
101,
|
|
114
|
|
]
|
|
},
|
|
{
|
|
"kind": "account",
|
|
"path": "treasury"
|
|
}
|
|
],
|
|
"program": {
|
|
"kind": "account",
|
|
"path": "circuit_breaker_program"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "from",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "to",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"signer": true,
|
|
"relations": [
|
|
"from"
|
|
]
|
|
},
|
|
{
|
|
"name": "circuit_breaker_program",
|
|
"address": "circAbx64bbsscPbQzZAUvuXpHqrCe6fLMzc2uKXz9g"
|
|
},
|
|
{
|
|
"name": "token_program",
|
|
"address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "args",
|
|
"type": {
|
|
"defined": {
|
|
"name": "RedeemArgsV0"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "update_treasury_management_v0",
|
|
"discriminator": [
|
|
209,
|
|
139,
|
|
90,
|
|
226,
|
|
249,
|
|
149,
|
|
89,
|
|
217
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "treasury_management",
|
|
"writable": true
|
|
},
|
|
{
|
|
"name": "authority",
|
|
"signer": true,
|
|
"relations": [
|
|
"treasury_management"
|
|
]
|
|
}
|
|
],
|
|
"args": [
|
|
{
|
|
"name": "args",
|
|
"type": {
|
|
"defined": {
|
|
"name": "UpdateTreasuryManagementArgsV0"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"accounts": [
|
|
{
|
|
"name": "AccountWindowedCircuitBreakerV0",
|
|
"discriminator": [
|
|
134,
|
|
11,
|
|
69,
|
|
100,
|
|
90,
|
|
132,
|
|
174,
|
|
187
|
|
]
|
|
},
|
|
{
|
|
"name": "TreasuryManagementV0",
|
|
"discriminator": [
|
|
68,
|
|
111,
|
|
120,
|
|
209,
|
|
16,
|
|
110,
|
|
215,
|
|
59
|
|
]
|
|
}
|
|
],
|
|
"errors": [
|
|
{
|
|
"code": 6000,
|
|
"name": "Frozen",
|
|
"msg": "Treasury management is currently frozen"
|
|
},
|
|
{
|
|
"code": 6001,
|
|
"name": "ArithmeticError",
|
|
"msg": "Error in arithmetic"
|
|
}
|
|
],
|
|
"types": [
|
|
{
|
|
"name": "AccountWindowedCircuitBreakerV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "token_account",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "authority",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "owner",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "config",
|
|
"type": {
|
|
"defined": {
|
|
"name": "WindowedCircuitBreakerConfigV0"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "last_window",
|
|
"type": {
|
|
"defined": {
|
|
"name": "WindowV0"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "bump_seed",
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "Curve",
|
|
"type": {
|
|
"kind": "enum",
|
|
"variants": [
|
|
{
|
|
"name": "ExponentialCurveV0",
|
|
"fields": [
|
|
{
|
|
"name": "k",
|
|
"type": "u128"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "InitializeTreasuryManagementArgsV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "authority",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "curve",
|
|
"type": {
|
|
"defined": {
|
|
"name": "Curve"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "freeze_unix_time",
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "window_config",
|
|
"type": {
|
|
"defined": {
|
|
"name": "WindowedCircuitBreakerConfigV0"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "RedeemArgsV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "amount",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "expected_output_amount",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "ThresholdType",
|
|
"type": {
|
|
"kind": "enum",
|
|
"variants": [
|
|
{
|
|
"name": "Percent"
|
|
},
|
|
{
|
|
"name": "Absolute"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "TreasuryManagementV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "treasury_mint",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "supply_mint",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "authority",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "treasury",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "curve",
|
|
"docs": [
|
|
"The bonding curve to use"
|
|
],
|
|
"type": {
|
|
"defined": {
|
|
"name": "Curve"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "freeze_unix_time",
|
|
"docs": [
|
|
"Freeze this curve at this time."
|
|
],
|
|
"type": "i64"
|
|
},
|
|
{
|
|
"name": "bump_seed",
|
|
"type": "u8"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "UpdateTreasuryManagementArgsV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "authority",
|
|
"type": "pubkey"
|
|
},
|
|
{
|
|
"name": "curve",
|
|
"type": {
|
|
"defined": {
|
|
"name": "Curve"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "freeze_unix_time",
|
|
"type": "i64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "WindowV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "last_aggregated_value",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "last_unix_timestamp",
|
|
"type": "i64"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"name": "WindowedCircuitBreakerConfigV0",
|
|
"type": {
|
|
"kind": "struct",
|
|
"fields": [
|
|
{
|
|
"name": "window_size_seconds",
|
|
"type": "u64"
|
|
},
|
|
{
|
|
"name": "threshold_type",
|
|
"type": {
|
|
"defined": {
|
|
"name": "ThresholdType"
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "threshold",
|
|
"type": "u64"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |