update script
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
0b3a69631c
commit
7ed6e03f34
|
@ -134,7 +134,7 @@ export class MangoClient {
|
||||||
securityAdmin?: PublicKey,
|
securityAdmin?: PublicKey,
|
||||||
testing?: number,
|
testing?: number,
|
||||||
version?: number,
|
version?: number,
|
||||||
depositLimitQuote?: number,
|
depositLimitQuote?: BN,
|
||||||
): Promise<TransactionSignature> {
|
): Promise<TransactionSignature> {
|
||||||
return await this.program.methods
|
return await this.program.methods
|
||||||
.groupEdit(
|
.groupEdit(
|
||||||
|
@ -143,7 +143,7 @@ export class MangoClient {
|
||||||
securityAdmin ?? null,
|
securityAdmin ?? null,
|
||||||
testing ?? null,
|
testing ?? null,
|
||||||
version ?? null,
|
version ?? null,
|
||||||
depositLimitQuote !== undefined ? new BN(depositLimitQuote) : null,
|
depositLimitQuote !== undefined ? depositLimitQuote : null,
|
||||||
)
|
)
|
||||||
.accounts({
|
.accounts({
|
||||||
group: group.publicKey,
|
group: group.publicKey,
|
||||||
|
|
|
@ -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() {
|
async function registerTokens() {
|
||||||
const result = await buildAdminClient();
|
const result = await buildAdminClient();
|
||||||
const client = result[0];
|
const client = result[0];
|
||||||
|
@ -630,6 +650,7 @@ async function main() {
|
||||||
try {
|
try {
|
||||||
// await createGroup();
|
// await createGroup();
|
||||||
// await changeAdmin();
|
// await changeAdmin();
|
||||||
|
// await setDepositLimit();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue