diff --git a/ts/client/src/accounts/bank.ts b/ts/client/src/accounts/bank.ts index a5a718d10..c2f08b8a4 100644 --- a/ts/client/src/accounts/bank.ts +++ b/ts/client/src/accounts/bank.ts @@ -169,9 +169,9 @@ export class Bank { '\n cachedIndexedTotalBorrows - ' + this.cachedIndexedTotalBorrows.toNumber() + '\n indexLastUpdated - ' + - new Date(this.indexLastUpdated * 1000) + + new Date(this.indexLastUpdated.toNumber() * 1000) + '\n bankRateLastUpdated - ' + - new Date(this.bankRateLastUpdated * 1000) + + new Date(this.bankRateLastUpdated.toNumber() * 1000) + '\n avgUtilization - ' + this.avgUtilization.toNumber() + '\n adjustmentFactor - ' + diff --git a/ts/client/src/accounts/group.ts b/ts/client/src/accounts/group.ts index abf81b6e4..c854b2681 100644 --- a/ts/client/src/accounts/group.ts +++ b/ts/client/src/accounts/group.ts @@ -12,11 +12,18 @@ import { Serum3Market } from './serum3'; export class Group { static from( publicKey: PublicKey, - obj: { admin: PublicKey; groupNum: number }, + obj: { + creator: PublicKey; + admin: PublicKey; + fastListingAdmin: PublicKey; + groupNum: number; + }, ): Group { return new Group( publicKey, + obj.creator, obj.admin, + obj.fastListingAdmin, obj.groupNum, new Map(), new Map(), @@ -29,7 +36,9 @@ export class Group { constructor( public publicKey: PublicKey, + public creator: PublicKey, public admin: PublicKey, + public fastListingAdmin: PublicKey, public groupNum: number, public banksMap: Map, public serum3MarketsMap: Map, diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index e8eaf41a3..3f6cb5d27 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -82,7 +82,7 @@ export class MangoClient { return await this.program.methods .groupCreate(groupNum, testing ? 1 : 0) .accounts({ - admin: adminPk, + creator: adminPk, payer: adminPk, insuranceMint: insuranceMintPk, }) diff --git a/ts/client/src/mango_v4.ts b/ts/client/src/mango_v4.ts index 34fccc4fd..935568334 100644 --- a/ts/client/src/mango_v4.ts +++ b/ts/client/src/mango_v4.ts @@ -19,7 +19,7 @@ export type MangoV4 = { { "kind": "account", "type": "publicKey", - "path": "admin" + "path": "creator" }, { "kind": "arg", @@ -30,7 +30,7 @@ export type MangoV4 = { } }, { - "name": "admin", + "name": "creator", "isMut": false, "isSigner": true }, @@ -90,6 +90,31 @@ export type MangoV4 = { } ] }, + { + "name": "groupEdit", + "accounts": [ + { + "name": "group", + "isMut": true, + "isSigner": false + }, + { + "name": "admin", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "newAdmin", + "type": "publicKey" + }, + { + "name": "newFastListingAdmin", + "type": "publicKey" + } + ] + }, { "name": "groupClose", "accounts": [ @@ -2795,13 +2820,21 @@ export type MangoV4 = { "kind": "struct", "fields": [ { - "name": "admin", + "name": "creator", "type": "publicKey" }, { "name": "groupNum", "type": "u32" }, + { + "name": "admin", + "type": "publicKey" + }, + { + "name": "fastListingAdmin", + "type": "publicKey" + }, { "name": "padding", "type": { @@ -4890,7 +4923,7 @@ export const IDL: MangoV4 = { { "kind": "account", "type": "publicKey", - "path": "admin" + "path": "creator" }, { "kind": "arg", @@ -4901,7 +4934,7 @@ export const IDL: MangoV4 = { } }, { - "name": "admin", + "name": "creator", "isMut": false, "isSigner": true }, @@ -4961,6 +4994,31 @@ export const IDL: MangoV4 = { } ] }, + { + "name": "groupEdit", + "accounts": [ + { + "name": "group", + "isMut": true, + "isSigner": false + }, + { + "name": "admin", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "newAdmin", + "type": "publicKey" + }, + { + "name": "newFastListingAdmin", + "type": "publicKey" + } + ] + }, { "name": "groupClose", "accounts": [ @@ -7666,13 +7724,21 @@ export const IDL: MangoV4 = { "kind": "struct", "fields": [ { - "name": "admin", + "name": "creator", "type": "publicKey" }, { "name": "groupNum", "type": "u32" }, + { + "name": "admin", + "type": "publicKey" + }, + { + "name": "fastListingAdmin", + "type": "publicKey" + }, { "name": "padding", "type": {