VoltrAdaptor: {
accounts: [
{
discriminator: [174, 110, 39, 119, 82, 106, 169, 102];
name: "strategy";
},
{
discriminator: [116, 9, 73, 37, 73, 192, 63, 215];
name: "vaultStrategy";
},
];
address: "3BufioDyECNwuFJLRGCXNbZFrsnJnCsALMfDKjQEnk8x";
errors: [
{ code: 6000; msg: "Invalid amount provided."; name: "invalidAmount" },
{ code: 6001; msg: "Invalid account owner."; name: "invalidAccountOwner" },
{ code: 6002; msg: "Already initialized."; name: "alreadyInitialized" },
{ code: 6003; msg: "Invalid token mint."; name: "invalidTokenMint" },
{ code: 6004; msg: "Invalid account input."; name: "invalidAccountInput" },
{ code: 6005; msg: "Not rent exempt."; name: "notRentExempt" },
{ code: 6006; msg: "Math overflow."; name: "mathOverflow" },
{ code: 6007; msg: "Kamino deposit failed."; name: "kaminoDepositFailed" },
{
code: 6008;
msg: "Kamino initialize failed.";
name: "kaminoInitializeFailed";
},
{
code: 6009;
msg: "Marginfi initialize failed.";
name: "marginfiInitializeFailed";
},
{
code: 6010;
msg: "Solend initialize failed.";
name: "solendInitializeFailed";
},
{
code: 6011;
msg: "Invalid remaining accounts.";
name: "invalidRemainingAccounts";
},
];
instructions: [
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{ name: "admin"; signer: true },
{ name: "counterpartyAssetTa"; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
writable: true;
},
{ name: "protocolProgram" },
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
];
args: [
{ name: "strategyType"; type: { defined: { name: "strategyType" } } },
];
discriminator: [152, 160, 107, 148, 245, 190, 127, 224];
name: "createStrategy";
},
{
accounts: [
{ name: "vaultAssetIdleAuth"; signer: true; writable: true },
{ name: "strategy" },
{
name: "vaultStrategy";
pda: {
seeds: [
{
kind: "const";
value: [
118,
97,
117,
108,
116,
95,
115,
116,
114,
97,
116,
101,
103,
121,
];
},
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "strategy" },
];
};
writable: true;
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultAssetIdleAta";
pda: {
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,
];
};
seeds: [
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "counterpartyAssetTa"; writable: true },
{ name: "protocolProgram" },
{ name: "assetTokenProgram" },
];
args: [{ name: "amount"; type: "u64" }];
discriminator: [242, 35, 198, 137, 82, 225, 242, 182];
name: "deposit";
},
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{ name: "vaultAssetIdleAuth"; signer: true; writable: true },
{ name: "strategy" },
{
name: "vaultStrategy";
pda: {
seeds: [
{
kind: "const";
value: [
118,
97,
117,
108,
116,
95,
115,
116,
114,
97,
116,
101,
103,
121,
];
},
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "strategy" },
];
};
writable: true;
},
{ name: "protocolProgram" },
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
];
args: [];
discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
name: "initialize";
},
{
accounts: [
{ name: "vaultAssetIdleAuth"; signer: true; writable: true },
{ name: "strategy" },
{
name: "vaultStrategy";
pda: {
seeds: [
{
kind: "const";
value: [
118,
97,
117,
108,
116,
95,
115,
116,
114,
97,
116,
101,
103,
121,
];
},
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "strategy" },
];
};
writable: true;
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultAssetIdleAta";
pda: {
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,
];
};
seeds: [
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "counterpartyAssetTa"; writable: true },
{ name: "counterpartyAssetTaAuth"; writable: true },
{ name: "protocolProgram" },
{ name: "assetTokenProgram" },
];
args: [{ name: "amount"; type: "u64" }];
discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
name: "withdraw";
},
];
metadata: {
description: "Created with Anchor";
name: "voltrAdaptor";
spec: "0.1.0";
version: "0.1.0";
};
types: [
{
name: "strategy";
type: {
fields: [
{ name: "counterpartyAssetTa"; type: "pubkey" },
{ name: "protocolProgram"; type: "pubkey" },
{ name: "strategyType"; type: { defined: { name: "strategyType" } } },
];
kind: "struct";
};
},
{
name: "strategyType";
type: {
kind: "enum";
variants: [
{ name: "solend" },
{ name: "drift" },
{ name: "marginfi" },
{ name: "kamino" },
];
};
},
{
name: "vaultStrategy";
type: {
fields: [
{ name: "vaultAssetIdleAuth"; type: "pubkey" },
{ name: "strategy"; type: "pubkey" },
{ name: "currentAmount"; type: "u64" },
];
kind: "struct";
};
},
];
}
Type declaration
accounts: [
{
discriminator: [174, 110, 39, 119, 82, 106, 169, 102];
name: "strategy";
},
{
discriminator: [116, 9, 73, 37, 73, 192, 63, 215];
name: "vaultStrategy";
},
]
address: "3BufioDyECNwuFJLRGCXNbZFrsnJnCsALMfDKjQEnk8x"
errors: [
{ code: 6000; msg: "Invalid amount provided."; name: "invalidAmount" },
{ code: 6001; msg: "Invalid account owner."; name: "invalidAccountOwner" },
{ code: 6002; msg: "Already initialized."; name: "alreadyInitialized" },
{ code: 6003; msg: "Invalid token mint."; name: "invalidTokenMint" },
{ code: 6004; msg: "Invalid account input."; name: "invalidAccountInput" },
{ code: 6005; msg: "Not rent exempt."; name: "notRentExempt" },
{ code: 6006; msg: "Math overflow."; name: "mathOverflow" },
{ code: 6007; msg: "Kamino deposit failed."; name: "kaminoDepositFailed" },
{
code: 6008;
msg: "Kamino initialize failed.";
name: "kaminoInitializeFailed";
},
{
code: 6009;
msg: "Marginfi initialize failed.";
name: "marginfiInitializeFailed";
},
{
code: 6010;
msg: "Solend initialize failed.";
name: "solendInitializeFailed";
},
{
code: 6011;
msg: "Invalid remaining accounts.";
name: "invalidRemainingAccounts";
},
]
instructions: [
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{ name: "admin"; signer: true },
{ name: "counterpartyAssetTa"; writable: true },
{
name: "strategy";
pda: {
seeds: [
{ kind: "const"; value: [115, 116, 114, 97, 116, 101, 103, 121] },
{ kind: "account"; path: "counterpartyAssetTa" },
];
};
writable: true;
},
{ name: "protocolProgram" },
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
];
args: [
{ name: "strategyType"; type: { defined: { name: "strategyType" } } },
];
discriminator: [152, 160, 107, 148, 245, 190, 127, 224];
name: "createStrategy";
},
{
accounts: [
{ name: "vaultAssetIdleAuth"; signer: true; writable: true },
{ name: "strategy" },
{
name: "vaultStrategy";
pda: {
seeds: [
{
kind: "const";
value: [
118,
97,
117,
108,
116,
95,
115,
116,
114,
97,
116,
101,
103,
121,
];
},
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "strategy" },
];
};
writable: true;
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultAssetIdleAta";
pda: {
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,
];
};
seeds: [
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "counterpartyAssetTa"; writable: true },
{ name: "protocolProgram" },
{ name: "assetTokenProgram" },
];
args: [{ name: "amount"; type: "u64" }];
discriminator: [242, 35, 198, 137, 82, 225, 242, 182];
name: "deposit";
},
{
accounts: [
{ name: "payer"; signer: true; writable: true },
{ name: "vaultAssetIdleAuth"; signer: true; writable: true },
{ name: "strategy" },
{
name: "vaultStrategy";
pda: {
seeds: [
{
kind: "const";
value: [
118,
97,
117,
108,
116,
95,
115,
116,
114,
97,
116,
101,
103,
121,
];
},
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "strategy" },
];
};
writable: true;
},
{ name: "protocolProgram" },
{ address: "11111111111111111111111111111111"; name: "systemProgram" },
];
args: [];
discriminator: [175, 175, 109, 31, 13, 152, 155, 237];
name: "initialize";
},
{
accounts: [
{ name: "vaultAssetIdleAuth"; signer: true; writable: true },
{ name: "strategy" },
{
name: "vaultStrategy";
pda: {
seeds: [
{
kind: "const";
value: [
118,
97,
117,
108,
116,
95,
115,
116,
114,
97,
116,
101,
103,
121,
];
},
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "strategy" },
];
};
writable: true;
},
{ name: "vaultAssetMint"; writable: true },
{
docs: ["The vault's associated token account for asset."];
name: "vaultAssetIdleAta";
pda: {
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,
];
};
seeds: [
{ kind: "account"; path: "vaultAssetIdleAuth" },
{ kind: "account"; path: "assetTokenProgram" },
{ kind: "account"; path: "vaultAssetMint" },
];
};
writable: true;
},
{ name: "counterpartyAssetTa"; writable: true },
{ name: "counterpartyAssetTaAuth"; writable: true },
{ name: "protocolProgram" },
{ name: "assetTokenProgram" },
];
args: [{ name: "amount"; type: "u64" }];
discriminator: [183, 18, 70, 156, 148, 109, 161, 34];
name: "withdraw";
},
]
metadata: {
description: "Created with Anchor";
name: "voltrAdaptor";
spec: "0.1.0";
version: "0.1.0";
}
types: [
{
name: "strategy";
type: {
fields: [
{ name: "counterpartyAssetTa"; type: "pubkey" },
{ name: "protocolProgram"; type: "pubkey" },
{ name: "strategyType"; type: { defined: { name: "strategyType" } } },
];
kind: "struct";
};
},
{
name: "strategyType";
type: {
kind: "enum";
variants: [
{ name: "solend" },
{ name: "drift" },
{ name: "marginfi" },
{ name: "kamino" },
];
};
},
{
name: "vaultStrategy";
type: {
fields: [
{ name: "vaultAssetIdleAuth"; type: "pubkey" },
{ name: "strategy"; type: "pubkey" },
{ name: "currentAmount"; type: "u64" },
];
kind: "struct";
};
},
]
Program IDL in camelCase format in order to be used in JS/TS.
Note that this is only a type helper and is not the actual IDL. The original IDL can be found at
target/idl/voltr_adaptor.json
.