From 687e1a59113f2a97e5487a5e05ae9ca5fa2e49d3 Mon Sep 17 00:00:00 2001 From: Sergey Ratiashvili Date: Tue, 3 Sep 2024 13:14:40 +0200 Subject: [PATCH 1/2] feat: jsr --- ts-client/LICENSE | 177 ++++++++++++++++++ ts-client/jsr.json | 5 + .../dropAstroportExchangeHandler.d.ts | 12 ++ .../dropAstroportExchangeHandler.js | 12 +- .../lib/contractLib/dropAutoWithdrawer.d.ts | 9 + .../lib/contractLib/dropAutoWithdrawer.js | 9 +- ts-client/lib/contractLib/dropCore.d.ts | 36 ++++ ts-client/lib/contractLib/dropCore.js | 36 ++-- ts-client/lib/contractLib/dropFactory.d.ts | 18 ++ ts-client/lib/contractLib/dropFactory.js | 18 +- ts-client/lib/contractLib/dropHookTester.d.ts | 18 ++ ts-client/lib/contractLib/dropHookTester.js | 18 +- .../lib/contractLib/dropPriceProvider.d.ts | 9 + .../lib/contractLib/dropPriceProvider.js | 9 +- .../lib/contractLib/dropProposalVotesPoc.d.ts | 9 + .../lib/contractLib/dropProposalVotesPoc.js | 9 +- .../contractLib/dropProviderProposalsPoc.d.ts | 6 + .../contractLib/dropProviderProposalsPoc.js | 6 +- ts-client/lib/contractLib/dropPump.d.ts | 15 ++ ts-client/lib/contractLib/dropPump.js | 15 +- ts-client/lib/contractLib/dropPuppeteer.d.ts | 45 +++++ ts-client/lib/contractLib/dropPuppeteer.js | 45 +++-- .../lib/contractLib/dropRewardsManager.d.ts | 18 ++ .../lib/contractLib/dropRewardsManager.js | 18 +- ts-client/lib/contractLib/dropSplitter.d.ts | 9 + ts-client/lib/contractLib/dropSplitter.js | 9 +- ts-client/lib/contractLib/dropStaker.d.ts | 15 ++ ts-client/lib/contractLib/dropStaker.js | 15 +- ts-client/lib/contractLib/dropStrategy.d.ts | 6 + ts-client/lib/contractLib/dropStrategy.js | 6 +- ts-client/lib/contractLib/dropToken.d.ts | 12 ++ ts-client/lib/contractLib/dropToken.js | 12 +- .../lib/contractLib/dropValidatorsSet.d.ts | 15 ++ .../lib/contractLib/dropValidatorsSet.js | 15 +- .../lib/contractLib/dropValidatorsStats.d.ts | 3 + .../lib/contractLib/dropValidatorsStats.js | 3 +- .../contractLib/dropWithdrawalManager.d.ts | 15 ++ .../lib/contractLib/dropWithdrawalManager.js | 15 +- .../contractLib/dropWithdrawalVoucher.d.ts | 30 +++ .../lib/contractLib/dropWithdrawalVoucher.js | 30 ++- ts-client/package.json | 7 +- .../dropAstroportExchangeHandler.ts | 14 +- .../src/contractLib/dropAutoWithdrawer.ts | 11 +- ts-client/src/contractLib/dropCore.ts | 38 ++-- ts-client/src/contractLib/dropDistribution.ts | 2 +- ts-client/src/contractLib/dropFactory.ts | 20 +- ts-client/src/contractLib/dropHookTester.ts | 20 +- .../src/contractLib/dropPriceProvider.ts | 11 +- .../src/contractLib/dropProposalVotesPoc.ts | 11 +- .../contractLib/dropProviderProposalsPoc.ts | 8 +- ts-client/src/contractLib/dropPump.ts | 17 +- ts-client/src/contractLib/dropPuppeteer.ts | 47 +++-- .../src/contractLib/dropRewardsManager.ts | 20 +- ts-client/src/contractLib/dropSplitter.ts | 11 +- ts-client/src/contractLib/dropStaker.ts | 17 +- ts-client/src/contractLib/dropStrategy.ts | 8 +- ts-client/src/contractLib/dropToken.ts | 14 +- .../src/contractLib/dropValidatorsSet.ts | 17 +- .../src/contractLib/dropValidatorsStats.ts | 5 +- .../src/contractLib/dropWithdrawalManager.ts | 17 +- .../src/contractLib/dropWithdrawalVoucher.ts | 32 ++-- ts-client/yarn.lock | 8 +- yarn.lock | 4 + 63 files changed, 914 insertions(+), 227 deletions(-) create mode 100644 ts-client/LICENSE create mode 100644 ts-client/jsr.json create mode 100644 yarn.lock diff --git a/ts-client/LICENSE b/ts-client/LICENSE new file mode 100644 index 00000000..4947287f --- /dev/null +++ b/ts-client/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/ts-client/jsr.json b/ts-client/jsr.json new file mode 100644 index 00000000..aae16c4b --- /dev/null +++ b/ts-client/jsr.json @@ -0,0 +1,5 @@ +{ + "name": "@drop/contracts", + "version": "1.0.1", + "exports": "./src/contractLib/index.ts" +} diff --git a/ts-client/lib/contractLib/dropAstroportExchangeHandler.d.ts b/ts-client/lib/contractLib/dropAstroportExchangeHandler.d.ts index 8710be8e..87c16d03 100644 --- a/ts-client/lib/contractLib/dropAstroportExchangeHandler.d.ts +++ b/ts-client/lib/contractLib/dropAstroportExchangeHandler.d.ts @@ -179,7 +179,19 @@ export declare class Client { queryConfig: () => Promise; queryOwnership: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateSwapOperations: (sender: string, args: UpdateSwapOperationsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateSwapOperationsMsg: (args: UpdateSwapOperationsArgs) => { + update_swap_operations: UpdateSwapOperationsArgs; + }; exchange: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + exchangeMsg: () => { + exchange: {}; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropAstroportExchangeHandler.js b/ts-client/lib/contractLib/dropAstroportExchangeHandler.js index ec0a8f42..fae9a57d 100644 --- a/ts-client/lib/contractLib/dropAstroportExchangeHandler.js +++ b/ts-client/lib/contractLib/dropAstroportExchangeHandler.js @@ -36,25 +36,29 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateSwapOperations = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_swap_operations: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateSwapOperationsMsg(args), fee || "auto", memo, funds); }; + updateSwapOperationsMsg = (args) => { return { update_swap_operations: args }; }; exchange = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { exchange: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.exchangeMsg(), fee || "auto", memo, funds); }; + exchangeMsg = () => { return { exchange: {} }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropAutoWithdrawer.d.ts b/ts-client/lib/contractLib/dropAutoWithdrawer.d.ts index 866a36b3..d2faa54c 100644 --- a/ts-client/lib/contractLib/dropAutoWithdrawer.d.ts +++ b/ts-client/lib/contractLib/dropAutoWithdrawer.d.ts @@ -96,6 +96,15 @@ export declare class Client { queryBondings: (args: BondingsArgs) => Promise; queryConfig: () => Promise; bond: (sender: string, args: BondArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + bondMsg: (args: BondArgs) => { + bond: BondArgs; + }; unbond: (sender: string, args: UnbondArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + unbondMsg: (args: UnbondArgs) => { + unbond: UnbondArgs; + }; withdraw: (sender: string, args: WithdrawArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + withdrawMsg: (args: WithdrawArgs) => { + withdraw: WithdrawArgs; + }; } diff --git a/ts-client/lib/contractLib/dropAutoWithdrawer.js b/ts-client/lib/contractLib/dropAutoWithdrawer.js index b171a937..41450c5d 100644 --- a/ts-client/lib/contractLib/dropAutoWithdrawer.js +++ b/ts-client/lib/contractLib/dropAutoWithdrawer.js @@ -36,19 +36,22 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { bond: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.bondMsg(args), fee || "auto", memo, funds); }; + bondMsg = (args) => { return { bond: args }; }; unbond = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unbond: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unbondMsg(args), fee || "auto", memo, funds); }; + unbondMsg = (args) => { return { unbond: args }; }; withdraw = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { withdraw: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.withdrawMsg(args), fee || "auto", memo, funds); }; + withdrawMsg = (args) => { return { withdraw: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropCore.d.ts b/ts-client/lib/contractLib/dropCore.d.ts index be6a2e87..228328e8 100644 --- a/ts-client/lib/contractLib/dropCore.d.ts +++ b/ts-client/lib/contractLib/dropCore.d.ts @@ -500,15 +500,51 @@ export declare class Client { queryFailedBatch: () => Promise; queryPauseInfo: () => Promise; bond: (sender: string, args: BondArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + bondMsg: (args: BondArgs) => { + bond: BondArgs; + }; unbond: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + unbondMsg: () => { + unbond: {}; + }; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateWithdrawnAmount: (sender: string, args: UpdateWithdrawnAmountArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateWithdrawnAmountMsg: (args: UpdateWithdrawnAmountArgs) => { + update_withdrawn_amount: UpdateWithdrawnAmountArgs; + }; tick: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + tickMsg: () => { + tick: {}; + }; puppeteerHook: (sender: string, args: PuppeteerHookArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + puppeteerHookMsg: (args: PuppeteerHookArgs) => { + puppeteer_hook: PuppeteerHookArgs; + }; stakerHook: (sender: string, args: StakerHookArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + stakerHookMsg: (args: StakerHookArgs) => { + staker_hook: StakerHookArgs; + }; resetBondedAmount: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + resetBondedAmountMsg: () => { + reset_bonded_amount: {}; + }; processEmergencyBatch: (sender: string, args: ProcessEmergencyBatchArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + processEmergencyBatchMsg: (args: ProcessEmergencyBatchArgs) => { + process_emergency_batch: ProcessEmergencyBatchArgs; + }; pause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + pauseMsg: () => { + pause: {}; + }; unpause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + unpauseMsg: () => { + unpause: {}; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropCore.js b/ts-client/lib/contractLib/dropCore.js index a4ebc942..b7b13cac 100644 --- a/ts-client/lib/contractLib/dropCore.js +++ b/ts-client/lib/contractLib/dropCore.js @@ -75,73 +75,85 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { bond: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.bondMsg(args), fee || "auto", memo, funds); }; + bondMsg = (args) => { return { bond: args }; }; unbond = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unbond: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unbondMsg(), fee || "auto", memo, funds); }; + unbondMsg = () => { return { unbond: {} }; }; updateConfig = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateWithdrawnAmount = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_withdrawn_amount: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateWithdrawnAmountMsg(args), fee || "auto", memo, funds); }; + updateWithdrawnAmountMsg = (args) => { return { update_withdrawn_amount: args }; }; tick = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { tick: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.tickMsg(), fee || "auto", memo, funds); }; + tickMsg = () => { return { tick: {} }; }; puppeteerHook = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { puppeteer_hook: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.puppeteerHookMsg(args), fee || "auto", memo, funds); }; + puppeteerHookMsg = (args) => { return { puppeteer_hook: args }; }; stakerHook = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { staker_hook: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.stakerHookMsg(args), fee || "auto", memo, funds); }; + stakerHookMsg = (args) => { return { staker_hook: args }; }; resetBondedAmount = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { reset_bonded_amount: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.resetBondedAmountMsg(), fee || "auto", memo, funds); }; + resetBondedAmountMsg = () => { return { reset_bonded_amount: {} }; }; processEmergencyBatch = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { process_emergency_batch: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.processEmergencyBatchMsg(args), fee || "auto", memo, funds); }; + processEmergencyBatchMsg = (args) => { return { process_emergency_batch: args }; }; pause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); }; + pauseMsg = () => { return { pause: {} }; }; unpause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); }; + unpauseMsg = () => { return { unpause: {} }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropFactory.d.ts b/ts-client/lib/contractLib/dropFactory.d.ts index 183eb2e7..8107ba59 100644 --- a/ts-client/lib/contractLib/dropFactory.d.ts +++ b/ts-client/lib/contractLib/dropFactory.d.ts @@ -1198,9 +1198,27 @@ export declare class Client { queryState: () => Promise; queryPauseInfo: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; proxy: (sender: string, args: ProxyArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + proxyMsg: (args: ProxyArgs) => { + proxy: ProxyArgs; + }; adminExecute: (sender: string, args: AdminExecuteArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + adminExecuteMsg: (args: AdminExecuteArgs) => { + admin_execute: AdminExecuteArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; pause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + pauseMsg: () => { + pause: {}; + }; unpause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + unpauseMsg: () => { + unpause: {}; + }; } diff --git a/ts-client/lib/contractLib/dropFactory.js b/ts-client/lib/contractLib/dropFactory.js index e233dc10..7dd2213b 100644 --- a/ts-client/lib/contractLib/dropFactory.js +++ b/ts-client/lib/contractLib/dropFactory.js @@ -36,37 +36,43 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; proxy = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { proxy: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.proxyMsg(args), fee || "auto", memo, funds); }; + proxyMsg = (args) => { return { proxy: args }; }; adminExecute = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { admin_execute: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.adminExecuteMsg(args), fee || "auto", memo, funds); }; + adminExecuteMsg = (args) => { return { admin_execute: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; pause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); }; + pauseMsg = () => { return { pause: {} }; }; unpause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); }; + unpauseMsg = () => { return { unpause: {} }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropHookTester.d.ts b/ts-client/lib/contractLib/dropHookTester.d.ts index 16e54f4c..81c83187 100644 --- a/ts-client/lib/contractLib/dropHookTester.d.ts +++ b/ts-client/lib/contractLib/dropHookTester.d.ts @@ -219,9 +219,27 @@ export declare class Client { queryAnswers: () => Promise; queryErrors: () => Promise; setConfig: (sender: string, args: SetConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + setConfigMsg: (args: SetConfigArgs) => { + set_config: SetConfigArgs; + }; undelegate: (sender: string, args: UndelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + undelegateMsg: (args: UndelegateArgs) => { + undelegate: UndelegateArgs; + }; redelegate: (sender: string, args: RedelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + redelegateMsg: (args: RedelegateArgs) => { + redelegate: RedelegateArgs; + }; tokenizeShare: (sender: string, args: TokenizeShareArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + tokenizeShareMsg: (args: TokenizeShareArgs) => { + tokenize_share: TokenizeShareArgs; + }; redeemShare: (sender: string, args: RedeemShareArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + redeemShareMsg: (args: RedeemShareArgs) => { + redeem_share: RedeemShareArgs; + }; puppeteerHook: (sender: string, args: PuppeteerHookArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + puppeteerHookMsg: (args: PuppeteerHookArgs) => { + puppeteer_hook: PuppeteerHookArgs; + }; } diff --git a/ts-client/lib/contractLib/dropHookTester.js b/ts-client/lib/contractLib/dropHookTester.js index 3d004ab6..b71866bd 100644 --- a/ts-client/lib/contractLib/dropHookTester.js +++ b/ts-client/lib/contractLib/dropHookTester.js @@ -36,37 +36,43 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { set_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setConfigMsg(args), fee || "auto", memo, funds); }; + setConfigMsg = (args) => { return { set_config: args }; }; undelegate = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { undelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.undelegateMsg(args), fee || "auto", memo, funds); }; + undelegateMsg = (args) => { return { undelegate: args }; }; redelegate = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redelegateMsg(args), fee || "auto", memo, funds); }; + redelegateMsg = (args) => { return { redelegate: args }; }; tokenizeShare = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { tokenize_share: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.tokenizeShareMsg(args), fee || "auto", memo, funds); }; + tokenizeShareMsg = (args) => { return { tokenize_share: args }; }; redeemShare = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redeem_share: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redeemShareMsg(args), fee || "auto", memo, funds); }; + redeemShareMsg = (args) => { return { redeem_share: args }; }; puppeteerHook = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { puppeteer_hook: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.puppeteerHookMsg(args), fee || "auto", memo, funds); }; + puppeteerHookMsg = (args) => { return { puppeteer_hook: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropPriceProvider.d.ts b/ts-client/lib/contractLib/dropPriceProvider.d.ts index 5dfc8a3a..2d6d010b 100644 --- a/ts-client/lib/contractLib/dropPriceProvider.d.ts +++ b/ts-client/lib/contractLib/dropPriceProvider.d.ts @@ -103,6 +103,15 @@ export declare class Client { queryPrice: (args: PriceArgs) => Promise; queryOwnership: () => Promise; removeDenom: (sender: string, args: RemoveDenomArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + removeDenomMsg: (args: RemoveDenomArgs) => { + remove_denom: RemoveDenomArgs; + }; setPrice: (sender: string, args: SetPriceArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + setPriceMsg: (args: SetPriceArgs) => { + set_price: SetPriceArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropPriceProvider.js b/ts-client/lib/contractLib/dropPriceProvider.js index 25e396dc..713edd9f 100644 --- a/ts-client/lib/contractLib/dropPriceProvider.js +++ b/ts-client/lib/contractLib/dropPriceProvider.js @@ -36,19 +36,22 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { remove_denom: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.removeDenomMsg(args), fee || "auto", memo, funds); }; + removeDenomMsg = (args) => { return { remove_denom: args }; }; setPrice = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { set_price: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setPriceMsg(args), fee || "auto", memo, funds); }; + setPriceMsg = (args) => { return { set_price: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropProposalVotesPoc.d.ts b/ts-client/lib/contractLib/dropProposalVotesPoc.d.ts index 318eb072..a227d4f4 100644 --- a/ts-client/lib/contractLib/dropProposalVotesPoc.d.ts +++ b/ts-client/lib/contractLib/dropProposalVotesPoc.d.ts @@ -50,6 +50,15 @@ export declare class Client { queryConfig: () => Promise; queryMetrics: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateActiveProposals: (sender: string, args: UpdateActiveProposalsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateActiveProposalsMsg: (args: UpdateActiveProposalsArgs) => { + update_active_proposals: UpdateActiveProposalsArgs; + }; updateVotersList: (sender: string, args: UpdateVotersListArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateVotersListMsg: (args: UpdateVotersListArgs) => { + update_voters_list: UpdateVotersListArgs; + }; } diff --git a/ts-client/lib/contractLib/dropProposalVotesPoc.js b/ts-client/lib/contractLib/dropProposalVotesPoc.js index 8ec1824d..b7f66981 100644 --- a/ts-client/lib/contractLib/dropProposalVotesPoc.js +++ b/ts-client/lib/contractLib/dropProposalVotesPoc.js @@ -36,19 +36,22 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateActiveProposals = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_active_proposals: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateActiveProposalsMsg(args), fee || "auto", memo, funds); }; + updateActiveProposalsMsg = (args) => { return { update_active_proposals: args }; }; updateVotersList = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_voters_list: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateVotersListMsg(args), fee || "auto", memo, funds); }; + updateVotersListMsg = (args) => { return { update_voters_list: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropProviderProposalsPoc.d.ts b/ts-client/lib/contractLib/dropProviderProposalsPoc.d.ts index fb5f6735..1220d2cf 100644 --- a/ts-client/lib/contractLib/dropProviderProposalsPoc.d.ts +++ b/ts-client/lib/contractLib/dropProviderProposalsPoc.d.ts @@ -141,5 +141,11 @@ export declare class Client { queryGetProposals: () => Promise; queryMetrics: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateProposalVotes: (sender: string, args: UpdateProposalVotesArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateProposalVotesMsg: (args: UpdateProposalVotesArgs) => { + update_proposal_votes: UpdateProposalVotesArgs; + }; } diff --git a/ts-client/lib/contractLib/dropProviderProposalsPoc.js b/ts-client/lib/contractLib/dropProviderProposalsPoc.js index 4d97f030..71c73586 100644 --- a/ts-client/lib/contractLib/dropProviderProposalsPoc.js +++ b/ts-client/lib/contractLib/dropProviderProposalsPoc.js @@ -42,13 +42,15 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateProposalVotes = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_proposal_votes: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateProposalVotesMsg(args), fee || "auto", memo, funds); }; + updateProposalVotesMsg = (args) => { return { update_proposal_votes: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropPump.d.ts b/ts-client/lib/contractLib/dropPump.d.ts index 724e02d9..9784ec1c 100644 --- a/ts-client/lib/contractLib/dropPump.d.ts +++ b/ts-client/lib/contractLib/dropPump.d.ts @@ -154,8 +154,23 @@ export declare class Client { queryIca: () => Promise; queryOwnership: () => Promise; registerICA: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerICAMsg: () => { + register_i_c_a: {}; + }; push: (sender: string, args: PushArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + pushMsg: (args: PushArgs) => { + push: PushArgs; + }; refund: (sender: string, args: RefundArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + refundMsg: (args: RefundArgs) => { + refund: RefundArgs; + }; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropPump.js b/ts-client/lib/contractLib/dropPump.js index 847a9f82..817546ac 100644 --- a/ts-client/lib/contractLib/dropPump.js +++ b/ts-client/lib/contractLib/dropPump.js @@ -39,31 +39,36 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_i_c_a: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerICAMsg(), fee || "auto", memo, funds); }; + registerICAMsg = () => { return { register_i_c_a: {} }; }; push = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { push: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pushMsg(args), fee || "auto", memo, funds); }; + pushMsg = (args) => { return { push: args }; }; refund = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { refund: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.refundMsg(args), fee || "auto", memo, funds); }; + refundMsg = (args) => { return { refund: args }; }; updateConfig = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropPuppeteer.d.ts b/ts-client/lib/contractLib/dropPuppeteer.d.ts index 4d9e9c91..cff2fffc 100644 --- a/ts-client/lib/contractLib/dropPuppeteer.d.ts +++ b/ts-client/lib/contractLib/dropPuppeteer.d.ts @@ -264,18 +264,63 @@ export declare class Client { queryExtension: (args: ExtensionArgs) => Promise; queryTxState: () => Promise; registerICA: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerICAMsg: () => { + register_i_c_a: {}; + }; registerQuery: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerQueryMsg: () => { + register_query: {}; + }; registerBalanceAndDelegatorDelegationsQuery: (sender: string, args: RegisterBalanceAndDelegatorDelegationsQueryArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerBalanceAndDelegatorDelegationsQueryMsg: (args: RegisterBalanceAndDelegatorDelegationsQueryArgs) => { + register_balance_and_delegator_delegations_query: RegisterBalanceAndDelegatorDelegationsQueryArgs; + }; registerDelegatorUnbondingDelegationsQuery: (sender: string, args: RegisterDelegatorUnbondingDelegationsQueryArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerDelegatorUnbondingDelegationsQueryMsg: (args: RegisterDelegatorUnbondingDelegationsQueryArgs) => { + register_delegator_unbonding_delegations_query: RegisterDelegatorUnbondingDelegationsQueryArgs; + }; registerNonNativeRewardsBalancesQuery: (sender: string, args: RegisterNonNativeRewardsBalancesQueryArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerNonNativeRewardsBalancesQueryMsg: (args: RegisterNonNativeRewardsBalancesQueryArgs) => { + register_non_native_rewards_balances_query: RegisterNonNativeRewardsBalancesQueryArgs; + }; setupProtocol: (sender: string, args: SetupProtocolArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + setupProtocolMsg: (args: SetupProtocolArgs) => { + setup_protocol: SetupProtocolArgs; + }; undelegate: (sender: string, args: UndelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + undelegateMsg: (args: UndelegateArgs) => { + undelegate: UndelegateArgs; + }; redelegate: (sender: string, args: RedelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + redelegateMsg: (args: RedelegateArgs) => { + redelegate: RedelegateArgs; + }; tokenizeShare: (sender: string, args: TokenizeShareArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + tokenizeShareMsg: (args: TokenizeShareArgs) => { + tokenize_share: TokenizeShareArgs; + }; redeemShares: (sender: string, args: RedeemSharesArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + redeemSharesMsg: (args: RedeemSharesArgs) => { + redeem_shares: RedeemSharesArgs; + }; iBCTransfer: (sender: string, args: IBCTransferArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + iBCTransferMsg: (args: IBCTransferArgs) => { + i_b_c_transfer: IBCTransferArgs; + }; transfer: (sender: string, args: TransferArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + transferMsg: (args: TransferArgs) => { + transfer: TransferArgs; + }; claimRewardsAndOptionalyTransfer: (sender: string, args: ClaimRewardsAndOptionalyTransferArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + claimRewardsAndOptionalyTransferMsg: (args: ClaimRewardsAndOptionalyTransferArgs) => { + claim_rewards_and_optionaly_transfer: ClaimRewardsAndOptionalyTransferArgs; + }; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropPuppeteer.js b/ts-client/lib/contractLib/dropPuppeteer.js index ef3712bb..c37dc3b0 100644 --- a/ts-client/lib/contractLib/dropPuppeteer.js +++ b/ts-client/lib/contractLib/dropPuppeteer.js @@ -48,91 +48,106 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_i_c_a: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerICAMsg(), fee || "auto", memo, funds); }; + registerICAMsg = () => { return { register_i_c_a: {} }; }; registerQuery = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_query: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerQueryMsg(), fee || "auto", memo, funds); }; + registerQueryMsg = () => { return { register_query: {} }; }; registerBalanceAndDelegatorDelegationsQuery = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_balance_and_delegator_delegations_query: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerBalanceAndDelegatorDelegationsQueryMsg(args), fee || "auto", memo, funds); }; + registerBalanceAndDelegatorDelegationsQueryMsg = (args) => { return { register_balance_and_delegator_delegations_query: args }; }; registerDelegatorUnbondingDelegationsQuery = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_delegator_unbonding_delegations_query: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerDelegatorUnbondingDelegationsQueryMsg(args), fee || "auto", memo, funds); }; + registerDelegatorUnbondingDelegationsQueryMsg = (args) => { return { register_delegator_unbonding_delegations_query: args }; }; registerNonNativeRewardsBalancesQuery = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_non_native_rewards_balances_query: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerNonNativeRewardsBalancesQueryMsg(args), fee || "auto", memo, funds); }; + registerNonNativeRewardsBalancesQueryMsg = (args) => { return { register_non_native_rewards_balances_query: args }; }; setupProtocol = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { setup_protocol: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setupProtocolMsg(args), fee || "auto", memo, funds); }; + setupProtocolMsg = (args) => { return { setup_protocol: args }; }; undelegate = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { undelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.undelegateMsg(args), fee || "auto", memo, funds); }; + undelegateMsg = (args) => { return { undelegate: args }; }; redelegate = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redelegateMsg(args), fee || "auto", memo, funds); }; + redelegateMsg = (args) => { return { redelegate: args }; }; tokenizeShare = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { tokenize_share: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.tokenizeShareMsg(args), fee || "auto", memo, funds); }; + tokenizeShareMsg = (args) => { return { tokenize_share: args }; }; redeemShares = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redeem_shares: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redeemSharesMsg(args), fee || "auto", memo, funds); }; + redeemSharesMsg = (args) => { return { redeem_shares: args }; }; iBCTransfer = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { i_b_c_transfer: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.iBCTransferMsg(args), fee || "auto", memo, funds); }; + iBCTransferMsg = (args) => { return { i_b_c_transfer: args }; }; transfer = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { transfer: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.transferMsg(args), fee || "auto", memo, funds); }; + transferMsg = (args) => { return { transfer: args }; }; claimRewardsAndOptionalyTransfer = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { claim_rewards_and_optionaly_transfer: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.claimRewardsAndOptionalyTransferMsg(args), fee || "auto", memo, funds); }; + claimRewardsAndOptionalyTransferMsg = (args) => { return { claim_rewards_and_optionaly_transfer: args }; }; updateConfig = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropRewardsManager.d.ts b/ts-client/lib/contractLib/dropRewardsManager.d.ts index b099d9c0..dadcb3db 100644 --- a/ts-client/lib/contractLib/dropRewardsManager.d.ts +++ b/ts-client/lib/contractLib/dropRewardsManager.d.ts @@ -118,9 +118,27 @@ export declare class Client { queryOwnership: () => Promise; queryPauseInfo: () => Promise; addHandler: (sender: string, args: AddHandlerArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + addHandlerMsg: (args: AddHandlerArgs) => { + add_handler: AddHandlerArgs; + }; removeHandler: (sender: string, args: RemoveHandlerArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + removeHandlerMsg: (args: RemoveHandlerArgs) => { + remove_handler: RemoveHandlerArgs; + }; exchangeRewards: (sender: string, args: ExchangeRewardsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + exchangeRewardsMsg: (args: ExchangeRewardsArgs) => { + exchange_rewards: ExchangeRewardsArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; pause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + pauseMsg: () => { + pause: {}; + }; unpause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + unpauseMsg: () => { + unpause: {}; + }; } diff --git a/ts-client/lib/contractLib/dropRewardsManager.js b/ts-client/lib/contractLib/dropRewardsManager.js index 39e29e8d..ac8680c7 100644 --- a/ts-client/lib/contractLib/dropRewardsManager.js +++ b/ts-client/lib/contractLib/dropRewardsManager.js @@ -39,37 +39,43 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { add_handler: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.addHandlerMsg(args), fee || "auto", memo, funds); }; + addHandlerMsg = (args) => { return { add_handler: args }; }; removeHandler = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { remove_handler: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.removeHandlerMsg(args), fee || "auto", memo, funds); }; + removeHandlerMsg = (args) => { return { remove_handler: args }; }; exchangeRewards = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { exchange_rewards: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.exchangeRewardsMsg(args), fee || "auto", memo, funds); }; + exchangeRewardsMsg = (args) => { return { exchange_rewards: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; pause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); }; + pauseMsg = () => { return { pause: {} }; }; unpause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); }; + unpauseMsg = () => { return { unpause: {} }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropSplitter.d.ts b/ts-client/lib/contractLib/dropSplitter.d.ts index 72286cd8..8b4ef4f2 100644 --- a/ts-client/lib/contractLib/dropSplitter.d.ts +++ b/ts-client/lib/contractLib/dropSplitter.d.ts @@ -105,6 +105,15 @@ export declare class Client { queryConfig: () => Promise; queryOwnership: () => Promise; distribute: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + distributeMsg: () => { + distribute: {}; + }; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropSplitter.js b/ts-client/lib/contractLib/dropSplitter.js index 45046a96..fb2c680c 100644 --- a/ts-client/lib/contractLib/dropSplitter.js +++ b/ts-client/lib/contractLib/dropSplitter.js @@ -36,19 +36,22 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { distribute: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.distributeMsg(), fee || "auto", memo, funds); }; + distributeMsg = () => { return { distribute: {} }; }; updateConfig = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropStaker.d.ts b/ts-client/lib/contractLib/dropStaker.d.ts index a0cae6b4..5770baa4 100644 --- a/ts-client/lib/contractLib/dropStaker.d.ts +++ b/ts-client/lib/contractLib/dropStaker.d.ts @@ -194,8 +194,23 @@ export declare class Client { queryTxState: () => Promise; queryOwnership: () => Promise; registerICA: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerICAMsg: () => { + register_i_c_a: {}; + }; stake: (sender: string, args: StakeArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + stakeMsg: (args: StakeArgs) => { + stake: StakeArgs; + }; iBCTransfer: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + iBCTransferMsg: () => { + i_b_c_transfer: {}; + }; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropStaker.js b/ts-client/lib/contractLib/dropStaker.js index 0d2fbf70..af19ea0c 100644 --- a/ts-client/lib/contractLib/dropStaker.js +++ b/ts-client/lib/contractLib/dropStaker.js @@ -48,31 +48,36 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_i_c_a: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerICAMsg(), fee || "auto", memo, funds); }; + registerICAMsg = () => { return { register_i_c_a: {} }; }; stake = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { stake: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.stakeMsg(args), fee || "auto", memo, funds); }; + stakeMsg = (args) => { return { stake: args }; }; iBCTransfer = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { i_b_c_transfer: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.iBCTransferMsg(), fee || "auto", memo, funds); }; + iBCTransferMsg = () => { return { i_b_c_transfer: {} }; }; updateConfig = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropStrategy.d.ts b/ts-client/lib/contractLib/dropStrategy.d.ts index 35111c0f..1867fbe9 100644 --- a/ts-client/lib/contractLib/dropStrategy.d.ts +++ b/ts-client/lib/contractLib/dropStrategy.d.ts @@ -124,5 +124,11 @@ export declare class Client { queryCalcWithdraw: (args: CalcWithdrawArgs) => Promise; queryOwnership: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropStrategy.js b/ts-client/lib/contractLib/dropStrategy.js index 8f4b56b9..ff1d0548 100644 --- a/ts-client/lib/contractLib/dropStrategy.js +++ b/ts-client/lib/contractLib/dropStrategy.js @@ -42,13 +42,15 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropToken.d.ts b/ts-client/lib/contractLib/dropToken.d.ts index b6254ea7..32cd0112 100644 --- a/ts-client/lib/contractLib/dropToken.d.ts +++ b/ts-client/lib/contractLib/dropToken.d.ts @@ -138,7 +138,19 @@ export declare class Client { queryConfig: () => Promise; queryOwnership: () => Promise; mint: (sender: string, args: MintArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + mintMsg: (args: MintArgs) => { + mint: MintArgs; + }; burn: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + burnMsg: () => { + burn: {}; + }; setTokenMetadata: (sender: string, args: SetTokenMetadataArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + setTokenMetadataMsg: (args: SetTokenMetadataArgs) => { + set_token_metadata: SetTokenMetadataArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropToken.js b/ts-client/lib/contractLib/dropToken.js index 2e951450..cdf35a9c 100644 --- a/ts-client/lib/contractLib/dropToken.js +++ b/ts-client/lib/contractLib/dropToken.js @@ -36,25 +36,29 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { mint: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.mintMsg(args), fee || "auto", memo, funds); }; + mintMsg = (args) => { return { mint: args }; }; burn = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { burn: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.burnMsg(), fee || "auto", memo, funds); }; + burnMsg = () => { return { burn: {} }; }; setTokenMetadata = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { set_token_metadata: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setTokenMetadataMsg(args), fee || "auto", memo, funds); }; + setTokenMetadataMsg = (args) => { return { set_token_metadata: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropValidatorsSet.d.ts b/ts-client/lib/contractLib/dropValidatorsSet.d.ts index fc8da52b..d8c190c8 100644 --- a/ts-client/lib/contractLib/dropValidatorsSet.d.ts +++ b/ts-client/lib/contractLib/dropValidatorsSet.d.ts @@ -220,8 +220,23 @@ export declare class Client { queryValidators: () => Promise; queryOwnership: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; updateValidators: (sender: string, args: UpdateValidatorsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateValidatorsMsg: (args: UpdateValidatorsArgs) => { + update_validators: UpdateValidatorsArgs; + }; updateValidatorsInfo: (sender: string, args: UpdateValidatorsInfoArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateValidatorsInfoMsg: (args: UpdateValidatorsInfoArgs) => { + update_validators_info: UpdateValidatorsInfoArgs; + }; updateValidatorsVoting: (sender: string, args: UpdateValidatorsVotingArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateValidatorsVotingMsg: (args: UpdateValidatorsVotingArgs) => { + update_validators_voting: UpdateValidatorsVotingArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropValidatorsSet.js b/ts-client/lib/contractLib/dropValidatorsSet.js index a24dcabe..dc28035a 100644 --- a/ts-client/lib/contractLib/dropValidatorsSet.js +++ b/ts-client/lib/contractLib/dropValidatorsSet.js @@ -42,31 +42,36 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; updateValidators = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_validators: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateValidatorsMsg(args), fee || "auto", memo, funds); }; + updateValidatorsMsg = (args) => { return { update_validators: args }; }; updateValidatorsInfo = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_validators_info: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateValidatorsInfoMsg(args), fee || "auto", memo, funds); }; + updateValidatorsInfoMsg = (args) => { return { update_validators_info: args }; }; updateValidatorsVoting = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_validators_voting: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateValidatorsVotingMsg(args), fee || "auto", memo, funds); }; + updateValidatorsVotingMsg = (args) => { return { update_validators_voting: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropValidatorsStats.d.ts b/ts-client/lib/contractLib/dropValidatorsStats.d.ts index cc95ce66..057d2441 100644 --- a/ts-client/lib/contractLib/dropValidatorsStats.d.ts +++ b/ts-client/lib/contractLib/dropValidatorsStats.d.ts @@ -70,4 +70,7 @@ export declare class Client { queryKVQueryIds: () => Promise; queryState: () => Promise; registerStatsQueries: (sender: string, args: RegisterStatsQueriesArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + registerStatsQueriesMsg: (args: RegisterStatsQueriesArgs) => { + register_stats_queries: RegisterStatsQueriesArgs; + }; } diff --git a/ts-client/lib/contractLib/dropValidatorsStats.js b/ts-client/lib/contractLib/dropValidatorsStats.js index 03fbe6d0..d1a6b36a 100644 --- a/ts-client/lib/contractLib/dropValidatorsStats.js +++ b/ts-client/lib/contractLib/dropValidatorsStats.js @@ -39,7 +39,8 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_stats_queries: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerStatsQueriesMsg(args), fee || "auto", memo, funds); }; + registerStatsQueriesMsg = (args) => { return { register_stats_queries: args }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropWithdrawalManager.d.ts b/ts-client/lib/contractLib/dropWithdrawalManager.d.ts index e0ae5e4e..b127193b 100644 --- a/ts-client/lib/contractLib/dropWithdrawalManager.d.ts +++ b/ts-client/lib/contractLib/dropWithdrawalManager.d.ts @@ -124,8 +124,23 @@ export declare class Client { queryOwnership: () => Promise; queryPauseInfo: () => Promise; updateConfig: (sender: string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateConfigMsg: (args: UpdateConfigArgs) => { + update_config: UpdateConfigArgs; + }; receiveNft: (sender: string, args: ReceiveNftArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + receiveNftMsg: (args: ReceiveNftArgs) => { + receive_nft: ReceiveNftArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; pause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + pauseMsg: () => { + pause: {}; + }; unpause: (sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + unpauseMsg: () => { + unpause: {}; + }; } diff --git a/ts-client/lib/contractLib/dropWithdrawalManager.js b/ts-client/lib/contractLib/dropWithdrawalManager.js index b588d7d2..ad3aa157 100644 --- a/ts-client/lib/contractLib/dropWithdrawalManager.js +++ b/ts-client/lib/contractLib/dropWithdrawalManager.js @@ -39,31 +39,36 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); }; + updateConfigMsg = (args) => { return { update_config: args }; }; receiveNft = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { receive_nft: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.receiveNftMsg(args), fee || "auto", memo, funds); }; + receiveNftMsg = (args) => { return { receive_nft: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; pause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); }; + pauseMsg = () => { return { pause: {} }; }; unpause = async (sender, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); }; + unpauseMsg = () => { return { unpause: {} }; }; } exports.Client = Client; diff --git a/ts-client/lib/contractLib/dropWithdrawalVoucher.d.ts b/ts-client/lib/contractLib/dropWithdrawalVoucher.d.ts index 7c13e95e..dee15c82 100644 --- a/ts-client/lib/contractLib/dropWithdrawalVoucher.d.ts +++ b/ts-client/lib/contractLib/dropWithdrawalVoucher.d.ts @@ -343,13 +343,43 @@ export declare class Client { queryExtension: (args: ExtensionArgs) => Promise; queryOwnership: () => Promise; transferNft: (sender: string, args: TransferNftArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + transferNftMsg: (args: TransferNftArgs) => { + transfer_nft: TransferNftArgs; + }; sendNft: (sender: string, args: SendNftArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + sendNftMsg: (args: SendNftArgs) => { + send_nft: SendNftArgs; + }; approve: (sender: string, args: ApproveArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + approveMsg: (args: ApproveArgs) => { + approve: ApproveArgs; + }; revoke: (sender: string, args: RevokeArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + revokeMsg: (args: RevokeArgs) => { + revoke: RevokeArgs; + }; approveAll: (sender: string, args: ApproveAllArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + approveAllMsg: (args: ApproveAllArgs) => { + approve_all: ApproveAllArgs; + }; revokeAll: (sender: string, args: RevokeAllArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + revokeAllMsg: (args: RevokeAllArgs) => { + revoke_all: RevokeAllArgs; + }; mint: (sender: string, args: MintArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + mintMsg: (args: MintArgs) => { + mint: MintArgs; + }; burn: (sender: string, args: BurnArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + burnMsg: (args: BurnArgs) => { + burn: BurnArgs; + }; extension: (sender: string, args: ExtensionArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + extensionMsg: (args: ExtensionArgs) => { + extension: ExtensionArgs; + }; updateOwnership: (sender: string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]) => Promise; + updateOwnershipMsg: (args: UpdateOwnershipArgs) => { + update_ownership: UpdateOwnershipArgs; + }; } diff --git a/ts-client/lib/contractLib/dropWithdrawalVoucher.js b/ts-client/lib/contractLib/dropWithdrawalVoucher.js index 9e1e220d..7020013a 100644 --- a/ts-client/lib/contractLib/dropWithdrawalVoucher.js +++ b/ts-client/lib/contractLib/dropWithdrawalVoucher.js @@ -72,61 +72,71 @@ class Client { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { transfer_nft: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.transferNftMsg(args), fee || "auto", memo, funds); }; + transferNftMsg = (args) => { return { transfer_nft: args }; }; sendNft = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { send_nft: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.sendNftMsg(args), fee || "auto", memo, funds); }; + sendNftMsg = (args) => { return { send_nft: args }; }; approve = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { approve: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.approveMsg(args), fee || "auto", memo, funds); }; + approveMsg = (args) => { return { approve: args }; }; revoke = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { revoke: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.revokeMsg(args), fee || "auto", memo, funds); }; + revokeMsg = (args) => { return { revoke: args }; }; approveAll = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { approve_all: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.approveAllMsg(args), fee || "auto", memo, funds); }; + approveAllMsg = (args) => { return { approve_all: args }; }; revokeAll = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { revoke_all: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.revokeAllMsg(args), fee || "auto", memo, funds); }; + revokeAllMsg = (args) => { return { revoke_all: args }; }; mint = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { mint: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.mintMsg(args), fee || "auto", memo, funds); }; + mintMsg = (args) => { return { mint: args }; }; burn = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { burn: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.burnMsg(args), fee || "auto", memo, funds); }; + burnMsg = (args) => { return { burn: args }; }; extension = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { extension: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.extensionMsg(args), fee || "auto", memo, funds); }; + extensionMsg = (args) => { return { extension: args }; }; updateOwnership = async (sender, args, fee, memo, funds) => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); }; + updateOwnershipMsg = (args) => { return { update_ownership: args }; }; } exports.Client = Client; diff --git a/ts-client/package.json b/ts-client/package.json index 7b95eeee..9ff3c61a 100644 --- a/ts-client/package.json +++ b/ts-client/package.json @@ -8,12 +8,13 @@ }, "dependencies": { "@neutron-org/client-ts": "^1.4.0", - "@neutron-org/contracts2ts": "1.4.6", + "@neutron-org/contracts2ts": "1.5.0", "@cosmjs/cosmwasm-stargate": "^0.32.4", - "@cosmjs/proto-signing": "^0.32.4" + "@cosmjs/proto-signing": "^0.32.4", + "@cosmjs/amino": "^0.32.4" }, "devDependencies": { "ts-node": "^10.9.2", "typescript": "^5.4.2" } -} +} \ No newline at end of file diff --git a/ts-client/src/contractLib/dropAstroportExchangeHandler.ts b/ts-client/src/contractLib/dropAstroportExchangeHandler.ts index 3c9632ac..9e26c6a4 100644 --- a/ts-client/src/contractLib/dropAstroportExchangeHandler.ts +++ b/ts-client/src/contractLib/dropAstroportExchangeHandler.ts @@ -195,7 +195,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -235,18 +235,22 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateSwapOperations = async(sender:string, args: UpdateSwapOperationsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_swap_operations: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateSwapOperationsMsg(args), fee || "auto", memo, funds); } + updateSwapOperationsMsg = (args: UpdateSwapOperationsArgs): { update_swap_operations: UpdateSwapOperationsArgs } => { return { update_swap_operations: args }; } exchange = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { exchange: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.exchangeMsg(), fee || "auto", memo, funds); } + exchangeMsg = (): { exchange: {} } => { return { exchange: {} } } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropAutoWithdrawer.ts b/ts-client/src/contractLib/dropAutoWithdrawer.ts index 67af0672..6516bf0f 100644 --- a/ts-client/src/contractLib/dropAutoWithdrawer.ts +++ b/ts-client/src/contractLib/dropAutoWithdrawer.ts @@ -104,7 +104,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -144,14 +144,17 @@ export class Client { } bond = async(sender:string, args: BondArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { bond: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.bondMsg(args), fee || "auto", memo, funds); } + bondMsg = (args: BondArgs): { bond: BondArgs } => { return { bond: args }; } unbond = async(sender:string, args: UnbondArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unbond: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unbondMsg(args), fee || "auto", memo, funds); } + unbondMsg = (args: UnbondArgs): { unbond: UnbondArgs } => { return { unbond: args }; } withdraw = async(sender:string, args: WithdrawArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { withdraw: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.withdrawMsg(args), fee || "auto", memo, funds); } + withdrawMsg = (args: WithdrawArgs): { withdraw: WithdrawArgs } => { return { withdraw: args }; } } diff --git a/ts-client/src/contractLib/dropCore.ts b/ts-client/src/contractLib/dropCore.ts index 32d30b3d..bff047c6 100644 --- a/ts-client/src/contractLib/dropCore.ts +++ b/ts-client/src/contractLib/dropCore.ts @@ -554,7 +554,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -633,50 +633,62 @@ export class Client { } bond = async(sender:string, args: BondArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { bond: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.bondMsg(args), fee || "auto", memo, funds); } + bondMsg = (args: BondArgs): { bond: BondArgs } => { return { bond: args }; } unbond = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unbond: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unbondMsg(), fee || "auto", memo, funds); } + unbondMsg = (): { unbond: {} } => { return { unbond: {} } } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateWithdrawnAmount = async(sender:string, args: UpdateWithdrawnAmountArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_withdrawn_amount: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateWithdrawnAmountMsg(args), fee || "auto", memo, funds); } + updateWithdrawnAmountMsg = (args: UpdateWithdrawnAmountArgs): { update_withdrawn_amount: UpdateWithdrawnAmountArgs } => { return { update_withdrawn_amount: args }; } tick = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { tick: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.tickMsg(), fee || "auto", memo, funds); } + tickMsg = (): { tick: {} } => { return { tick: {} } } puppeteerHook = async(sender:string, args: PuppeteerHookArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { puppeteer_hook: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.puppeteerHookMsg(args), fee || "auto", memo, funds); } + puppeteerHookMsg = (args: PuppeteerHookArgs): { puppeteer_hook: PuppeteerHookArgs } => { return { puppeteer_hook: args }; } stakerHook = async(sender:string, args: StakerHookArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { staker_hook: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.stakerHookMsg(args), fee || "auto", memo, funds); } + stakerHookMsg = (args: StakerHookArgs): { staker_hook: StakerHookArgs } => { return { staker_hook: args }; } resetBondedAmount = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { reset_bonded_amount: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.resetBondedAmountMsg(), fee || "auto", memo, funds); } + resetBondedAmountMsg = (): { reset_bonded_amount: {} } => { return { reset_bonded_amount: {} } } processEmergencyBatch = async(sender:string, args: ProcessEmergencyBatchArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { process_emergency_batch: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.processEmergencyBatchMsg(args), fee || "auto", memo, funds); } + processEmergencyBatchMsg = (args: ProcessEmergencyBatchArgs): { process_emergency_batch: ProcessEmergencyBatchArgs } => { return { process_emergency_batch: args }; } pause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); } + pauseMsg = (): { pause: {} } => { return { pause: {} } } unpause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); } + unpauseMsg = (): { unpause: {} } => { return { unpause: {} } } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropDistribution.ts b/ts-client/src/contractLib/dropDistribution.ts index 79418eb5..2cdba248 100644 --- a/ts-client/src/contractLib/dropDistribution.ts +++ b/ts-client/src/contractLib/dropDistribution.ts @@ -58,7 +58,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( diff --git a/ts-client/src/contractLib/dropFactory.ts b/ts-client/src/contractLib/dropFactory.ts index 231c9aa7..45c1f3cd 100644 --- a/ts-client/src/contractLib/dropFactory.ts +++ b/ts-client/src/contractLib/dropFactory.ts @@ -1277,7 +1277,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -1317,26 +1317,32 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } proxy = async(sender:string, args: ProxyArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { proxy: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.proxyMsg(args), fee || "auto", memo, funds); } + proxyMsg = (args: ProxyArgs): { proxy: ProxyArgs } => { return { proxy: args }; } adminExecute = async(sender:string, args: AdminExecuteArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { admin_execute: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.adminExecuteMsg(args), fee || "auto", memo, funds); } + adminExecuteMsg = (args: AdminExecuteArgs): { admin_execute: AdminExecuteArgs } => { return { admin_execute: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } pause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); } + pauseMsg = (): { pause: {} } => { return { pause: {} } } unpause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); } + unpauseMsg = (): { unpause: {} } => { return { unpause: {} } } } diff --git a/ts-client/src/contractLib/dropHookTester.ts b/ts-client/src/contractLib/dropHookTester.ts index c573c746..6092eed8 100644 --- a/ts-client/src/contractLib/dropHookTester.ts +++ b/ts-client/src/contractLib/dropHookTester.ts @@ -241,7 +241,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -281,26 +281,32 @@ export class Client { } setConfig = async(sender:string, args: SetConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { set_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setConfigMsg(args), fee || "auto", memo, funds); } + setConfigMsg = (args: SetConfigArgs): { set_config: SetConfigArgs } => { return { set_config: args }; } undelegate = async(sender:string, args: UndelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { undelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.undelegateMsg(args), fee || "auto", memo, funds); } + undelegateMsg = (args: UndelegateArgs): { undelegate: UndelegateArgs } => { return { undelegate: args }; } redelegate = async(sender:string, args: RedelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redelegateMsg(args), fee || "auto", memo, funds); } + redelegateMsg = (args: RedelegateArgs): { redelegate: RedelegateArgs } => { return { redelegate: args }; } tokenizeShare = async(sender:string, args: TokenizeShareArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { tokenize_share: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.tokenizeShareMsg(args), fee || "auto", memo, funds); } + tokenizeShareMsg = (args: TokenizeShareArgs): { tokenize_share: TokenizeShareArgs } => { return { tokenize_share: args }; } redeemShare = async(sender:string, args: RedeemShareArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redeem_share: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redeemShareMsg(args), fee || "auto", memo, funds); } + redeemShareMsg = (args: RedeemShareArgs): { redeem_share: RedeemShareArgs } => { return { redeem_share: args }; } puppeteerHook = async(sender:string, args: PuppeteerHookArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { puppeteer_hook: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.puppeteerHookMsg(args), fee || "auto", memo, funds); } + puppeteerHookMsg = (args: PuppeteerHookArgs): { puppeteer_hook: PuppeteerHookArgs } => { return { puppeteer_hook: args }; } } diff --git a/ts-client/src/contractLib/dropPriceProvider.ts b/ts-client/src/contractLib/dropPriceProvider.ts index 18ec4a65..5c72cc5b 100644 --- a/ts-client/src/contractLib/dropPriceProvider.ts +++ b/ts-client/src/contractLib/dropPriceProvider.ts @@ -115,7 +115,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -155,14 +155,17 @@ export class Client { } removeDenom = async(sender:string, args: RemoveDenomArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { remove_denom: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.removeDenomMsg(args), fee || "auto", memo, funds); } + removeDenomMsg = (args: RemoveDenomArgs): { remove_denom: RemoveDenomArgs } => { return { remove_denom: args }; } setPrice = async(sender:string, args: SetPriceArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { set_price: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setPriceMsg(args), fee || "auto", memo, funds); } + setPriceMsg = (args: SetPriceArgs): { set_price: SetPriceArgs } => { return { set_price: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropProposalVotesPoc.ts b/ts-client/src/contractLib/dropProposalVotesPoc.ts index 6dbdc7e1..8cd695f4 100644 --- a/ts-client/src/contractLib/dropProposalVotesPoc.ts +++ b/ts-client/src/contractLib/dropProposalVotesPoc.ts @@ -55,7 +55,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -95,14 +95,17 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateActiveProposals = async(sender:string, args: UpdateActiveProposalsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_active_proposals: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateActiveProposalsMsg(args), fee || "auto", memo, funds); } + updateActiveProposalsMsg = (args: UpdateActiveProposalsArgs): { update_active_proposals: UpdateActiveProposalsArgs } => { return { update_active_proposals: args }; } updateVotersList = async(sender:string, args: UpdateVotersListArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_voters_list: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateVotersListMsg(args), fee || "auto", memo, funds); } + updateVotersListMsg = (args: UpdateVotersListArgs): { update_voters_list: UpdateVotersListArgs } => { return { update_voters_list: args }; } } diff --git a/ts-client/src/contractLib/dropProviderProposalsPoc.ts b/ts-client/src/contractLib/dropProviderProposalsPoc.ts index 70126a1f..865fb380 100644 --- a/ts-client/src/contractLib/dropProviderProposalsPoc.ts +++ b/ts-client/src/contractLib/dropProviderProposalsPoc.ts @@ -145,7 +145,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -191,10 +191,12 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateProposalVotes = async(sender:string, args: UpdateProposalVotesArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_proposal_votes: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateProposalVotesMsg(args), fee || "auto", memo, funds); } + updateProposalVotesMsg = (args: UpdateProposalVotesArgs): { update_proposal_votes: UpdateProposalVotesArgs } => { return { update_proposal_votes: args }; } } diff --git a/ts-client/src/contractLib/dropPump.ts b/ts-client/src/contractLib/dropPump.ts index 9dabc47b..d0ed27b8 100644 --- a/ts-client/src/contractLib/dropPump.ts +++ b/ts-client/src/contractLib/dropPump.ts @@ -167,7 +167,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -210,22 +210,27 @@ export class Client { } registerICA = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_i_c_a: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerICAMsg(), fee || "auto", memo, funds); } + registerICAMsg = (): { register_i_c_a: {} } => { return { register_i_c_a: {} } } push = async(sender:string, args: PushArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { push: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pushMsg(args), fee || "auto", memo, funds); } + pushMsg = (args: PushArgs): { push: PushArgs } => { return { push: args }; } refund = async(sender:string, args: RefundArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { refund: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.refundMsg(args), fee || "auto", memo, funds); } + refundMsg = (args: RefundArgs): { refund: RefundArgs } => { return { refund: args }; } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropPuppeteer.ts b/ts-client/src/contractLib/dropPuppeteer.ts index 7aa8a4d1..d81f67bf 100644 --- a/ts-client/src/contractLib/dropPuppeteer.ts +++ b/ts-client/src/contractLib/dropPuppeteer.ts @@ -301,7 +301,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -353,62 +353,77 @@ export class Client { } registerICA = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_i_c_a: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerICAMsg(), fee || "auto", memo, funds); } + registerICAMsg = (): { register_i_c_a: {} } => { return { register_i_c_a: {} } } registerQuery = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_query: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerQueryMsg(), fee || "auto", memo, funds); } + registerQueryMsg = (): { register_query: {} } => { return { register_query: {} } } registerBalanceAndDelegatorDelegationsQuery = async(sender:string, args: RegisterBalanceAndDelegatorDelegationsQueryArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_balance_and_delegator_delegations_query: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerBalanceAndDelegatorDelegationsQueryMsg(args), fee || "auto", memo, funds); } + registerBalanceAndDelegatorDelegationsQueryMsg = (args: RegisterBalanceAndDelegatorDelegationsQueryArgs): { register_balance_and_delegator_delegations_query: RegisterBalanceAndDelegatorDelegationsQueryArgs } => { return { register_balance_and_delegator_delegations_query: args }; } registerDelegatorUnbondingDelegationsQuery = async(sender:string, args: RegisterDelegatorUnbondingDelegationsQueryArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_delegator_unbonding_delegations_query: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerDelegatorUnbondingDelegationsQueryMsg(args), fee || "auto", memo, funds); } + registerDelegatorUnbondingDelegationsQueryMsg = (args: RegisterDelegatorUnbondingDelegationsQueryArgs): { register_delegator_unbonding_delegations_query: RegisterDelegatorUnbondingDelegationsQueryArgs } => { return { register_delegator_unbonding_delegations_query: args }; } registerNonNativeRewardsBalancesQuery = async(sender:string, args: RegisterNonNativeRewardsBalancesQueryArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_non_native_rewards_balances_query: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerNonNativeRewardsBalancesQueryMsg(args), fee || "auto", memo, funds); } + registerNonNativeRewardsBalancesQueryMsg = (args: RegisterNonNativeRewardsBalancesQueryArgs): { register_non_native_rewards_balances_query: RegisterNonNativeRewardsBalancesQueryArgs } => { return { register_non_native_rewards_balances_query: args }; } setupProtocol = async(sender:string, args: SetupProtocolArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { setup_protocol: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setupProtocolMsg(args), fee || "auto", memo, funds); } + setupProtocolMsg = (args: SetupProtocolArgs): { setup_protocol: SetupProtocolArgs } => { return { setup_protocol: args }; } undelegate = async(sender:string, args: UndelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { undelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.undelegateMsg(args), fee || "auto", memo, funds); } + undelegateMsg = (args: UndelegateArgs): { undelegate: UndelegateArgs } => { return { undelegate: args }; } redelegate = async(sender:string, args: RedelegateArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redelegate: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redelegateMsg(args), fee || "auto", memo, funds); } + redelegateMsg = (args: RedelegateArgs): { redelegate: RedelegateArgs } => { return { redelegate: args }; } tokenizeShare = async(sender:string, args: TokenizeShareArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { tokenize_share: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.tokenizeShareMsg(args), fee || "auto", memo, funds); } + tokenizeShareMsg = (args: TokenizeShareArgs): { tokenize_share: TokenizeShareArgs } => { return { tokenize_share: args }; } redeemShares = async(sender:string, args: RedeemSharesArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { redeem_shares: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.redeemSharesMsg(args), fee || "auto", memo, funds); } + redeemSharesMsg = (args: RedeemSharesArgs): { redeem_shares: RedeemSharesArgs } => { return { redeem_shares: args }; } iBCTransfer = async(sender:string, args: IBCTransferArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { i_b_c_transfer: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.iBCTransferMsg(args), fee || "auto", memo, funds); } + iBCTransferMsg = (args: IBCTransferArgs): { i_b_c_transfer: IBCTransferArgs } => { return { i_b_c_transfer: args }; } transfer = async(sender:string, args: TransferArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { transfer: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.transferMsg(args), fee || "auto", memo, funds); } + transferMsg = (args: TransferArgs): { transfer: TransferArgs } => { return { transfer: args }; } claimRewardsAndOptionalyTransfer = async(sender:string, args: ClaimRewardsAndOptionalyTransferArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { claim_rewards_and_optionaly_transfer: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.claimRewardsAndOptionalyTransferMsg(args), fee || "auto", memo, funds); } + claimRewardsAndOptionalyTransferMsg = (args: ClaimRewardsAndOptionalyTransferArgs): { claim_rewards_and_optionaly_transfer: ClaimRewardsAndOptionalyTransferArgs } => { return { claim_rewards_and_optionaly_transfer: args }; } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropRewardsManager.ts b/ts-client/src/contractLib/dropRewardsManager.ts index 966c4ea5..95adb244 100644 --- a/ts-client/src/contractLib/dropRewardsManager.ts +++ b/ts-client/src/contractLib/dropRewardsManager.ts @@ -131,7 +131,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -174,26 +174,32 @@ export class Client { } addHandler = async(sender:string, args: AddHandlerArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { add_handler: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.addHandlerMsg(args), fee || "auto", memo, funds); } + addHandlerMsg = (args: AddHandlerArgs): { add_handler: AddHandlerArgs } => { return { add_handler: args }; } removeHandler = async(sender:string, args: RemoveHandlerArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { remove_handler: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.removeHandlerMsg(args), fee || "auto", memo, funds); } + removeHandlerMsg = (args: RemoveHandlerArgs): { remove_handler: RemoveHandlerArgs } => { return { remove_handler: args }; } exchangeRewards = async(sender:string, args: ExchangeRewardsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { exchange_rewards: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.exchangeRewardsMsg(args), fee || "auto", memo, funds); } + exchangeRewardsMsg = (args: ExchangeRewardsArgs): { exchange_rewards: ExchangeRewardsArgs } => { return { exchange_rewards: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } pause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); } + pauseMsg = (): { pause: {} } => { return { pause: {} } } unpause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); } + unpauseMsg = (): { unpause: {} } => { return { unpause: {} } } } diff --git a/ts-client/src/contractLib/dropSplitter.ts b/ts-client/src/contractLib/dropSplitter.ts index 94eff612..6a49ec77 100644 --- a/ts-client/src/contractLib/dropSplitter.ts +++ b/ts-client/src/contractLib/dropSplitter.ts @@ -117,7 +117,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -157,14 +157,17 @@ export class Client { } distribute = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { distribute: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.distributeMsg(), fee || "auto", memo, funds); } + distributeMsg = (): { distribute: {} } => { return { distribute: {} } } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropStaker.ts b/ts-client/src/contractLib/dropStaker.ts index 27915eb4..28b44901 100644 --- a/ts-client/src/contractLib/dropStaker.ts +++ b/ts-client/src/contractLib/dropStaker.ts @@ -206,7 +206,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -258,22 +258,27 @@ export class Client { } registerICA = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_i_c_a: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerICAMsg(), fee || "auto", memo, funds); } + registerICAMsg = (): { register_i_c_a: {} } => { return { register_i_c_a: {} } } stake = async(sender:string, args: StakeArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { stake: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.stakeMsg(args), fee || "auto", memo, funds); } + stakeMsg = (args: StakeArgs): { stake: StakeArgs } => { return { stake: args }; } iBCTransfer = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { i_b_c_transfer: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.iBCTransferMsg(), fee || "auto", memo, funds); } + iBCTransferMsg = (): { i_b_c_transfer: {} } => { return { i_b_c_transfer: {} } } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropStrategy.ts b/ts-client/src/contractLib/dropStrategy.ts index 123fc0b3..4eaa5008 100644 --- a/ts-client/src/contractLib/dropStrategy.ts +++ b/ts-client/src/contractLib/dropStrategy.ts @@ -134,7 +134,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -180,10 +180,12 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropToken.ts b/ts-client/src/contractLib/dropToken.ts index c2f36e41..bea0d4fb 100644 --- a/ts-client/src/contractLib/dropToken.ts +++ b/ts-client/src/contractLib/dropToken.ts @@ -150,7 +150,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -190,18 +190,22 @@ export class Client { } mint = async(sender:string, args: MintArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { mint: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.mintMsg(args), fee || "auto", memo, funds); } + mintMsg = (args: MintArgs): { mint: MintArgs } => { return { mint: args }; } burn = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { burn: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.burnMsg(), fee || "auto", memo, funds); } + burnMsg = (): { burn: {} } => { return { burn: {} } } setTokenMetadata = async(sender:string, args: SetTokenMetadataArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { set_token_metadata: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.setTokenMetadataMsg(args), fee || "auto", memo, funds); } + setTokenMetadataMsg = (args: SetTokenMetadataArgs): { set_token_metadata: SetTokenMetadataArgs } => { return { set_token_metadata: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropValidatorsSet.ts b/ts-client/src/contractLib/dropValidatorsSet.ts index 0b57c962..73882a52 100644 --- a/ts-client/src/contractLib/dropValidatorsSet.ts +++ b/ts-client/src/contractLib/dropValidatorsSet.ts @@ -235,7 +235,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -281,22 +281,27 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } updateValidators = async(sender:string, args: UpdateValidatorsArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_validators: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateValidatorsMsg(args), fee || "auto", memo, funds); } + updateValidatorsMsg = (args: UpdateValidatorsArgs): { update_validators: UpdateValidatorsArgs } => { return { update_validators: args }; } updateValidatorsInfo = async(sender:string, args: UpdateValidatorsInfoArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_validators_info: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateValidatorsInfoMsg(args), fee || "auto", memo, funds); } + updateValidatorsInfoMsg = (args: UpdateValidatorsInfoArgs): { update_validators_info: UpdateValidatorsInfoArgs } => { return { update_validators_info: args }; } updateValidatorsVoting = async(sender:string, args: UpdateValidatorsVotingArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_validators_voting: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateValidatorsVotingMsg(args), fee || "auto", memo, funds); } + updateValidatorsVotingMsg = (args: UpdateValidatorsVotingArgs): { update_validators_voting: UpdateValidatorsVotingArgs } => { return { update_validators_voting: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/src/contractLib/dropValidatorsStats.ts b/ts-client/src/contractLib/dropValidatorsStats.ts index 59f60ae1..9ce98875 100644 --- a/ts-client/src/contractLib/dropValidatorsStats.ts +++ b/ts-client/src/contractLib/dropValidatorsStats.ts @@ -75,7 +75,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -118,6 +118,7 @@ export class Client { } registerStatsQueries = async(sender:string, args: RegisterStatsQueriesArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { register_stats_queries: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.registerStatsQueriesMsg(args), fee || "auto", memo, funds); } + registerStatsQueriesMsg = (args: RegisterStatsQueriesArgs): { register_stats_queries: RegisterStatsQueriesArgs } => { return { register_stats_queries: args }; } } diff --git a/ts-client/src/contractLib/dropWithdrawalManager.ts b/ts-client/src/contractLib/dropWithdrawalManager.ts index 2f94f180..e83e0abc 100644 --- a/ts-client/src/contractLib/dropWithdrawalManager.ts +++ b/ts-client/src/contractLib/dropWithdrawalManager.ts @@ -137,7 +137,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -180,22 +180,27 @@ export class Client { } updateConfig = async(sender:string, args: UpdateConfigArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_config: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateConfigMsg(args), fee || "auto", memo, funds); } + updateConfigMsg = (args: UpdateConfigArgs): { update_config: UpdateConfigArgs } => { return { update_config: args }; } receiveNft = async(sender:string, args: ReceiveNftArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { receive_nft: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.receiveNftMsg(args), fee || "auto", memo, funds); } + receiveNftMsg = (args: ReceiveNftArgs): { receive_nft: ReceiveNftArgs } => { return { receive_nft: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } pause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { pause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.pauseMsg(), fee || "auto", memo, funds); } + pauseMsg = (): { pause: {} } => { return { pause: {} } } unpause = async(sender: string, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { unpause: {} }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.unpauseMsg(), fee || "auto", memo, funds); } + unpauseMsg = (): { unpause: {} } => { return { unpause: {} } } } diff --git a/ts-client/src/contractLib/dropWithdrawalVoucher.ts b/ts-client/src/contractLib/dropWithdrawalVoucher.ts index 2e111e99..70655582 100644 --- a/ts-client/src/contractLib/dropWithdrawalVoucher.ts +++ b/ts-client/src/contractLib/dropWithdrawalVoucher.ts @@ -377,7 +377,7 @@ export class Client { this.client = client; this.contractAddress = contractAddress; } - mustBeSigningClient() { + mustBeSigningClient(): Error { return new Error("This client is not a SigningCosmWasmClient"); } static async instantiate( @@ -453,42 +453,52 @@ export class Client { } transferNft = async(sender:string, args: TransferNftArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { transfer_nft: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.transferNftMsg(args), fee || "auto", memo, funds); } + transferNftMsg = (args: TransferNftArgs): { transfer_nft: TransferNftArgs } => { return { transfer_nft: args }; } sendNft = async(sender:string, args: SendNftArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { send_nft: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.sendNftMsg(args), fee || "auto", memo, funds); } + sendNftMsg = (args: SendNftArgs): { send_nft: SendNftArgs } => { return { send_nft: args }; } approve = async(sender:string, args: ApproveArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { approve: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.approveMsg(args), fee || "auto", memo, funds); } + approveMsg = (args: ApproveArgs): { approve: ApproveArgs } => { return { approve: args }; } revoke = async(sender:string, args: RevokeArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { revoke: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.revokeMsg(args), fee || "auto", memo, funds); } + revokeMsg = (args: RevokeArgs): { revoke: RevokeArgs } => { return { revoke: args }; } approveAll = async(sender:string, args: ApproveAllArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { approve_all: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.approveAllMsg(args), fee || "auto", memo, funds); } + approveAllMsg = (args: ApproveAllArgs): { approve_all: ApproveAllArgs } => { return { approve_all: args }; } revokeAll = async(sender:string, args: RevokeAllArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { revoke_all: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.revokeAllMsg(args), fee || "auto", memo, funds); } + revokeAllMsg = (args: RevokeAllArgs): { revoke_all: RevokeAllArgs } => { return { revoke_all: args }; } mint = async(sender:string, args: MintArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { mint: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.mintMsg(args), fee || "auto", memo, funds); } + mintMsg = (args: MintArgs): { mint: MintArgs } => { return { mint: args }; } burn = async(sender:string, args: BurnArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { burn: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.burnMsg(args), fee || "auto", memo, funds); } + burnMsg = (args: BurnArgs): { burn: BurnArgs } => { return { burn: args }; } extension = async(sender:string, args: ExtensionArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { extension: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.extensionMsg(args), fee || "auto", memo, funds); } + extensionMsg = (args: ExtensionArgs): { extension: ExtensionArgs } => { return { extension: args }; } updateOwnership = async(sender:string, args: UpdateOwnershipArgs, fee?: number | StdFee | "auto", memo?: string, funds?: Coin[]): Promise => { if (!isSigningCosmWasmClient(this.client)) { throw this.mustBeSigningClient(); } - return this.client.execute(sender, this.contractAddress, { update_ownership: args }, fee || "auto", memo, funds); + return this.client.execute(sender, this.contractAddress, this.updateOwnershipMsg(args), fee || "auto", memo, funds); } + updateOwnershipMsg = (args: UpdateOwnershipArgs): { update_ownership: UpdateOwnershipArgs } => { return { update_ownership: args }; } } diff --git a/ts-client/yarn.lock b/ts-client/yarn.lock index a79e5ea8..10f6d9a5 100644 --- a/ts-client/yarn.lock +++ b/ts-client/yarn.lock @@ -486,10 +486,10 @@ events "^3.3.0" protobufjs "^7.2.0" -"@neutron-org/contracts2ts@1.4.6": - version "1.4.6" - resolved "https://registry.yarnpkg.com/@neutron-org/contracts2ts/-/contracts2ts-1.4.6.tgz#81b3c8ac675d9ce50ab51da4dfd2a27376b99d3e" - integrity sha512-se2DswFcGoXB2iTK14BJ5FxHSqOPxZRiJZyG7UT8QtIVNeBMogFeUub29zoJUBYpRtoxgQO8OOHF5vBS4hWM/g== +"@neutron-org/contracts2ts@1.5.0": + version "1.5.0" + resolved "https://registry.yarnpkg.com/@neutron-org/contracts2ts/-/contracts2ts-1.5.0.tgz#2e6c926b3526462c2e6c5bba637c9ec404a51e34" + integrity sha512-fxllmcAiAUn7ZZ70Qi0HSJ6Rmj3JdAzo0Zxp4F5eVJ4/cl3uTfDi5uT06147neLXtC/FZtzS8I++Ryt1cfmv0g== dependencies: "@apidevtools/json-schema-ref-parser" "^11.5.4" "@cosmjs/cosmwasm-stargate" "^0.32.4" diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 00000000..fb57ccd1 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,4 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + From 25c6ec32089404667fac8b5f22395dc00df21035 Mon Sep 17 00:00:00 2001 From: keylogic1 <119584546+keylogic1@users.noreply.github.com> Date: Thu, 13 Mar 2025 06:52:01 +0200 Subject: [PATCH 2/2] Update GitHub Actions runners --- .github/workflows/cache.yml | 43 ----------------------------------- .github/workflows/cleanup.yml | 2 +- .github/workflows/pr.yml | 4 ++-- .github/workflows/tests.yml | 38 +++++++++++++++---------------- 4 files changed, 22 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/cache.yml diff --git a/.github/workflows/cache.yml b/.github/workflows/cache.yml deleted file mode 100644 index 80def8fb..00000000 --- a/.github/workflows/cache.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -# yamllint disable rule:line-length -name: Clear cache - -on: - schedule: - - cron: '30 1 * * 1-5' - workflow_dispatch: - -jobs: - job1: - name: Clear Docker - if: always() - runs-on: ${{ matrix.runner_label }} - strategy: - matrix: - runner_label: ${{ fromJSON('["lionco-runner-1", "lionco-runner-2", "lionco-runner-3", "lionco-runner-4", "lionco-runner-5", "lionco-runner-6", "lionco-runner-7", "lionco-runner-8", "lionco-runner-9", "lionco-runner-10"]') }} - steps: - - name: Stop old containers - run: docker ps -q | grep -q . && docker stop $(docker ps -q) -t0 || echo "No containers to stop" - - name: Remove old containers - run: docker ps -a -q | grep -q . && docker rm $(docker ps -a -q) || echo "No containers to remove" - - name: Remove all volumes - run: docker volume ls -q | grep -q . && docker volume rm $(docker volume ls -q) || echo "No volumes to remove" - - name: Delete old images - run: docker system prune --volumes --all --force - job2: - name: Clear workspaces - if: always() - needs: job1 - runs-on: ${{ matrix.runner_label }} - strategy: - matrix: - runner_label: ${{ fromJSON('["lionco-runner-1", "lionco-runner-2", "lionco-runner-3", "lionco-runner-4", "lionco-runner-5", "lionco-runner-6", "lionco-runner-7", "lionco-runner-8", "lionco-runner-9", "lionco-runner-10"]') }} - steps: - - name: Clean Workspace - if: always() - uses: AutoModality/action-clean@v1.1.0 - - uses: xembly/workflow-manager@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - run: clean - verbose: true diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml index fa2ba7cb..11ca9fda 100644 --- a/.github/workflows/cleanup.yml +++ b/.github/workflows/cleanup.yml @@ -42,7 +42,7 @@ on: jobs: del_runs: - runs-on: self-hosted + runs-on: ubicloud-standard-2 steps: - name: Delete workflow runs uses: Mattraks/delete-workflow-runs@v2 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 6d9db1f1..c2a53d6e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,7 +13,7 @@ jobs: # This job only runs for pull request comments name: PR comment if: ${{ github.event.issue.pull_request }} - runs-on: ubuntu-latest + runs-on: ubicloud-standard-2 steps: - name: Send Notification uses: appleboy/telegram-action@master @@ -26,7 +26,7 @@ jobs: pull_requests_and_review: name: Pull request action or review if: ${{ !github.event.issue.pull_request }} - runs-on: ubuntu-latest + runs-on: ubicloud-standard-2 steps: - name: Send Notification uses: appleboy/telegram-action@master diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 40229036..c4ce3e0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ name: tests jobs: clippy: name: Actions - clippy - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - uses: actions/checkout@v4 with: @@ -23,7 +23,7 @@ jobs: - run: cargo clippy --lib --target wasm32-unknown-unknown -- -D warnings coverage: name: Actions - unit tests coverage - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - uses: actions/checkout@v4 with: @@ -59,7 +59,7 @@ jobs: coverage-summary-title: Code Coverage Summary rustfmt: name: Actions - rustfmt - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - uses: actions/checkout@v4 with: @@ -73,7 +73,7 @@ jobs: - run: cargo fmt -- --check unit-test: name: Actions - unit test - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - uses: actions/checkout@v4 with: @@ -89,7 +89,7 @@ jobs: RUST_BACKTRACE: 1 lint-test: name: Actions - integration tests lint - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Setup node uses: actions/setup-node@v4 @@ -104,7 +104,7 @@ jobs: run: cd integration_tests && yarn --ignore-engines && yarn lint images-prepare: name: Actions - images prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -136,7 +136,7 @@ jobs: yarn build-images artifacts-prepare: name: Actions - artifacts prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - uses: actions/checkout@v4 with: @@ -157,7 +157,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -202,7 +202,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -247,7 +247,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -292,7 +292,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -337,7 +337,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -382,7 +382,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -427,7 +427,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -472,7 +472,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -517,7 +517,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -562,7 +562,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -607,7 +607,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L @@ -652,7 +652,7 @@ jobs: needs: - images-prepare - artifacts-prepare - runs-on: self-hosted + runs-on: ubicloud-standard-4 steps: - name: Upgrade docker compose to use v2 run: sudo curl -L