Skip to content

Commit

Permalink
feat: update namada to 0.11.0 (anoma#158)
Browse files Browse the repository at this point in the history
* fix: shared build

* feat: update wasms

* refactor: cleanup
  • Loading branch information
mateuszjasiuk authored Dec 7, 2022
1 parent cf1e98d commit a43ce14
Show file tree
Hide file tree
Showing 18 changed files with 443 additions and 409 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
822 changes: 423 additions & 399 deletions packages/shared/lib/Cargo.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion packages/shared/lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ getrandom = { version = "0.2.7", features = ["js"] }
gloo-utils = { version = "0.1.5", features = ["serde"] }
js-sys = "0.3.60"
masp_primitives = { git = "https://github.com/anoma/masp", rev = "bee40fc465f6afbd10558d12fe96eb1742eee45c" }
namada = {git = "https://github.com/anoma/namada", branch = "ray/masp-testnet-n002", features = ["rand", "ferveo-tpke"]}
namada = {git = "https://github.com/anoma/namada", tag = "v0.11.0", features = ["ferveo-tpke"]}
prost = "0.9.0"
prost-types = "0.9.0"
rand = "0.8.5"
Expand All @@ -30,6 +30,13 @@ wasm-bindgen = "0.2.83"
wasm-bindgen-test = "0.3.13"

[patch.crates-io]
funty = { git = "https://github.com/ferrilab/funty.git", rev = "7ef0d890fbcd8b3def1635ac1a877fc298488446" }
# patched to a commit on the `eth-bridge-integration` branch of our fork
ibc = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "f4703dfe2c1f25cc431279ab74f10f3e0f6827e2"}
ibc-proto = {git = "https://github.com/heliaxdev/ibc-rs.git", rev = "f4703dfe2c1f25cc431279ab74f10f3e0f6827e2"}
tendermint = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}
tendermint-proto = {git = "https://github.com/heliaxdev/tendermint-rs.git", rev = "e6c684731f21bffd89886d3e91074b96aee074ba"}

borsh = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
borsh-derive = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
borsh-derive-internal = {git = "https://github.com/heliaxdev/borsh-rs.git", rev = "cd5223e5103c4f139e0c54cf8259b7ec5ec4073a"}
Expand Down
6 changes: 4 additions & 2 deletions packages/shared/lib/src/ibc_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ use namada::ibc::{
timestamp::Timestamp,
tx_msg::Msg,
};
use namada::ibc_proto::cosmos::base::v1beta1::Coin;
use namada::ibc_proto::{
cosmos::base::v1beta1::Coin,
google::protobuf::Any
};
use namada::types::token;
use core::ops::Add;
use core::time::Duration;
Expand All @@ -18,7 +21,6 @@ use borsh::{BorshSerialize, BorshDeserialize};
use std::str::FromStr;
use gloo_utils::format::JsValueSerdeExt;
use prost::Message;
use prost_types::Any;
use wasm_bindgen::prelude::*;

#[wasm_bindgen]
Expand Down
1 change: 1 addition & 0 deletions packages/shared/lib/src/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ impl Transfer {
source,
target,
token,
sub_prefix: None,
amount,
key,
shielded,
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/lib/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub fn get_timestamp() -> DateTimeUtc {
let min: u32 = now.get_utc_minutes();
let sec: u32 = now.get_utc_seconds();

let utc = Utc.ymd(year, month, day).and_hms(hour, min, sec);
let utc = Utc.with_ymd_and_hms(year, month, day, hour, min, sec).unwrap();
DateTimeUtc(utc)
}

Expand Down
12 changes: 6 additions & 6 deletions packages/types/src/tx/wasm/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* eslint-disable max-len */
export enum TxWasm {
InitAccount = "tx_init_account.471ba8fa277ba422bbfdddb513e7c7b97dcb3d278e31a2abb5ce4795bc7a869a.wasm",
Transfer = "tx_transfer.6abb9fa97316134671477fd980f109a1751a9cae4eaa245fdd9775d400943523.wasm",
IBC = "tx_ibc.24138bc1574c483e3472fe78b2da2fcce05310904d2cecd84f5156171dc96fbd.wasm",
InitAccount = "tx_init_account.e0a3d18ec8b373366a6c19bfd91784d011a076ba5acb13063c7644ae3881c1c4.wasm",
Transfer = "tx_transfer.410f2e3d5d98815ce4d30e4895a8d2902087f370f9c24b20c575f4fcb4b6bbd0.wasm",
IBC = "tx_ibc.13b28479e6dd07f91749fb782752c2c59e9a4e6720e22f5e77417f8e92152819.wasm",
}

export enum VpWasm {
User = "vp_user.eb918add9dd36797e6420affda3b1e768b6bc7f3f8a2610591213d5fc7154090.wasm",
Token = "vp_token.b8ab23243f793722bad4a627415e30a1ffeb5acdee6f8838b132af3bb09e1b59.wasm",
Masp = "vp_masp.1a8cfe1811fd2842f374913611eadc6f0ba9c890ccdaabf0e7c2861e6db2ad7f.wasm",
User = "vp_user.3e1a72d8c71c7befb2dadaa4215560e711b3e3f1ec612c3e10ae56658dc29f14.wasm",
Token = "vp_token.8f0ae2a307a883c25e73c77a0aac99b8a927d03682b9e88b75be3036eb7468de.wasm",
Masp = "vp_masp.4e83d20336fb56650d7b7a6669b368864f1a0a70498ff4e1767edccf49a97392.wasm",
}

0 comments on commit a43ce14

Please sign in to comment.