gov-ix: add group edit ix creation

This commit is contained in:
Christian Kamm 2023-10-20 14:28:29 +02:00
parent b3ec7095ce
commit 4eaf550da9
1 changed files with 28 additions and 1 deletions

View File

@ -64,6 +64,32 @@ async function buildClient(): Promise<MangoClient> {
);
}
async function groupEdit(): Promise<void> {
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<void> {
// const client = await buildClient();
@ -444,6 +470,7 @@ async function idlSetAuthority(): Promise<void> {
async function main(): Promise<void> {
try {
await groupEdit();
// await tokenRegister();
// await tokenEdit();
// await perpCreate();
@ -452,7 +479,7 @@ async function main(): Promise<void> {
// await ixDisable();
// await createMangoAccount();
// await idlResize();
await idlSetAuthority();
// await idlSetAuthority();
} catch (error) {
console.log(error);
}