Skip to content

Commit 8b075ec

Browse files
committed
chore(script): basepool & metapool setup
1 parent 8e86d17 commit 8b075ec

1 file changed

Lines changed: 34 additions & 1 deletion

File tree

scripts/init-testnet.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,40 @@ function constructAmmSetup(api: ApiPromise) {
224224
];
225225
}).reduce((x, y) => { return x.concat(y);});
226226

227-
return basicPoolSetup;
227+
const basePoolSetup = api.tx.zenlinkStableAmm.createBasePool(
228+
[
229+
{ ForeignAsset: 3 }, // LKSM
230+
{ ForeignAsset: 4 }, // VKSM
231+
{ ForeignAsset: 5 }, // SKSM
232+
],
233+
[12, 12, 12], // decimals
234+
200, // amplification coefficient
235+
100_000_000, // max fee 1%
236+
0, // no admin fee
237+
Buffer.concat([
238+
Buffer.from("modl"), // 4 bytes
239+
Buffer.from("mod/trsy"), // 8 bytes
240+
], 32), // treasury
241+
"LKSM+VKSM+SKSM" // currency symbol
242+
);
243+
244+
const metaPoolSetup = api.tx.zenlinkStableAmm.createMetaPool(
245+
[
246+
{ StableLpToken: 0 }, // LKSM+VKSM+SKSM
247+
{ Token: "KSM" },
248+
],
249+
[12, 12], // decimals
250+
200, // amplification coefficient
251+
100_000_000, // max fee 1%
252+
0, // no admin fee
253+
Buffer.concat([
254+
Buffer.from("modl"), // 4 bytes
255+
Buffer.from("mod/trsy"), // 8 bytes
256+
], 32), // treasury
257+
"(LKSM+VKSM+SKSM)+KSM" // currency symbol
258+
);
259+
260+
return basicPoolSetup.concat([basePoolSetup, metaPoolSetup]);
228261
}
229262

230263
function constructForeignAssetSetup(api: ApiPromise) {

0 commit comments

Comments
 (0)