Skip to content

Commit

Permalink
Merge branch 'main' of github.com:neutron-org/neutron-dev-contracts i…
Browse files Browse the repository at this point in the history
…nto feat/refactor-icq-module-documentation
  • Loading branch information
sotnikov-s committed Oct 31, 2024
2 parents 9016bd1 + f81c62d commit 08f2c54
Show file tree
Hide file tree
Showing 79 changed files with 1,185 additions and 4,365 deletions.
373 changes: 178 additions & 195 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
members = [
"contracts/balance-tracker",
"contracts/before-send-hook",
"contracts/client_updater",
"contracts/cron",
"contracts/dex",
"contracts/dex_grpc",
"contracts/echo",
"contracts/grpc_querier",
Expand Down Expand Up @@ -34,7 +32,8 @@ overflow-checks = true

[workspace.dependencies]
neutron-sdk = { package = "neutron-sdk", git = "https://github.com/neutron-org/neutron-sdk", branch = "main" }
neutron-std = { git = "https://github.com/neutron-org/neutron-std", branch = "feat/clean-bindings" }
neutron-std = { git = "https://github.com/neutron-org/neutron-std", branch = "main" }

prost = "0.12.4"
prost-types = "0.12.4"
cosmos-sdk-proto = { version = "0.20.0", default-features = false }
Expand Down
1 change: 0 additions & 1 deletion contracts/balance-tracker/.cargo/config
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib"
integration-test = "test --test integration"
schema = "run --example tokenfactory_tracker_schema"
6 changes: 0 additions & 6 deletions contracts/client_updater/.cargo/config

This file was deleted.

31 changes: 0 additions & 31 deletions contracts/client_updater/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions contracts/client_updater/README.md

This file was deleted.

29 changes: 0 additions & 29 deletions contracts/client_updater/examples/client_updater-schema.rs

This file was deleted.

39 changes: 0 additions & 39 deletions contracts/client_updater/schema/execute_msg.json

This file was deleted.

6 changes: 0 additions & 6 deletions contracts/client_updater/schema/instantiate_msg.json

This file was deleted.

78 changes: 0 additions & 78 deletions contracts/client_updater/src/contract.rs

This file was deleted.

1 change: 0 additions & 1 deletion contracts/client_updater/src/lib.rs

This file was deleted.

74 changes: 0 additions & 74 deletions contracts/client_updater/updater.sh

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasm = "build --release --target wasm32-unknown-unknown"
wasm-debug = "build --target wasm32-unknown-unknown"
unit-test = "test --lib"
integration-test = "test --test integration"
schema = "run --example schema"
schema = "run --example schema"
14 changes: 7 additions & 7 deletions contracts/cron/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::msg::{ExecuteMsg, InstantiateMsg, QueryMsg};
use crate::state::{BEGIN_BLOCKER_SHEDULES, END_BLOCKER_SHEDULES};
use crate::state::{BEGIN_BLOCKER_SCHEDULES, END_BLOCKER_SCHEDULES};
use cosmwasm_std::{
entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdError,
StdResult,
Expand Down Expand Up @@ -34,24 +34,24 @@ pub fn execute(deps: DepsMut, _: Env, info: MessageInfo, msg: ExecuteMsg) -> Std

match msg {
ExecuteMsg::AddBeginBlockerSchedule { name } => {
let counter = BEGIN_BLOCKER_SHEDULES
let counter = BEGIN_BLOCKER_SCHEDULES
.may_load(deps.storage, name.clone())?
.unwrap_or_default()
.checked_add(1)
.unwrap_or_default();

BEGIN_BLOCKER_SHEDULES.save(deps.storage, name, &counter)?;
BEGIN_BLOCKER_SCHEDULES.save(deps.storage, name, &counter)?;

Ok(Response::default())
}
ExecuteMsg::AddEndBlockerSchedule { name } => {
let counter = END_BLOCKER_SHEDULES
let counter = END_BLOCKER_SCHEDULES
.may_load(deps.storage, name.clone())?
.unwrap_or_default()
.checked_add(1)
.unwrap_or_default();

END_BLOCKER_SHEDULES.save(deps.storage, name, &counter)?;
END_BLOCKER_SCHEDULES.save(deps.storage, name, &counter)?;

Ok(Response::default())
}
Expand All @@ -62,11 +62,11 @@ pub fn execute(deps: DepsMut, _: Env, info: MessageInfo, msg: ExecuteMsg) -> Std
pub fn query(deps: Deps, _: Env, msg: QueryMsg) -> StdResult<Binary> {
match msg {
QueryMsg::GetBeginBlockerScheduleCounter { name } => {
let res = BEGIN_BLOCKER_SHEDULES.may_load(deps.storage, name)?;
let res = BEGIN_BLOCKER_SCHEDULES.may_load(deps.storage, name)?;
to_json_binary(&res)
}
QueryMsg::GetEndBlockerScheduleCounter { name } => {
let res = END_BLOCKER_SHEDULES.may_load(deps.storage, name)?;
let res = END_BLOCKER_SCHEDULES.may_load(deps.storage, name)?;
to_json_binary(&res)
}
}
Expand Down
4 changes: 2 additions & 2 deletions contracts/cron/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cw_storage_plus::Map;

pub const BEGIN_BLOCKER_SHEDULES: Map<String, u64> = Map::new("begin_blocker_shedules");
pub const END_BLOCKER_SHEDULES: Map<String, u64> = Map::new("end_blocker_shedules");
pub const BEGIN_BLOCKER_SCHEDULES: Map<String, u64> = Map::new("begin_blocker_shedules");
pub const END_BLOCKER_SCHEDULES: Map<String, u64> = Map::new("end_blocker_shedules");
Loading

0 comments on commit 08f2c54

Please sign in to comment.