forked from Switcheo/carbon-js-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_perp_pool.ts
29 lines (26 loc) · 895 Bytes
/
update_perp_pool.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import * as BIP39 from "bip39";
import Long from "long";
import { CarbonSDK } from "./_sdk";
import "./_setup";
(async () => {
const mnemonics = process.env.MNEMONICS ?? BIP39.generateMnemonic();
console.log("mnemonics:", mnemonics);
const sdk = await CarbonSDK.instance({
network: CarbonSDK.Network.DevNet,
config: {
tmRpcUrl: process.env.TRPC_ENDPOINT,
},
});
const connectedSDK = await sdk.connectWithMnemonic(mnemonics);
console.log("connected sdk");
const result = await connectedSDK.p.updatePerpetualsPool({
name: 'USD Perp Pool 3',
poolId: new Long(3),
depositDenom: 'cgusd',
shareTokenSymbol: 'testUSD2',
supplyCap: new Long(10000000000000000000000000000),
depositFeeBps: new Long(1000),
withdrawalFeeBps: new Long(1000),
});
console.log(result)
})().catch(console.error).finally(() => process.exit(0));