Skip to content

Commit

Permalink
push ibc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
quaisx committed Jun 28, 2024
1 parent 279b315 commit 3bc817f
Show file tree
Hide file tree
Showing 6 changed files with 161 additions and 113 deletions.
5 changes: 4 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,7 @@ module.exports = {
verbose: true,
modulePathIgnorePatterns: ["dist", "scripts"],
globalSetup: "<rootDir>/test/globalSetup.ts",
};
// moduleNameMapper: {
// "^axios$": "axios/dist/node/axios.cjs"
// }
};
19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
"gen-docs": "typedoc"
},
"dependencies": {
"@cosmjs/encoding": "0.27.1",
"@cosmjs/math": "0.27.1",
"@cosmjs/encoding": "0.32.3",
"@cosmjs/math": "0.32.3",
"@noble/hashes": "1.0.0",
"@noble/secp256k1": "1.7.0",
"bech32": "2.0.0",
Expand All @@ -47,19 +47,20 @@
"secure-random": "1.1.2"
},
"devDependencies": {
"@confio/relayer": "0.7.0",
"@cosmjs/proto-signing": "^0.29.5",
"@cosmjs/stargate": "0.29.4",
"@cosmjs/crypto": "0.29.4",
"@types/jest": "27.4.0",
"@babel/preset-typescript": "^7.24.7",
"@confio/relayer": "0.12.0",
"@cosmjs/crypto": "0.32.3",
"@cosmjs/proto-signing": "^0.32.3",
"@cosmjs/stargate": "0.32.3",
"@types/jest": "29.5.12",
"@types/node": "18.11.2",
"@types/pako": "1.0.3",
"@types/secure-random": "1.1.0",
"jest": "27.4.7",
"jest": "29.7.0",
"node-polyfill-webpack-plugin": "1.1.4",
"prettier": "2.5.1",
"sinon": "14.0.0",
"ts-jest": "27.1.3",
"ts-jest": "29.1.5",
"ts-loader": "9.2.6",
"ts-node": "^10.7.0",
"ts-proto": "1.178.0",
Expand Down
8 changes: 5 additions & 3 deletions src/tx/compute.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { toBase64, Bech32 } from "@cosmjs/encoding";
import { toBase64, fromBech32 } from "@cosmjs/encoding";
import { MsgParams } from ".";
import { EncryptionUtils } from "..";
import { addressToBytes, is_gzip } from "../utils";
Expand Down Expand Up @@ -58,7 +58,8 @@ export class MsgInstantiateContract implements Msg {
code_hash,
admin,
}: MsgInstantiateContractParams) {
this.sender = Bech32.decode(sender).data;
//this.sender = Bech32.decode(sender).data;
this.sender = fromBech32(sender).data;
this.sender_address = String(sender);
this.codeId = String(code_id);
this.label = label;
Expand Down Expand Up @@ -180,7 +181,8 @@ export class MsgExecuteContract<T extends object> implements Msg {
sent_funds: sentFunds,
code_hash: codeHash,
}: MsgExecuteContractParams<T>) {
this.sender = Bech32.decode(sender).data;
// this.sender = Bech32.decode(sender).data;
this.sender = fromBech32(sender).data;
this.sender_address = String(sender);
this.contractAddress = contractAddress;
this.msg = msg;
Expand Down
Binary file modified test/cw20-ics20.wasm.gz
Binary file not shown.
Loading

0 comments on commit 3bc817f

Please sign in to comment.