match latest changes in group creation
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
45fd36642e
commit
0c3efe21a9
|
@ -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 - ' +
|
||||
|
|
|
@ -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<string, Bank>,
|
||||
public serum3MarketsMap: Map<string, Serum3Market>,
|
||||
|
|
|
@ -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,
|
||||
})
|
||||
|
|
|
@ -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": {
|
||||
|
|
Loading…
Reference in New Issue