diff --git a/src/programs/vault/accounts/Vault.ts b/src/programs/vault/accounts/Vault.ts index 4862bcb..603dec8 100644 --- a/src/programs/vault/accounts/Vault.ts +++ b/src/programs/vault/accounts/Vault.ts @@ -15,7 +15,7 @@ export class AmountArgs extends Borsh.Data<{ }> { static readonly SCHEMA = this.struct([ ['instruction', 'u8'], - ['amount', 'u8'], + ['amount', 'u64'], ]); instruction: number; @@ -28,7 +28,7 @@ export class NumberOfShareArgs extends Borsh.Data<{ }> { static readonly SCHEMA = this.struct([ ['instruction', 'u8'], - ['numberOfShares', 'u8'], + ['numberOfShares', 'u64'], ]); instruction: number; diff --git a/src/programs/vault/transactions/AddTokenToInactiveVault.ts b/src/programs/vault/transactions/AddTokenToInactiveVault.ts index fb0868f..0ece361 100644 --- a/src/programs/vault/transactions/AddTokenToInactiveVault.ts +++ b/src/programs/vault/transactions/AddTokenToInactiveVault.ts @@ -15,7 +15,6 @@ import { VaultInstructions } from '../VaultProgram'; type AddTokenToInactiveVaultParams = { vault: PublicKey; vaultAuthority: PublicKey; - tokenMint: PublicKey; tokenAccount: PublicKey; tokenStoreAccount: PublicKey; transferAuthority: PublicKey; diff --git a/test/transactions/__snapshots__/vault.test.ts.snap b/test/transactions/__snapshots__/vault.test.ts.snap index 4c3bfcb..a93e190 100644 --- a/test/transactions/__snapshots__/vault.test.ts.snap +++ b/test/transactions/__snapshots__/vault.test.ts.snap @@ -1,16 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Vault transactions ActivateVault 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,3,8,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,159,143,6,27,184,78,233,91,62,245,132,224,91,124,59,214,137,212,247,168,14,89,82,229,138,226,210,144,172,37,9,114,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,76,89,151,115,135,133,231,112,232,200,105,231,73,24,153,94,225,133,16,180,197,75,134,183,114,233,26,222,106,207,230,212,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,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,7,6,2,3,4,5,1,6,2,2,1]}"`; +exports[`Vault transactions ActivateVault 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,3,8,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,159,143,6,27,184,78,233,91,62,245,132,224,91,124,59,214,137,212,247,168,14,89,82,229,138,226,210,144,172,37,9,114,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,76,89,151,115,135,133,231,112,232,200,105,231,73,24,153,94,225,133,16,180,197,75,134,183,114,233,26,222,106,207,230,212,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,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,7,6,2,3,4,5,1,6,9,2,1,0,0,0,0,0,0,0]}"`; -exports[`Vault transactions AddSharesToTreasury 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,9,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,47,149,134,43,4,86,112,205,34,190,227,17,76,57,118,58,74,8,190,235,102,59,20,93,40,60,49,215,209,16,28,79,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,8,7,1,2,4,5,3,6,7,2,8,1]}"`; +exports[`Vault transactions AddSharesToTreasury 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,9,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,47,149,134,43,4,86,112,205,34,190,227,17,76,57,118,58,74,8,190,235,102,59,20,93,40,60,49,215,209,16,28,79,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,8,7,1,2,4,5,3,6,7,9,8,1,0,0,0,0,0,0,0]}"`; -exports[`Vault transactions AddTokenToInactiveVault 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,4,11,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,101,93,28,19,203,90,149,199,215,78,46,179,89,233,42,199,254,72,173,157,164,132,109,200,23,214,238,28,156,187,225,122,56,14,227,34,118,68,35,153,43,122,125,228,180,23,227,117,141,24,61,49,174,102,137,121,161,240,55,57,17,202,119,9,150,132,110,17,239,196,29,68,195,240,218,201,13,156,71,146,105,70,70,77,45,149,246,172,245,40,116,47,143,15,172,10,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,10,10,3,4,5,6,1,0,2,7,8,9,2,1,1]}"`; +exports[`Vault transactions AddTokenToInactiveVault 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,4,11,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,101,93,28,19,203,90,149,199,215,78,46,179,89,233,42,199,254,72,173,157,164,132,109,200,23,214,238,28,156,187,225,122,56,14,227,34,118,68,35,153,43,122,125,228,180,23,227,117,141,24,61,49,174,102,137,121,161,240,55,57,17,202,119,9,150,132,110,17,239,196,29,68,195,240,218,201,13,156,71,146,105,70,70,77,45,149,246,172,245,40,116,47,143,15,172,10,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,10,10,3,4,5,6,1,0,2,7,8,9,9,1,1,0,0,0,0,0,0,0]}"`; exports[`Vault transactions CombineVault 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,2,5,14,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,65,92,170,26,235,186,19,4,62,66,0,120,19,16,61,178,93,15,169,59,18,175,90,189,75,33,225,78,245,177,149,10,113,130,58,253,45,49,114,47,47,147,5,95,85,96,190,20,3,217,125,135,198,245,153,152,0,52,157,207,158,37,17,91,159,143,6,27,184,78,233,91,62,245,132,224,91,124,59,214,137,212,247,168,14,89,82,229,138,226,210,144,172,37,9,114,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,13,197,1,200,227,54,144,180,135,60,26,197,148,51,177,78,126,176,99,35,255,99,85,228,189,76,214,248,116,161,184,176,248,64,64,240,150,212,182,148,163,79,249,191,165,90,105,99,30,20,163,65,190,236,104,97,178,30,190,252,136,188,183,154,53,208,113,76,134,55,13,1,146,174,61,12,154,30,40,230,81,28,53,157,234,14,31,207,115,19,79,12,79,209,124,48,91,40,146,183,9,11,253,128,231,91,83,123,247,28,233,135,231,63,61,168,21,167,85,108,218,57,31,176,134,164,233,93,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,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,13,12,3,4,5,6,7,8,9,1,2,10,11,12,1,3]}"`; exports[`Vault transactions InitVault 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,10,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,0,27,28,145,66,247,112,177,72,38,58,249,60,75,195,245,84,213,55,227,144,86,109,127,203,168,87,82,26,116,56,219,13,197,1,200,227,54,144,180,135,60,26,197,148,51,177,78,126,176,99,35,255,99,85,228,189,76,214,248,116,161,184,176,71,52,74,64,244,149,107,98,150,13,155,185,184,196,61,57,67,130,233,212,49,232,156,191,78,216,232,55,63,50,139,50,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,98,86,108,189,45,226,220,194,183,175,163,189,36,24,204,64,173,217,114,41,18,47,129,6,153,127,142,187,1,179,21,176,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,9,8,1,2,3,4,5,6,7,8,2,0,0]}"`; -exports[`Vault transactions MintFractionalShares 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,8,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,0,27,28,145,66,247,112,177,72,38,58,249,60,75,195,245,84,213,55,227,144,86,109,127,203,168,87,82,26,116,56,219,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,76,89,151,115,135,133,231,112,232,200,105,231,73,24,153,94,225,133,16,180,197,75,134,183,114,233,26,222,106,207,230,212,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,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,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,7,6,1,2,3,4,5,6,2,6,1]}"`; +exports[`Vault transactions MintFractionalShares 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,8,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,0,27,28,145,66,247,112,177,72,38,58,249,60,75,195,245,84,213,55,227,144,86,109,127,203,168,87,82,26,116,56,219,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,76,89,151,115,135,133,231,112,232,200,105,231,73,24,153,94,225,133,16,180,197,75,134,183,114,233,26,222,106,207,230,212,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,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,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,7,6,1,2,3,4,5,6,9,6,1,0,0,0,0,0,0,0]}"`; exports[`Vault transactions RedeemShares 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,5,11,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,53,208,113,76,134,55,13,1,146,174,61,12,154,30,40,230,81,28,53,157,234,14,31,207,115,19,79,12,79,209,124,48,50,120,185,213,225,181,166,118,252,165,76,3,239,20,165,99,67,199,252,234,133,121,111,96,201,75,183,16,111,146,139,182,236,134,220,52,87,253,170,21,115,40,210,64,157,52,1,211,207,173,70,128,138,176,68,25,60,30,126,201,250,213,207,98,159,143,6,27,184,78,233,91,62,245,132,224,91,124,59,214,137,212,247,168,14,89,82,229,138,226,210,144,172,37,9,114,13,197,1,200,227,54,144,180,135,60,26,197,148,51,177,78,126,176,99,35,255,99,85,228,189,76,214,248,116,161,184,176,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,10,9,2,3,4,5,6,1,7,8,9,1,4]}"`; @@ -18,6 +18,6 @@ exports[`Vault transactions SetVaultAuthority 1`] = `"{\\"type\\":\\"Buffer\\",\ exports[`Vault transactions UpdateExternalPriceAccount 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,3,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,91,40,146,183,9,11,253,128,231,91,83,123,247,28,233,135,231,63,61,168,21,167,85,108,218,57,31,176,134,164,233,93,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,2,1,1,43,9,2,1,0,0,0,0,0,0,0,71,52,74,64,244,149,107,98,150,13,155,185,184,196,61,57,67,130,233,212,49,232,156,191,78,216,232,55,63,50,139,50,0]}"`; -exports[`Vault transactions WithdrawSharesFromTreasury 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,9,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,171,197,83,63,32,227,187,170,2,133,10,136,67,50,110,186,58,134,128,62,247,67,232,84,214,155,227,247,235,26,44,198,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,8,7,1,2,4,5,3,6,7,2,7,1]}"`; +exports[`Vault transactions WithdrawSharesFromTreasury 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,5,9,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,171,197,83,63,32,227,187,170,2,133,10,136,67,50,110,186,58,134,128,62,247,67,232,84,214,155,227,247,235,26,44,198,36,67,155,135,122,216,114,67,96,234,147,102,249,24,27,9,131,230,78,162,1,172,150,252,236,227,20,100,149,82,2,127,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,8,7,1,2,4,5,3,6,7,9,7,1,0,0,0,0,0,0,0]}"`; -exports[`Vault transactions WithdrawTokenFromSafetyDepositBox 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,4,11,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,171,197,83,63,32,227,187,170,2,133,10,136,67,50,110,186,58,134,128,62,247,67,232,84,214,155,227,247,235,26,44,198,101,93,28,19,203,90,149,199,215,78,46,179,89,233,42,199,254,72,173,157,164,132,109,200,23,214,238,28,156,187,225,122,183,200,146,174,179,202,255,59,237,71,198,14,93,80,130,36,243,239,156,123,105,168,4,229,71,114,217,106,120,80,194,62,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,159,143,6,27,184,78,233,91,62,245,132,224,91,124,59,214,137,212,247,168,14,89,82,229,138,226,210,144,172,37,9,114,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,10,9,2,3,4,5,6,1,7,8,9,2,5,1]}"`; +exports[`Vault transactions WithdrawTokenFromSafetyDepositBox 1`] = `"{\\"type\\":\\"Buffer\\",\\"data\\":[2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,4,11,93,135,29,120,250,13,109,171,35,122,77,213,58,178,208,153,32,156,150,192,153,14,177,253,172,197,7,247,216,61,254,175,138,11,212,145,63,217,9,21,73,57,64,165,30,167,185,240,71,134,94,56,188,28,9,24,167,138,107,48,138,120,248,155,171,197,83,63,32,227,187,170,2,133,10,136,67,50,110,186,58,134,128,62,247,67,232,84,214,155,227,247,235,26,44,198,101,93,28,19,203,90,149,199,215,78,46,179,89,233,42,199,254,72,173,157,164,132,109,200,23,214,238,28,156,187,225,122,183,200,146,174,179,202,255,59,237,71,198,14,93,80,130,36,243,239,156,123,105,168,4,229,71,114,217,106,120,80,194,62,151,236,219,224,54,47,112,197,46,29,246,29,105,42,66,214,178,206,61,219,206,132,245,159,159,124,100,29,253,0,131,115,159,143,6,27,184,78,233,91,62,245,132,224,91,124,59,214,137,212,247,168,14,89,82,229,138,226,210,144,172,37,9,114,112,183,8,167,28,77,246,88,240,228,163,187,131,149,126,124,17,224,201,92,232,236,118,234,121,102,91,60,10,237,249,109,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,6,167,213,23,25,44,92,81,33,140,201,76,61,74,241,127,88,218,238,8,155,161,253,68,227,219,217,138,0,0,0,0,13,186,28,52,26,119,115,94,210,96,195,36,182,190,250,187,9,244,245,52,7,50,47,49,172,28,41,212,233,209,175,49,131,79,219,30,88,36,153,69,200,48,40,136,227,246,197,102,213,141,122,4,186,57,98,62,139,154,145,152,59,13,211,149,1,10,9,2,3,4,5,6,1,7,8,9,9,5,1,0,0,0,0,0,0,0]}"`; diff --git a/test/transactions/vault.test.ts b/test/transactions/vault.test.ts index 9383a64..beb9002 100644 --- a/test/transactions/vault.test.ts +++ b/test/transactions/vault.test.ts @@ -21,7 +21,6 @@ import { SOURCE_PUBKEY, STORE_PUBKEY, TOKEN_ACCOUNT_PUBKEY, - TOKEN_MINT_PUBKEY, TOKEN_STORE_ACCOUNT_PUBKEY, TRANSFER_AUTHORITY_PUBKEY, VAULT_AUTHORITY_PUBKEY, @@ -78,7 +77,6 @@ describe('Vault transactions', () => { const data = new AddTokenToInactiveVault(mockTransaction, { vault: VAULT_PUBKEY, vaultAuthority: VAULT_AUTHORITY_PUBKEY, - tokenMint: TOKEN_MINT_PUBKEY, tokenAccount: TOKEN_ACCOUNT_PUBKEY, tokenStoreAccount: TOKEN_STORE_ACCOUNT_PUBKEY, transferAuthority: TRANSFER_AUTHORITY_PUBKEY,