From a7654f43a1b8089c02d1c2c942d8d70d585545be Mon Sep 17 00:00:00 2001 From: microwavedcola1 Date: Tue, 2 Aug 2022 11:28:39 +0200 Subject: [PATCH] update idl, and fix tsc errors Signed-off-by: microwavedcola1 --- ts/client/src/accounts/bank.ts | 4 -- ts/client/src/client.ts | 2 +- ts/client/src/mango_v4.ts | 96 +++++++--------------------------- 3 files changed, 19 insertions(+), 83 deletions(-) diff --git a/ts/client/src/accounts/bank.ts b/ts/client/src/accounts/bank.ts index 869b4a858..ea4298929 100644 --- a/ts/client/src/accounts/bank.ts +++ b/ts/client/src/accounts/bank.ts @@ -283,11 +283,7 @@ export class MintInfo { banks: PublicKey[]; vaults: PublicKey[]; oracle: PublicKey; - addressLookupTable: PublicKey; tokenIndex: number; - addressLookupTableBankIndex: Number; - addressLookupTableOracleIndex: Number; - reserved: unknown; registrationTime: BN; }, ) { diff --git a/ts/client/src/client.ts b/ts/client/src/client.ts index c91dcec02..83fbcec76 100644 --- a/ts/client/src/client.ts +++ b/ts/client/src/client.ts @@ -166,7 +166,7 @@ export class MangoClient { return await this.program.methods .tokenRegister( tokenIndex, - new BN(0), + 0, name, { confFilter: { diff --git a/ts/client/src/mango_v4.ts b/ts/client/src/mango_v4.ts index 5ed37e8da..9e706f67f 100644 --- a/ts/client/src/mango_v4.ts +++ b/ts/client/src/mango_v4.ts @@ -191,7 +191,7 @@ export type MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -220,7 +220,7 @@ export type MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -284,7 +284,7 @@ export type MangoV4 = { }, { "name": "bankNum", - "type": "u64" + "type": "u32" }, { "name": "name", @@ -468,7 +468,7 @@ export type MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -497,7 +497,7 @@ export type MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -556,7 +556,7 @@ export type MangoV4 = { }, { "name": "bankNum", - "type": "u64" + "type": "u32" } ] }, @@ -653,7 +653,7 @@ export type MangoV4 = { }, { "kind": "arg", - "type": "u8", + "type": "u32", "path": "account_num" } ] @@ -678,7 +678,7 @@ export type MangoV4 = { "args": [ { "name": "accountNum", - "type": "u8" + "type": "u32" }, { "name": "accountSize", @@ -2705,18 +2705,9 @@ export type MangoV4 = { "name": "mintDecimals", "type": "u8" }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 4 - ] - } - }, { "name": "bankNum", - "type": "u64" + "type": "u32" }, { "name": "reserved", @@ -2987,27 +2978,6 @@ export type MangoV4 = { "name": "oracle", "type": "publicKey" }, - { - "name": "addressLookupTable", - "type": "publicKey" - }, - { - "name": "addressLookupTableBankIndex", - "type": "u8" - }, - { - "name": "addressLookupTableOracleIndex", - "type": "u8" - }, - { - "name": "padding2", - "type": { - "array": [ - "u8", - 6 - ] - } - }, { "name": "registrationTime", "type": "i64" @@ -5087,7 +5057,7 @@ export const IDL: MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -5116,7 +5086,7 @@ export const IDL: MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -5180,7 +5150,7 @@ export const IDL: MangoV4 = { }, { "name": "bankNum", - "type": "u64" + "type": "u32" }, { "name": "name", @@ -5364,7 +5334,7 @@ export const IDL: MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -5393,7 +5363,7 @@ export const IDL: MangoV4 = { }, { "kind": "arg", - "type": "u64", + "type": "u32", "path": "bank_num" } ] @@ -5452,7 +5422,7 @@ export const IDL: MangoV4 = { }, { "name": "bankNum", - "type": "u64" + "type": "u32" } ] }, @@ -5549,7 +5519,7 @@ export const IDL: MangoV4 = { }, { "kind": "arg", - "type": "u8", + "type": "u32", "path": "account_num" } ] @@ -5574,7 +5544,7 @@ export const IDL: MangoV4 = { "args": [ { "name": "accountNum", - "type": "u8" + "type": "u32" }, { "name": "accountSize", @@ -7601,18 +7571,9 @@ export const IDL: MangoV4 = { "name": "mintDecimals", "type": "u8" }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 4 - ] - } - }, { "name": "bankNum", - "type": "u64" + "type": "u32" }, { "name": "reserved", @@ -7883,27 +7844,6 @@ export const IDL: MangoV4 = { "name": "oracle", "type": "publicKey" }, - { - "name": "addressLookupTable", - "type": "publicKey" - }, - { - "name": "addressLookupTableBankIndex", - "type": "u8" - }, - { - "name": "addressLookupTableOracleIndex", - "type": "u8" - }, - { - "name": "padding2", - "type": { - "array": [ - "u8", - 6 - ] - } - }, { "name": "registrationTime", "type": "i64"