From 4eaf550da9ef5831047fe90e3123ddf47a55ac9b Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Fri, 20 Oct 2023 14:28:29 +0200 Subject: [PATCH] gov-ix: add group edit ix creation --- ts/client/scripts/create-gov-ix.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/ts/client/scripts/create-gov-ix.ts b/ts/client/scripts/create-gov-ix.ts index 2f9d87eeb..a20f2db0b 100644 --- a/ts/client/scripts/create-gov-ix.ts +++ b/ts/client/scripts/create-gov-ix.ts @@ -64,6 +64,32 @@ async function buildClient(): Promise { ); } +async function groupEdit(): Promise { + const client = await buildClient(); + const group = await client.getGroup(new PublicKey(GROUP_PK)); + const ix = await client.program.methods + .groupEdit( + null, // admin + null, // fastListingAdmin + null, // securityAdmin + null, // testing + null, // version + null, // depositLimitQuote + null, // feesPayWithMngo + null, // feesMngoBonusRate + null, // feesSwapMangoAccount + 6, // feesMngoTokenIndex + null, // feesExpiryInterval + 5, // allowedFastListingsPerInterval + ) + .accounts({ + group: group.publicKey, + admin: group.admin, + }) + .instruction(); + console.log(serializeInstructionToBase64(ix)); +} + // async function tokenRegister(): Promise { // const client = await buildClient(); @@ -444,6 +470,7 @@ async function idlSetAuthority(): Promise { async function main(): Promise { try { + await groupEdit(); // await tokenRegister(); // await tokenEdit(); // await perpCreate(); @@ -452,7 +479,7 @@ async function main(): Promise { // await ixDisable(); // await createMangoAccount(); // await idlResize(); - await idlSetAuthority(); + // await idlSetAuthority(); } catch (error) { console.log(error); }