Skip to content

Commit

Permalink
Merge pull request #31 from ixofoundation/develop
Browse files Browse the repository at this point in the history
fix: upgrade cosmjs to 0.29 and fix custom clients
  • Loading branch information
Michael-Ixo authored Apr 14, 2023
2 parents c933c72 + bb64969 commit 6cd5afd
Show file tree
Hide file tree
Showing 491 changed files with 5,990 additions and 14,799 deletions.
10 changes: 10 additions & 0 deletions __tests__/flows/quickQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ export const quickQueries = () =>
// expect(res).toBeTruthy();
// });

// test("Query user feegrant", async () => {
// const address = (await getUser(WalletUsers.alice).getAccounts())[0]
// .address;
// const res = await queryClient.cosmos.feegrant.v1beta1.allowances({
// grantee: address,
// });
// console.log(res.allowances);
// expect(res).toBeTruthy();
// });

// test("query wasm contract 1155 state", async () => {
// const user = (await getUser(WalletUsers.tester).getAccounts())[0].address;
// const contractAddress =
Expand Down
13 changes: 8 additions & 5 deletions __tests__/helpers/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,15 @@ export const sendFaucet = async (address: string) => {
return await axios.get(faucetUrl);
};

export type wallet = {
ed: ReturnType<typeof getEdClient>;
secp: ReturnType<typeof getEdClient>;
export type EdClient = ReturnType<typeof getEdClient>;
export type SecpClient = Awaited<ReturnType<typeof getSecpClient>>;

export type Wallet = {
ed: EdClient;
secp: SecpClient;
};

export let wallets: { [key in WalletUsers]: wallet };
export let wallets: { [key in WalletUsers]: Wallet };

export const generateWallets = async (log = true) => {
let generatedWallets = {};
Expand Down Expand Up @@ -107,7 +110,7 @@ export const getUser = (
) => wallets[user][walletKeyType];

export const createClient = async (
offlineWallet: ReturnType<typeof getEdClient> = getUser(),
offlineWallet: SecpClient | EdClient = getUser(),
ignoreGetSequence?: boolean
) => {
return createSigningClient(
Expand Down
5 changes: 4 additions & 1 deletion __tests__/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require("dotenv").config();

import { StdFee } from "@cosmjs/stargate";
import { utils } from "./common";

export const RPC_URL = process.env.RPC_URL || "https://devnet.ixo.earth/rpc/";
Expand Down Expand Up @@ -49,12 +50,14 @@ export const generateNewConstant = async (constant: keyof typeof constants) => {
return newConstant;
};

export const fee = {
export const fee: StdFee = {
amount: [
{
denom: "uixo",
amount: "100000",
},
],
gas: "4000000",
// if wana do transactions using feegrant granter address
// granter: "ixo1n8yrmeatsk74dw0zs95ess9sgzptd6thgjgcj2",
};
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

154 changes: 23 additions & 131 deletions docs/classes/SigningStargateClient.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/functions/createSigningClient.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> ignoreGetSequence: <sp
<h5><code class="tsd-tag ts-flagOptional">Optional</code> options: <a href="../interfaces/SigningStargateClientOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SigningStargateClientOptions</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../classes/SigningStargateClient.html" class="tsd-signature-type" data-tsd-kind="Class">SigningStargateClient</a><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:419</li></ul></aside></li></ul></section></div>
<li>Defined in stargate_client/customClient.ts:336</li></ul></aside></li></ul></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
14 changes: 7 additions & 7 deletions docs/interfaces/SigningStargateClientOptions.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">SigningStargateClientOptions</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:45</li></ul></aside>
<li>Defined in stargate_client/customClient.ts:33</li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -50,32 +50,32 @@ <h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>amino<wbr/>Types</span><a href="#aminoTypes" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">amino<wbr/>Types<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">AminoTypes</span></div><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:47</li></ul></aside></section>
<li>Defined in stargate_client/customClient.ts:35</li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="broadcastPollIntervalMs" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>broadcast<wbr/>Poll<wbr/>Interval<wbr/>Ms</span><a href="#broadcastPollIntervalMs" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">broadcast<wbr/>Poll<wbr/>Interval<wbr/>Ms<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:50</li></ul></aside></section>
<li>Defined in stargate_client/customClient.ts:38</li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="broadcastTimeoutMs" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>broadcast<wbr/>Timeout<wbr/>Ms</span><a href="#broadcastTimeoutMs" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">broadcast<wbr/>Timeout<wbr/>Ms<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:49</li></ul></aside></section>
<li>Defined in stargate_client/customClient.ts:37</li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="gasPrice" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>gas<wbr/>Price</span><a href="#gasPrice" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">gas<wbr/>Price<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">GasPrice</span></div><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:51</li></ul></aside></section>
<li>Defined in stargate_client/customClient.ts:39</li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="prefix" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>prefix</span><a href="#prefix" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">prefix<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:48</li></ul></aside></section>
<li>Defined in stargate_client/customClient.ts:36</li></ul></aside></section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="registry" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagReadonly">Readonly</code> <span>registry</span><a href="#registry" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<div class="tsd-signature">registry<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Registry</span></div><aside class="tsd-sources">
<ul>
<li>Defined in stargate_client/customClient.ts:46</li></ul></aside></section></section></div>
<li>Defined in stargate_client/customClient.ts:34</li></ul></aside></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
10 changes: 5 additions & 5 deletions docs/variables/cosmos.ClientFactory.html

Large diffs are not rendered by default.

Loading

0 comments on commit 6cd5afd

Please sign in to comment.