From 2afdc21cb3d58d5aa894e9e96c8e5b756d95cbeb Mon Sep 17 00:00:00 2001 From: Julian Compagni Portis Date: Thu, 9 Jan 2025 15:03:38 -0700 Subject: [PATCH] Update dex params --- protos/neutron-src | 2 +- scripts/set-versions.sh | 2 +- src/neutron/dex/params.ts | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/protos/neutron-src b/protos/neutron-src index 813221c..fd65529 160000 --- a/protos/neutron-src +++ b/protos/neutron-src @@ -1 +1 @@ -Subproject commit 813221cc8d48237e17170558dbf41fb776809522 +Subproject commit fd655299cadfd9f94a7f5772e8c688886cec37fd diff --git a/scripts/set-versions.sh b/scripts/set-versions.sh index d2efbe4..3137f11 100755 --- a/scripts/set-versions.sh +++ b/scripts/set-versions.sh @@ -18,7 +18,7 @@ readonly BLOCK_SDK_REV="v2.1.5" readonly COSMOS_SDK_REV="v0.50.9-neutron" readonly FEEMARKET_REV="v1.1.1" readonly IBC_GO_REV="v8.5.1" -readonly NEUTRON_REV="main" +readonly NEUTRON_REV="fd655299cadfd9f94a7f5772e8c688886cec37fd" readonly SLINKY_REV="v1.0.12" readonly WASMD_REV="v0.51.2-neutron" readonly ICS_REV="v5.1.1" diff --git a/src/neutron/dex/params.ts b/src/neutron/dex/params.ts index f19b045..217cbf4 100644 --- a/src/neutron/dex/params.ts +++ b/src/neutron/dex/params.ts @@ -9,6 +9,11 @@ export interface Params { paused: boolean; maxJitsPerBlock: bigint; goodTilPurgeAllowance: bigint; + /** + * Whitelisted_lps have special LP privileges; + * currently, the only such privilege is depositing outside of the allowed fee_tiers. + */ + whitelistedLps: string[]; } function createBaseParams(): Params { return { @@ -16,6 +21,7 @@ function createBaseParams(): Params { paused: false, maxJitsPerBlock: BigInt(0), goodTilPurgeAllowance: BigInt(0), + whitelistedLps: [], }; } export const Params = { @@ -35,6 +41,9 @@ export const Params = { if (message.goodTilPurgeAllowance !== BigInt(0)) { writer.uint32(40).uint64(message.goodTilPurgeAllowance); } + for (const v of message.whitelistedLps) { + writer.uint32(50).string(v!); + } return writer; }, decode(input: BinaryReader | Uint8Array, length?: number): Params { @@ -63,6 +72,9 @@ export const Params = { case 5: message.goodTilPurgeAllowance = reader.uint64(); break; + case 6: + message.whitelistedLps.push(reader.string()); + break; default: reader.skipType(tag & 7); break; @@ -77,6 +89,8 @@ export const Params = { if (isSet(object.maxJitsPerBlock)) obj.maxJitsPerBlock = BigInt(object.maxJitsPerBlock.toString()); if (isSet(object.goodTilPurgeAllowance)) obj.goodTilPurgeAllowance = BigInt(object.goodTilPurgeAllowance.toString()); + if (Array.isArray(object?.whitelistedLps)) + obj.whitelistedLps = object.whitelistedLps.map((e: any) => String(e)); return obj; }, toJSON(message: Params): JsonSafe { @@ -91,6 +105,11 @@ export const Params = { (obj.maxJitsPerBlock = (message.maxJitsPerBlock || BigInt(0)).toString()); message.goodTilPurgeAllowance !== undefined && (obj.goodTilPurgeAllowance = (message.goodTilPurgeAllowance || BigInt(0)).toString()); + if (message.whitelistedLps) { + obj.whitelistedLps = message.whitelistedLps.map((e) => e); + } else { + obj.whitelistedLps = []; + } return obj; }, fromPartial, I>>(object: I): Params { @@ -103,6 +122,7 @@ export const Params = { if (object.goodTilPurgeAllowance !== undefined && object.goodTilPurgeAllowance !== null) { message.goodTilPurgeAllowance = BigInt(object.goodTilPurgeAllowance.toString()); } + message.whitelistedLps = object.whitelistedLps?.map((e) => e) || []; return message; }, };