@marinade.finance/bankrun-utils 2.4.2 → 2.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/testInit.d.ts +36 -3
- package/src/testInit.js +141 -22
- package/src/testInit.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@marinade.finance/bankrun-utils",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "Bankrun library utilities",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
],
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@solana/web3.js": "^1.91.1",
|
|
26
|
-
"@marinade.finance/web3js-common": "2.4.
|
|
26
|
+
"@marinade.finance/web3js-common": "2.4.4",
|
|
27
27
|
"solana-bankrun": "^0.2.0",
|
|
28
28
|
"anchor-bankrun": "^0.3.0",
|
|
29
29
|
"class-transformer": "^0.5.1"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"@solana/web3.js": "^1.91.1",
|
|
33
|
-
"@marinade.finance/web3js-common": "2.4.
|
|
33
|
+
"@marinade.finance/web3js-common": "2.4.4",
|
|
34
34
|
"solana-bankrun": "^0.2.0",
|
|
35
35
|
"anchor-bankrun": "^0.3.0",
|
|
36
36
|
"class-transformer": "^0.5.1"
|
package/src/testInit.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
|
2
|
-
import { AccountInfoBytes, AddedAccount } from 'solana-bankrun';
|
|
2
|
+
import { AccountInfoBytes, AddedAccount, AddedProgram } from 'solana-bankrun';
|
|
3
3
|
import 'reflect-metadata';
|
|
4
4
|
import { BankrunExtendedProvider } from './extendedProvider';
|
|
5
5
|
export declare class JsonAccountData {
|
|
@@ -14,5 +14,38 @@ export declare class JsonAccount {
|
|
|
14
14
|
account: JsonAccountData;
|
|
15
15
|
}
|
|
16
16
|
export declare function toAccountInfoBytes(jsonAccount: JsonAccount): AccountInfoBytes;
|
|
17
|
-
export declare function
|
|
18
|
-
export declare function
|
|
17
|
+
export declare function loadAccountsFromDirectory(directory: string): AddedAccount[];
|
|
18
|
+
export declare function loadAccountFromJson(jsonPath: string): AddedAccount;
|
|
19
|
+
export type ProgramInputData = {
|
|
20
|
+
name: string;
|
|
21
|
+
path?: string;
|
|
22
|
+
pubkey: PublicKey;
|
|
23
|
+
};
|
|
24
|
+
export declare function loadPrograms(programs: ProgramInputData[]): AddedProgram[];
|
|
25
|
+
export declare function calculateRentExemption(dataSize: number): number;
|
|
26
|
+
/**
|
|
27
|
+
* Initializing the test with bankrun.
|
|
28
|
+
*
|
|
29
|
+
* @param accountDirs - expecting directory paths with '.json' files with account data within
|
|
30
|
+
* @param accounts - expecting JSON files provided with account data (one may override the pubkey of the account)
|
|
31
|
+
* @param programs - expecting the program data to be loaded, the program data is taken based on the provided name which has to be aligned with filename with suffix '.so'
|
|
32
|
+
* this came from how the solana-test-program loads the program data, on top of that it's possible to define path
|
|
33
|
+
* and some copy operation is done further.
|
|
34
|
+
* The 'name' and 'pubkey' is required as it's the way how the program is loaded in solana-test-program.
|
|
35
|
+
* The 'pubkey' is the pubkey the program will be registered at.
|
|
36
|
+
* The 'name' is used as target filename that is searched or 'path' copied to.
|
|
37
|
+
* The 'path' is optional and when provided the file is copied to place where the solana-test-program looks for the program data.
|
|
38
|
+
* see: https://github.com/solana-labs/solana/blob/v1.18.14/program-test/src/lib.rs#L428
|
|
39
|
+
*/
|
|
40
|
+
export declare function testInit({ accountDirs, accounts, programs, }: {
|
|
41
|
+
accountDirs?: string[];
|
|
42
|
+
accounts?: {
|
|
43
|
+
pubkey?: PublicKey;
|
|
44
|
+
path: string;
|
|
45
|
+
}[];
|
|
46
|
+
programs?: {
|
|
47
|
+
name: string;
|
|
48
|
+
path?: string;
|
|
49
|
+
pubkey: PublicKey;
|
|
50
|
+
}[];
|
|
51
|
+
}): Promise<BankrunExtendedProvider>;
|
package/src/testInit.js
CHANGED
|
@@ -5,17 +5,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.testInit = exports.
|
|
9
|
+
exports.testInit = exports.calculateRentExemption = exports.loadPrograms = exports.loadAccountFromJson = exports.loadAccountsFromDirectory = exports.toAccountInfoBytes = exports.JsonAccount = exports.JsonAccountData = void 0;
|
|
13
10
|
const web3_js_1 = require("@solana/web3.js");
|
|
14
11
|
const solana_bankrun_1 = require("solana-bankrun");
|
|
15
12
|
require("reflect-metadata");
|
|
16
13
|
const class_transformer_1 = require("class-transformer");
|
|
17
14
|
const fs_1 = require("fs");
|
|
18
|
-
const path_1 =
|
|
15
|
+
const path_1 = require("path");
|
|
19
16
|
const extendedProvider_1 = require("./extendedProvider");
|
|
20
17
|
// note: VsCode error:
|
|
21
18
|
// https://github.com/microsoft/TypeScript/issues/52396#issuecomment-1409152884
|
|
@@ -64,30 +61,152 @@ function toAccountInfoBytes(jsonAccount) {
|
|
|
64
61
|
};
|
|
65
62
|
}
|
|
66
63
|
exports.toAccountInfoBytes = toAccountInfoBytes;
|
|
67
|
-
function
|
|
64
|
+
function loadAccountsFromDirectory(directory) {
|
|
68
65
|
const accounts = [];
|
|
69
|
-
for (const jsonFile of (0, fs_1.readdirSync)(directory
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
|
|
66
|
+
for (const jsonFile of (0, fs_1.readdirSync)(directory, {
|
|
67
|
+
recursive: true,
|
|
68
|
+
encoding: null,
|
|
69
|
+
}).filter(f => f.endsWith('.json'))) {
|
|
70
|
+
const jsonPath = (0, path_1.join)(directory, jsonFile);
|
|
71
|
+
const loadedAccount = loadAccountFromJson(jsonPath);
|
|
72
|
+
accounts.push(loadedAccount);
|
|
73
|
+
}
|
|
74
|
+
return accounts;
|
|
75
|
+
}
|
|
76
|
+
exports.loadAccountsFromDirectory = loadAccountsFromDirectory;
|
|
77
|
+
function loadAccountFromJson(jsonPath) {
|
|
78
|
+
const fileBuffer = (0, fs_1.readFileSync)(jsonPath);
|
|
79
|
+
const parsedData = JSON.parse(fileBuffer.toString());
|
|
80
|
+
const jsonAccount = (0, class_transformer_1.plainToInstance)(JsonAccount, parsedData);
|
|
81
|
+
return {
|
|
82
|
+
address: jsonAccount.pubkey,
|
|
83
|
+
info: toAccountInfoBytes(jsonAccount),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
exports.loadAccountFromJson = loadAccountFromJson;
|
|
87
|
+
function loadPrograms(programs) {
|
|
88
|
+
const addedPrograms = [];
|
|
89
|
+
let hookDeleteDir = false;
|
|
90
|
+
const hookDeleteProgramNames = [];
|
|
91
|
+
// programs that should be loaded just by name based on the rules of the solana-test-program
|
|
92
|
+
programs
|
|
93
|
+
.filter(p => p.path === undefined)
|
|
94
|
+
.forEach(p => {
|
|
95
|
+
addedPrograms.push({
|
|
96
|
+
name: p.name,
|
|
97
|
+
programId: p.pubkey,
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
// programs that provided the path would be copied to the fixtures directory where
|
|
101
|
+
// the solana-test-program looks for the program data
|
|
102
|
+
// see: https://github.com/solana-labs/solana/blob/v1.18.14/program-test/src/lib.rs#L428
|
|
103
|
+
const fixturesPath = (0, path_1.join)(process.cwd(), 'tests', 'fixtures');
|
|
104
|
+
if (!(0, fs_1.existsSync)(fixturesPath)) {
|
|
105
|
+
(0, fs_1.mkdirSync)(fixturesPath, { recursive: true });
|
|
106
|
+
hookDeleteDir = true;
|
|
107
|
+
}
|
|
108
|
+
for (const { pubkey, path, name } of programs.filter(p => p.path !== undefined)) {
|
|
109
|
+
const programPath = path;
|
|
110
|
+
if (!(0, fs_1.existsSync)(programPath)) {
|
|
111
|
+
console.error(`bankrun startup: program ${pubkey.toBase58()} at path ${programPath} does not exist cannot be loaded`);
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
const fixturesProgramSoPath = (0, path_1.join)(fixturesPath, `${name}.so`);
|
|
115
|
+
if ((0, fs_1.existsSync)(fixturesProgramSoPath)) {
|
|
116
|
+
console.log(`bankrun startup: skipping to upload the program ${pubkey.toBase58()} from path ${path} to ${fixturesProgramSoPath} as it already exists`);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
console.debug('bankrun startup: copying program', fixturesProgramSoPath, 'to', fixturesProgramSoPath);
|
|
120
|
+
(0, fs_1.cpSync)(programPath, fixturesProgramSoPath);
|
|
121
|
+
hookDeleteProgramNames.push(fixturesProgramSoPath);
|
|
122
|
+
}
|
|
123
|
+
addedPrograms.push({
|
|
124
|
+
name,
|
|
125
|
+
programId: pubkey,
|
|
126
|
+
});
|
|
75
127
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
128
|
+
// TODO: exit hooks somehow does not work in jest
|
|
129
|
+
registerCleanup(() => {
|
|
130
|
+
hookDeleteProgramNames.forEach(p => {
|
|
131
|
+
console.log('Deleting program file', p);
|
|
132
|
+
(0, fs_1.rmSync)(p);
|
|
133
|
+
});
|
|
134
|
+
if (hookDeleteDir) {
|
|
135
|
+
console.log('Deleting fixtures directory', fixturesPath);
|
|
136
|
+
(0, fs_1.rmSync)(fixturesPath, { recursive: true, force: true });
|
|
137
|
+
}
|
|
138
|
+
hookDeleteProgramNames.length = 0;
|
|
139
|
+
hookDeleteDir = false;
|
|
81
140
|
});
|
|
141
|
+
return addedPrograms;
|
|
142
|
+
}
|
|
143
|
+
exports.loadPrograms = loadPrograms;
|
|
144
|
+
function registerCleanup(
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
|
+
exitHandler) {
|
|
147
|
+
// do something when app is closing
|
|
148
|
+
process.on('exit', exitHandler.bind(null, { cleanup: true }));
|
|
149
|
+
process.on('beforeExit', exitHandler.bind(null, { cleanup: true }));
|
|
150
|
+
process.on('disconnect', exitHandler.bind(null, { cleanup: true }));
|
|
151
|
+
process.on('terminate', exitHandler.bind(null, { cleanup: true }));
|
|
152
|
+
// catches ctrl+c event
|
|
153
|
+
process.on('SIGINT', exitHandler.bind(null, { exit: true }));
|
|
154
|
+
process.on('SIGQUIT', exitHandler.bind(null, { exit: true }));
|
|
155
|
+
// catches "kill pid" (for example: nodemon restart)
|
|
156
|
+
process.on('SIGUSR1', exitHandler.bind(null, { exit: true }));
|
|
157
|
+
process.on('SIGUSR2', exitHandler.bind(null, { exit: true }));
|
|
158
|
+
// catches uncaught exceptions
|
|
159
|
+
process.on('uncaughtException', exitHandler.bind(null, { exit: true }));
|
|
82
160
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
161
|
+
/*
|
|
162
|
+
* This is a bit of assumption. The base data is taken from `solana rent` calls.
|
|
163
|
+
* Cannot find the real code of the getMinimumBalanceForRentExemption function.
|
|
164
|
+
*
|
|
165
|
+
* solana rent -um 0
|
|
166
|
+
* > Rent-exempt minimum: 0.00089088 SOL
|
|
167
|
+
* solana rent -um 1
|
|
168
|
+
* > Rent-exempt minimum: 0.00089784 SOL
|
|
169
|
+
*/
|
|
170
|
+
function calculateRentExemption(dataSize) {
|
|
171
|
+
const basePaymentLamports = 890880;
|
|
172
|
+
const perByteLamports = 6960;
|
|
173
|
+
return basePaymentLamports + perByteLamports * dataSize;
|
|
174
|
+
}
|
|
175
|
+
exports.calculateRentExemption = calculateRentExemption;
|
|
176
|
+
/**
|
|
177
|
+
* Initializing the test with bankrun.
|
|
178
|
+
*
|
|
179
|
+
* @param accountDirs - expecting directory paths with '.json' files with account data within
|
|
180
|
+
* @param accounts - expecting JSON files provided with account data (one may override the pubkey of the account)
|
|
181
|
+
* @param programs - expecting the program data to be loaded, the program data is taken based on the provided name which has to be aligned with filename with suffix '.so'
|
|
182
|
+
* this came from how the solana-test-program loads the program data, on top of that it's possible to define path
|
|
183
|
+
* and some copy operation is done further.
|
|
184
|
+
* The 'name' and 'pubkey' is required as it's the way how the program is loaded in solana-test-program.
|
|
185
|
+
* The 'pubkey' is the pubkey the program will be registered at.
|
|
186
|
+
* The 'name' is used as target filename that is searched or 'path' copied to.
|
|
187
|
+
* The 'path' is optional and when provided the file is copied to place where the solana-test-program looks for the program data.
|
|
188
|
+
* see: https://github.com/solana-labs/solana/blob/v1.18.14/program-test/src/lib.rs#L428
|
|
189
|
+
*/
|
|
190
|
+
async function testInit({ accountDirs, accounts, programs, }) {
|
|
86
191
|
let additionalAccounts = [];
|
|
192
|
+
let additionalPrograms = [];
|
|
87
193
|
if (accountDirs !== undefined) {
|
|
88
|
-
additionalAccounts = accountDirs.flatMap(
|
|
194
|
+
additionalAccounts = accountDirs.flatMap(loadAccountsFromDirectory);
|
|
195
|
+
}
|
|
196
|
+
if (accounts !== undefined) {
|
|
197
|
+
additionalAccounts.push(...accounts.flatMap(acc => {
|
|
198
|
+
const accountData = loadAccountFromJson(acc.path);
|
|
199
|
+
if (acc.pubkey !== undefined) {
|
|
200
|
+
// rewriting the address when passed in
|
|
201
|
+
accountData.address = acc.pubkey;
|
|
202
|
+
}
|
|
203
|
+
return accountData;
|
|
204
|
+
}));
|
|
205
|
+
}
|
|
206
|
+
if (programs !== undefined) {
|
|
207
|
+
additionalPrograms = loadPrograms(programs);
|
|
89
208
|
}
|
|
90
|
-
const context = await (0, solana_bankrun_1.startAnchor)('./',
|
|
209
|
+
const context = await (0, solana_bankrun_1.startAnchor)('./', additionalPrograms, additionalAccounts);
|
|
91
210
|
return new extendedProvider_1.BankrunExtendedProvider(context);
|
|
92
211
|
}
|
|
93
212
|
exports.testInit = testInit;
|
package/src/testInit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testInit.js","sourceRoot":"","sources":["../../../../../packages/lib/bankrun-utils/src/testInit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testInit.js","sourceRoot":"","sources":["../../../../../packages/lib/bankrun-utils/src/testInit.ts"],"names":[],"mappings":";;;;;;;;;AAAA,6CAA2C;AAC3C,mDAKuB;AACvB,4BAAyB;AACzB,yDAK0B;AAC1B,2BAOW;AACX,+BAA2B;AAC3B,yDAA4D;AAE5D,sBAAsB;AACtB,qFAAqF;AACrF,gIAAgI;AAChI,MAAa,eAAe;CAmB3B;AAnBD,0CAmBC;AAhBC;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;iDACvB;AAGjB;IADC,IAAA,0BAAM,GAAE;6CACM;AAIf;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC;8CAC9B;AAIjB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;mDACrB;AAIpB;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,6BAAS,EAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;kDACtB;AAEpB,MAAa,WAAW;CAQvB;AARD,kCAQC;AALC;IAFC,IAAA,0BAAM,GAAE;IACR,IAAA,6BAAS,EAAC,CAAC,EAAE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