c79b2cfb78
* first commit of service provider directory contract proof of concept * *added config set on instantiation, *removed greetQuery test function * commit before mapping change * *changed mapping of service to use client address instead of cosmos addr * commit before mapping change * added acl to delete() * added test for acl in delete() * changed whitelist<vec> to standrd_whitelist bool in Service struct * removed old comments and commented out code * rustfmt * wup * wup * Older version of cw-multi-test that works with 1.0.0 * wip * Remove .gitignore * Basic tests for announce and query now works * Restore tests for delete as well * Consolidate tests * Tidy * fmt * Start reworking test helpers * Tidy tests * More test work * More test improvements * More work on tests * Tweaks * Further tests * rustfmt * Add some comments * Initial work on requiring deposit * wip * Work on updating tests for handling funds * Start updating integration tests * Integration tests updated * merge test mods in state * Address review comments * Enable wasm-opt * Unify Result type * consistent amount in error type * WIP: paging output * IndexedMap working * extract to config file * WIP: middle of extracting out types * Extract types * wip * Types now extracted out: * Paged response type too * rustfmt * Start working on switching to cw Admin * Complete switch to Admin * Remove owner from announce msg * remove unused imports * Assert owner * Extract out types to common crate * Fix test compilation * Add query by owner and nym address * Move msg to common crate * rustfmt * tests for service id * service storage tests * state services tests * function rename * tidy * Fix clippy warning * User ServiceId instead and not u32 * Delete by nym address * Emit explicit events * Swap ToString for Display * Move all storage keys to constants.rs * clippy * Test for deleting by name * Tidy integration tests * Remove to_string * Some comments to tests * Integration test for paging * serde snake_csae for NymAddress and ServiceType * Add migrate entry point * Add query contract version * A few more asserts for balance * Make MigrateMsg a struct --------- Co-authored-by: mx <maxhampshire@pm.me>
98 lines
3.4 KiB
Makefile
98 lines
3.4 KiB
Makefile
# Default target
|
|
all: test
|
|
|
|
test: clippy-all cargo-test wasm fmt
|
|
|
|
test-all: test cargo-test-expensive
|
|
|
|
no-clippy: build cargo-test wasm fmt
|
|
|
|
happy: fmt clippy-happy test
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Define targets for a given workspace
|
|
# $(1): name
|
|
# $(2): path to workspace
|
|
# $(3): extra arguments to cargo
|
|
# -----------------------------------------------------------------------------
|
|
define add_cargo_workspace
|
|
|
|
clippy-happy-$(1):
|
|
cargo clippy --manifest-path $(2)/Cargo.toml $(3)
|
|
|
|
clippy-$(1):
|
|
cargo clippy --manifest-path $(2)/Cargo.toml --workspace $(3) -- -D warnings
|
|
|
|
clippy-$(1)-examples:
|
|
cargo clippy --manifest-path $(2)/Cargo.toml --workspace --examples -- -D warnings
|
|
|
|
test-$(1):
|
|
cargo test --manifest-path $(2)/Cargo.toml --workspace
|
|
|
|
test-$(1)-expensive:
|
|
cargo test --manifest-path $(2)/Cargo.toml --workspace -- --ignored
|
|
|
|
build-$(1):
|
|
cargo build --manifest-path $(2)/Cargo.toml --workspace $(3)
|
|
|
|
build-$(1)-examples:
|
|
cargo build --manifest-path $(2)/Cargo.toml --workspace --examples
|
|
|
|
fmt-$(1):
|
|
cargo fmt --manifest-path $(2)/Cargo.toml --all
|
|
|
|
clippy-happy: clippy-happy-$(1)
|
|
clippy-all: clippy-$(1) clippy-$(1)-examples
|
|
cargo-test: test-$(1)
|
|
cargo-test-expensive: test-$(1)-expensive
|
|
build: build-$(1) build-$(1)-examples
|
|
fmt: fmt-$(1)
|
|
|
|
endef
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Rust workspaces
|
|
# -----------------------------------------------------------------------------
|
|
|
|
# Generate targets for the various cargo workspaces
|
|
|
|
$(eval $(call add_cargo_workspace,main,.))
|
|
$(eval $(call add_cargo_workspace,contracts,contracts,--target wasm32-unknown-unknown))
|
|
$(eval $(call add_cargo_workspace,wasm-client,clients/webassembly,--target wasm32-unknown-unknown))
|
|
$(eval $(call add_cargo_workspace,wallet,nym-wallet,))
|
|
$(eval $(call add_cargo_workspace,connect,nym-connect/desktop))
|
|
ifndef NYM_NO_MOBILE
|
|
$(eval $(call add_cargo_workspace,connect-mobile,nym-connect/mobile/src-tauri))
|
|
endif
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Convenience targets for crates that are already part of the main workspace
|
|
# -----------------------------------------------------------------------------
|
|
|
|
build-explorer-api:
|
|
cargo build -p explorer-api
|
|
|
|
build-nym-cli:
|
|
cargo build -p nym-cli --release
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Misc
|
|
# -----------------------------------------------------------------------------
|
|
|
|
wasm:
|
|
RUSTFLAGS='-C link-arg=-s' cargo build --manifest-path contracts/Cargo.toml --release --target wasm32-unknown-unknown
|
|
wasm-opt --disable-sign-ext -Os contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm -o contracts/target/wasm32-unknown-unknown/release/vesting_contract.wasm
|
|
wasm-opt --disable-sign-ext -Os contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm -o contracts/target/wasm32-unknown-unknown/release/mixnet_contract.wasm
|
|
wasm-opt --disable-sign-ext -Os contracts/target/wasm32-unknown-unknown/release/nym_service_provider_directory.wasm -o contracts/target/wasm32-unknown-unknown/release/nym_service_provider_directory.wasm
|
|
|
|
# NOTE: this seems deprecated an not needed anymore?
|
|
mixnet-opt: wasm
|
|
cd contracts/mixnet && make opt
|
|
|
|
generate-typescript:
|
|
cd tools/ts-rs-cli && cargo run && cd ../..
|
|
yarn types:lint:fix
|
|
|
|
run-api-tests:
|
|
cd nym-api/tests/functional_test && yarn test:qa
|