Skip to content

Commit

Permalink
v0.0.6-rc6 (#57)
Browse files Browse the repository at this point in the history
* some scripts (#50)

* feat: deploy scripts

* refactor

* filter wasm event

* feat: utilties

---------

Co-authored-by: hashableric <hashableric@gmail.com>

* fix: coverage ci (#49)

* try: use llvm cov

* fix

* asdf

* nightly

* test: warp route (#51)

* Revert "revert: aggregate"

This reverts commit 00fe615.

* test(cw20): cw20 init

* test(warp): unit test for cw20

* test(warp): add query test for cw20

* test(warp): remove existing tests for native

* feat(warp): add ownable message

* wip

* test(warp): unit test for native denom

* test: use u32 directly

* fix!(ism): use parsed u32 merkle index

* test: modularize

* test: add empty warp

* test: runnable mailbox

* test: warp placeholder

* test: deployable

* fix(warp): inject minter to cw20

* fix(warp): use consistant event name

* test: warp cw20 / native denom creation

* chore: prune

* feat: aggregation

* schema

* fix: evm equivalence

* fix(hook): pass entire metadata

* fix: aggregate works

* chore: remove debugger

* fix: tests

* clippy

* use aggregate ism on integration test

* feat: migrate to aggregations (#53)

* with proper igp and aggregation

* rc4

* fix: use ethereum-style address scheme (#55)

* set mailbox version to 3

* feat(ism): use ethereum-style address to verify

* feat: add enroll / unenroll test

* refactor: merge into one file

* make test runnable

* test: add case

* fix: with all (#54)

* fix: with all

* broken test

---------

Co-authored-by: byeongsu-hong <hong@byeongsu.dev>

* feat: mailbox as binary

* rc5

* feat: use recovery param from signature

* fix: va test

---------

Co-authored-by: Eric <125242347+hashableric@users.noreply.github.com>
Co-authored-by: hashableric <hashableric@gmail.com>

* feat: use eth_addr

* feat: open testnet deployment

* fix(warp): consideration of igp (#56)

* fix: merkle tree

* fix(warp): gas issue

* fix(warp): use transfer from

* feat(warp): enable migration

* clippy

* feat: scripts

* feat(hook): enable migrate

* build: new code

* chore: addr converter

* fix: inherit ism

* build: migrate

* feat: inheritable ism receiver interface

* fix: hide important files

* rc6

* feat: migratable

* migrate

* fix: remove feature & deploy codes

* feat(warp): make ism configurable

* feat(warp): make hook configurable

* feat(warp): apply hook

* feat: connection client (#58)

* feat: make gas amount none if is zero

* Revert "feat: make gas amount none if is zero"

This reverts commit bac3aa2.

* feat(igp): handle zero gas (#59)

* feat: make gas amount none if is zero

* clean code

* feat: uploading codes to each networks (#60)

* new codes for devnet - dev

* new codes for mainnet - dev

* new codes for devnet / mainnet - prod

* fix: assert addr len (#61)

* fix: assert addr len

* new codes for devnet / mainnet - prod

* fix test

* Deployment scripts (#62)

* Deployment scripts

* chore: use dash case (#63)

* chore: use dash case

* fix: make inject works

---------

Co-authored-by: ByeongSu Hong <hong@byeongsu.dev>

* feat(igp): default gas works (#64)

* feat(igp): default gas works

* fix test

* test(igp): gas config

* feat: new codes

* feat: add migration

* revert: roll back igp-oracle migration

* chore: with migration

* feat: conv rev

* migrate

* feat: add default gas

* feat(igp): add gas query

* feat: store igp

---------

Co-authored-by: hashableric <hashableric@gmail.com>
Co-authored-by: Eric <125242347+hashableric@users.noreply.github.com>
Co-authored-by: Nam Chu Hoai <nambrot@googlemail.com>
  • Loading branch information
4 people committed Nov 1, 2023
1 parent 31d4938 commit 37fea49
Show file tree
Hide file tree
Showing 123 changed files with 5,243 additions and 2,640 deletions.
83 changes: 17 additions & 66 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,50 +9,14 @@ on:
- "main"

jobs:
deps:
name: dependencies
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Load toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown

- run: cargo fetch --verbose
- run: cargo build
- run: cargo wasm

unit-test:
strategy:
fail-fast: true

needs: deps

name: unit-test
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
Expand All @@ -65,45 +29,32 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Load toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: wasm32-unknown-unknown
- name: Install Rust
run: rustup update stable

- name: Install target
run: rustup target add wasm32-unknown-unknown

- run: cargo test --workspace --exclude hpl-tests

coverage:
needs: deps

name: coverage
runs-on: ubuntu-latest
container:
image: xd009642/tarpaulin:develop-nightly
options: --security-opt seccomp=unconfined
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust
run: rustup update nightly

- name: Install target
run: rustup target add wasm32-unknown-unknown

- run: rustup target add wasm32-unknown-unknown
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Generate code coverage
run: |
cargo +nightly tarpaulin \
--verbose \
--workspace --exclude hpl-tests \
--timeout 120 --out Xml
run: cargo llvm-cov --all-features --workspace --exclude hpl-tests --codecov --output-path codecov.json

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ panic = "abort"
rpath = false

[workspace.package]
version = "0.0.6-rc1"
version = "0.0.6-rc6"
authors = [
"byeongsu-hong <hong@byeongsu.dev>",
"Eric <hashableric@gmail.com>",
Expand All @@ -42,7 +42,7 @@ keywords = ["hyperlane", "cosmos", "cosmwasm"]

[workspace.dependencies]
# cosmwasm
cosmwasm-std = { version = "1.2.7", features = ["stargate", "cosmwasm_1_2"] }
cosmwasm-std = { version = "1.2.7", features = ["stargate"] }
cosmwasm-storage = "1.2.7"
cosmwasm-schema = "1.2.7"
cosmwasm-crypto = "1.2.7"
Expand Down Expand Up @@ -109,6 +109,7 @@ hpl-warp-cw20 = { path = "./contracts/warp/cw20" }
hpl-warp-native = { path = "./contracts/warp/native" }

# workspace aliases (./packages)
hpl-connection = { path = "./packages/connection" }
hpl-ownable = { path = "./packages/ownable" }
hpl-pausable = { path = "./packages/pausable" }
hpl-router = { path = "./packages/router" }
Expand Down
7 changes: 6 additions & 1 deletion contracts/core/mailbox/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{Deps, DepsMut, Env, MessageInfo, QueryResponse, Response};
use cosmwasm_std::{Deps, DepsMut, Empty, Env, MessageInfo, QueryResponse, Response};

use hpl_interface::{
core::mailbox::{ExecuteMsg, InstantiateMsg, MailboxHookQueryMsg, MailboxQueryMsg, QueryMsg},
Expand Down Expand Up @@ -87,6 +87,11 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> Result<QueryResponse, Contr
}
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn migrate(_deps: DepsMut, _env: Env, _msg: Empty) -> Result<Response, ContractError> {
Ok(Response::default())
}

#[cfg(test)]
mod test {
use cosmwasm_std::testing::{mock_dependencies, mock_env, mock_info};
Expand Down
7 changes: 5 additions & 2 deletions contracts/core/mailbox/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,12 @@ mod tests {
fn test_process_query_handler(query: &WasmQuery) -> QuerierResult {
match query {
WasmQuery::Smart { contract_addr, msg } => {
if let Ok(req) = cosmwasm_std::from_binary::<ism::IsmSpecifierQueryMsg>(msg) {
if let Ok(req) = cosmwasm_std::from_binary::<ism::ExpectedIsmSpecifierQueryMsg>(msg)
{
match req {
ism::IsmSpecifierQueryMsg::InterchainSecurityModule() => {
hpl_interface::ism::ExpectedIsmSpecifierQueryMsg::IsmSpecifier(
ism::IsmSpecifierQueryMsg::InterchainSecurityModule(),
) => {
return SystemResult::Ok(
cosmwasm_std::to_binary(&ism::InterchainSecurityModuleResponse {
ism: Some(addr("default_ism")),
Expand Down
2 changes: 1 addition & 1 deletion contracts/core/mailbox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ mod state;

pub use crate::error::ContractError;

pub const MAILBOX_VERSION: u8 = 0;
pub const MAILBOX_VERSION: u8 = 3;

// version info for migration info
const CONTRACT_NAME: &str = env!("CARGO_PKG_NAME");
Expand Down

0 comments on commit 37fea49

Please sign in to comment.