Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[alias]
wasm = "build --target wasm32-unknown-unknown --release --lib"
wasm-debug = "build --target wasm32-unknown-unknown --lib"
wasm-debug = "build --target wasm32-unknown-unknown --lib"
43 changes: 36 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,47 @@ jobs:
protoc --version
- name: Cargo fetch
run: cargo fetch --locked
- name: Build (all targets)
run: cargo build --workspace --all-targets --locked
- name: WASM release build
run: cargo wasm --locked
- name: Tests
run: cargo test --workspace --all-features --all-targets -- --nocapture
run: cargo test -- --nocapture

artifacts:
name: Build Artifacts
runs-on: ubuntu-latest
needs: fmt_lint
steps:
- uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}
targets: wasm32-unknown-unknown
- name: Install protoc
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler
protoc --version
- name: Install wasm-opt
run: cargo install wasm-opt --locked
- name: WASM release build
run: cargo build -p converter --release --target wasm32-unknown-unknown --locked
- name: Artifact (wasm)
run: RUSTFLAGS="-C link-arg=-s" cargo wasm --locked
- name: Optimize WASM artifacts
run: |
mkdir artifacts
for f in target/wasm32-unknown-unknown/release/*.wasm; do
wasm-opt -Os "$f" -o "artifacts/$(basename "$f")"
done
- name: Generate checksums
run: |
cd artifacts
sha256sum -- *.wasm | tee checksums.txt
- name: Artifact (all targets)
if: success()
uses: actions/upload-artifact@v4
with:
name: converter-wasm
path: target/wasm32-unknown-unknown/release/*.wasm
name: converter-artifacts
path: artifacts/*

coverage:
name: Coverage
Expand Down
14 changes: 2 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 34 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,38 @@
[workspace]
members = [
"converter",
"contracts/*",
]
resolver = "2"

[workspace.package]
version = "0.1.0"

[workspace.dependencies]
bech32 = "0.11"
const_format = "0.2"
cw2 = "3"
cw-controllers = "3"
prost = "0.14.1"
cosmwasm-std = { version = "3", features = ["cosmwasm_2_2"] }
cosmwasm-schema = "3"
cw-utils = "3"
serde = { version = "1", features = ["derive"] }
cw-storage-plus = "3"
manifest-std = "0.2.0"
thiserror = "2"
cw-multi-test = { version = "3", features = ["cosmwasm_2_2"] }
rstest = "0.26"
serde_json = "1"
strum_macros = "0.27"

[profile.release.package.converter]
codegen-units = 1
incremental = false

[profile.release]
rpath = false
lto = true
overflow-checks = true
opt-level = 3
debug = false
debug-assertions = false
35 changes: 35 additions & 0 deletions contracts/converter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
name = "converter"
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
description = "A CosmWasm contract for converting between different token standards."
repository = "https://github.com/manifest-network/manifest-contracts"
homepage = "https://manifest.network"
keywords = ["blockchain", "web3", "cosmwasm", "manifest"]

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
bech32 = { workspace = true }
const_format = { workspace = true }
cw2 = { workspace = true }
cw-controllers = { workspace = true }
prost = { workspace = true }
cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
cw-utils = { workspace = true }
serde = { workspace = true }
cw-storage-plus = { workspace = true }
manifest-std = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
cw-multi-test = { workspace = true }
rstest = { workspace = true }
serde_json = { workspace = true }
strum_macros = { workspace = true }

[features]
library = []
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
36 changes: 0 additions & 36 deletions converter/Cargo.toml

This file was deleted.