diff --git a/.cargo/config b/.cargo/config new file mode 100644 index 00000000..fcf0da7d --- /dev/null +++ b/.cargo/config @@ -0,0 +1,3 @@ +[alias] +wasm = "build --release --lib --target wasm32-unknown-unknown" +wasm-debug = "build --lib --target wasm32-unknown-unknown" diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml new file mode 100644 index 00000000..163c4180 --- /dev/null +++ b/.github/workflows/basic.yml @@ -0,0 +1,76 @@ +# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml + +on: [push, pull_request] + +name: Basic Checks + +jobs: + test: + name: Test Suite + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.65.0 + target: wasm32-unknown-unknown + override: true + + - name: Run build + uses: actions-rs/cargo@v1 + with: + toolchain: 1.65.0 + command: build + args: --workspace + env: + RUST_BACKTRACE: 1 + + - name: Run tests + uses: actions-rs/cargo@v1 + with: + toolchain: 1.65.0 + command: test + args: --workspace + env: + RUST_BACKTRACE: 1 + + - name: Compile WASM contract + uses: actions-rs/cargo@v1 + with: + toolchain: 1.65.0 + command: wasm + env: + RUSTFLAGS: "-C link-arg=-s" + + lints: + name: Lints + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v2 + + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.65.0 + override: true + components: rustfmt, clippy + + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + toolchain: 1.65.0 + command: fmt + args: --all -- --check + + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + toolchain: 1.65.0 + command: clippy + args: --all-targets -- -D warnings diff --git a/contracts/native-staking/Cargo.toml b/contracts/native-staking/Cargo.toml index 0c83dcdb..96347916 100644 --- a/contracts/native-staking/Cargo.toml +++ b/contracts/native-staking/Cargo.toml @@ -18,7 +18,7 @@ library = [] [dependencies] mesh-apis = { workspace = true } -mesh-native-staking-proxy = { workspace = true } +mesh-native-staking-proxy = { workspace = true, features = ["library"] } sylvia = { workspace = true } cosmwasm-schema = { workspace = true } diff --git a/packages/apis/src/local_staking_api.rs b/packages/apis/src/local_staking_api.rs index 5ed1abd7..380b2ef1 100644 --- a/packages/apis/src/local_staking_api.rs +++ b/packages/apis/src/local_staking_api.rs @@ -8,7 +8,6 @@ pub struct MaxSlashResponse { pub max_slash: Decimal, } - /// This is the interface to any local staking contract needed by the vault contract. /// Users will need to use the custom methods to actually manage funds #[interface]