update script

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-01-24 17:58:23 +01:00
parent 0b3a69631c
commit 7ed6e03f34
2 changed files with 23 additions and 2 deletions

View File

@ -134,7 +134,7 @@ export class MangoClient {
securityAdmin?: PublicKey,
testing?: number,
version?: number,
depositLimitQuote?: number,
depositLimitQuote?: BN,
): Promise<TransactionSignature> {
return await this.program.methods
.groupEdit(
@ -143,7 +143,7 @@ export class MangoClient {
securityAdmin ?? null,
testing ?? null,
version ?? null,
depositLimitQuote !== undefined ? new BN(depositLimitQuote) : null,
depositLimitQuote !== undefined ? depositLimitQuote : null,
)
.accounts({
group: group.publicKey,

View File

@ -161,6 +161,26 @@ async function changeAdmin() {
);
}
async function setDepositLimit() {
const result = await buildAdminClient();
const client = result[0];
const admin = result[1];
const creator = result[2];
const group = await client.getGroupForCreator(creator.publicKey, GROUP_NUM);
console.log(`Setting a deposit limit...`);
await client.groupEdit(
group,
new PublicKey('DSiGNQaKhFCSZbg4HczqCtPAPb1xV51c9GfbfqcVKTB4'),
new PublicKey('DSiGNQaKhFCSZbg4HczqCtPAPb1xV51c9GfbfqcVKTB4'),
new PublicKey('DSiGNQaKhFCSZbg4HczqCtPAPb1xV51c9GfbfqcVKTB4'),
undefined,
undefined,
toNative(100, 6),
);
}
async function registerTokens() {
const result = await buildAdminClient();
const client = result[0];
@ -630,6 +650,7 @@ async function main() {
try {
// await createGroup();
// await changeAdmin();
// await setDepositLimit();
} catch (error) {
console.log(error);
}