Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lock sync primitives #52

Merged
merged 5 commits into from
Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add new mesh-sync package for locks and other primitives
  • Loading branch information
ethanfrey committed Jun 9, 2023
commit 8302ae99fb3525d4ffe00aedd84cf25776374b83
10 changes: 10 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repository = "https://github.com/osmosis-labs/mesh-security"
mesh-apis = { path = "./packages/apis" }
mesh-bindings = { path = "./packages/bindings" }
mesh-mocks = { path = "./packages/mocks" }
mesh-sync = { path = "./packages/sync" }

mesh-vault = { path = "./contracts/provider/vault" }
mesh-external-staking = { path = "./contracts/provider/external-staking" }
Expand Down
15 changes: 15 additions & 0 deletions packages/sync/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "mesh-sync"
version = { workspace = true }
edition = { workspace = true }
license = { workspace = true }

[dependencies]
cosmwasm-std = { workspace = true }
cosmwasm-schema = { workspace = true }
thiserror = { workspace = true }

[dev-dependencies]
cw-storage-plus = { workspace = true }


14 changes: 14 additions & 0 deletions packages/sync/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}