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

plug in clock to modules #22

Merged
merged 1 commit into from
Jul 6, 2023
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
20 changes: 20 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 @@ -32,6 +32,7 @@ covenant-lp = { path = "contracts/lper" }
covenant-clock-derive = { path = "packages/clock-derive" }
covenant-ls = { path = "contracts/ls" }
cw-fifo = { path = "packages/cw-fifo" }
clock-derive = { path = "packages/clock-derive" }

# the sha2 version here is the same as the one used by
# cosmwasm-std. when bumping cosmwasm-std, this should also be
Expand Down
18 changes: 18 additions & 0 deletions contracts/clock/src/helpers.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use crate::msg::ExecuteMsg::{Dequeue, Enqueue};
use cosmwasm_std::{to_binary, StdResult, WasmMsg};

pub fn enqueue_msg(addr: &str) -> StdResult<WasmMsg> {
Ok(WasmMsg::Execute {
contract_addr: addr.to_string(),
msg: to_binary(&Enqueue {})?,
funds: vec![],
})
}

pub fn dequeue_msg(addr: &str) -> StdResult<WasmMsg> {
Ok(WasmMsg::Execute {
contract_addr: addr.to_string(),
msg: to_binary(&Dequeue {})?,
funds: vec![],
})
}
1 change: 1 addition & 0 deletions contracts/clock/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pub mod contract;
pub mod error;
pub mod msg;
pub mod state;
pub mod helpers;

#[cfg(test)]
mod suite_tests;
69 changes: 35 additions & 34 deletions contracts/depositor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,59 @@
[package]
name = "covenant-depositor"
edition = { workspace = true }
authors = ["benskey [email protected]"]
name = "covenant-depositor"
edition = { workspace = true }
authors = ["benskey [email protected]"]
description = "Depositor module for stride covenant"
license = { workspace = true }
repository = { workspace = true }
version = { workspace = true }
license = { workspace = true }
repository = { workspace = true }
version = { workspace = true }

exclude = [
"contract.wasm",
"hash.txt",
]


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


[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []

[profile.release]
opt-level = 3
debug = true
rpath = false
lto = true
opt-level = 3
debug = true
rpath = false
lto = true
debug-assertions = false
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true
codegen-units = 1
panic = 'abort'
incremental = false
overflow-checks = true

[dependencies]
cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = { workspace = true }
cw2 = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
sha2 = { workspace = true }
neutron-sdk = { workspace = true }
covenant-clock-derive = { workspace = true }
covenant-clock = { workspace = true }

cosmwasm-schema = { workspace = true }
cosmwasm-std = { workspace = true }
cw-storage-plus = { workspace = true }
cw-utils = { workspace = true }
cw2 = { workspace = true }
serde = { workspace = true }
thiserror = { workspace = true }
sha2 = { workspace = true }
neutron-sdk = { workspace = true }
cosmos-sdk-proto = { workspace = true }
protobuf = { workspace = true }
schemars = { workspace = true }
serde-json-wasm = { workspace = true }
base64 = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
bech32 ={ workspace = true }
protobuf = { workspace = true }
schemars = { workspace = true }
serde-json-wasm = { workspace = true }
base64 = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
bech32 = { workspace = true }

[dev-dependencies]
cw-multi-test = { workspace = true }
anyhow = { workspace = true }
cw-multi-test = { workspace = true }
anyhow = { workspace = true }
Loading