diff --git a/src/dao.ts b/src/dao.ts index 19f152b..c8e8651 100644 --- a/src/dao.ts +++ b/src/dao.ts @@ -14,6 +14,7 @@ import { ParamChangeProposalInfo, ParamsContractmanagerInfo, ParamsCronInfo, + ParamsDexInfo, ParamsFeeburnerInfo, ParamsFeerefunderInfo, ParamsGlobalfeeInfo, @@ -1496,6 +1497,25 @@ export class DaoMember { ); } + /** + * submitUpdateParamsDexProposal creates proposal which changes soe params of dex module. + */ + + async submitUpdateParamsDexProposal( + chainManagerAddress: string, + title: string, + description: string, + message: ParamsDexInfo, + amount: string, + ): Promise { + return await this.submitSingleChoiceProposal( + title, + description, + [chainManagerWrapper(chainManagerAddress, message)], + amount, + ); + } + /** * submitUpdateParamsContractmanagerProposal creates proposal which changes some params of contractmanager module. */ diff --git a/src/proposal.ts b/src/proposal.ts index daecb70..53d3b1b 100644 --- a/src/proposal.ts +++ b/src/proposal.ts @@ -64,6 +64,13 @@ export type ParamsCronInfo = { limit: number; }; +export type ParamsDexInfo = { + fee_tiers: number[]; + paused: boolean; + max_jits_per_block: number; + good_til_purge_allowance: number; +}; + export type ParamsContractmanagerInfo = { sudo_call_gas_limit: string; }; @@ -498,6 +505,27 @@ export const updateCronParamsProposal = (info: ParamsCronInfo): any => ({ }, }); +export const updateDexParamsProposal = (info: ParamsDexInfo): any => ({ + custom: { + submit_admin_proposal: { + admin_proposal: { + proposal_execute_message: { + message: JSON.stringify({ + '@type': '/neutron.dex.MsgUpdateParams', + authority: ADMIN_MODULE_ADDRESS, + params: { + fee_tiers: info.fee_tiers, + paused: info.paused, + max_jits_per_block: info.max_jits_per_block, + good_til_purge_allowance: info.good_til_purge_allowance, + }, + }), + }, + }, + }, + }, +}); + export const updateContractmanagerParamsProposal = ( info: ParamsContractmanagerInfo, ): any => ({