Skip to content

Commit

Permalink
fix: add graph and point to deploy lists
Browse files Browse the repository at this point in the history
  • Loading branch information
SlayerAnsh committed Jan 7, 2025
1 parent 4531c89 commit bb82b89
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions contracts/math/andromeda-graph/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,7 @@ andromeda-std = { workspace = true }
andromeda-math = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
cw-orch = { workspace = true }
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }

15 changes: 14 additions & 1 deletion contracts/math/andromeda-graph/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{attr, ensure, Binary, Deps, DepsMut, Env, MessageInfo, Response, Storage};
use cosmwasm_std::{
attr, ensure, Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError, Storage,
};

use andromeda_math::graph::{
Coordinate, CoordinateInfo, ExecuteMsg, GetAllPointsResponse, GetMapInfoResponse,
Expand Down Expand Up @@ -420,3 +422,14 @@ pub fn get_user_coordinate(deps: Deps, user: AndrAddr) -> Result<CoordinateInfo,
pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
ADOContract::default().migrate(deps, CONTRACT_NAME, CONTRACT_VERSION)
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> Result<Response, ContractError> {
if msg.result.is_err() {
return Err(ContractError::Std(StdError::generic_err(
msg.result.unwrap_err(),
)));
}

Ok(Response::default())
}
6 changes: 6 additions & 0 deletions contracts/math/andromeda-graph/src/interface.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use andromeda_math::graph::{ExecuteMsg, InstantiateMsg, QueryMsg};
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata};

pub const CONTRACT_ID: &str = "graph";

contract_interface!(GraphContract, CONTRACT_ID, "andromeda_graph.wasm");
5 changes: 5 additions & 0 deletions contracts/math/andromeda-graph/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,8 @@ pub mod mock;

#[cfg(test)]
mod testing;

#[cfg(not(target_arch = "wasm32"))]
mod interface;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::interface::GraphContract;
1 change: 1 addition & 0 deletions contracts/math/andromeda-point/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,6 @@ andromeda-std = { workspace = true, features = ["rates"] }
andromeda-math = { workspace = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
cw-orch = { workspace = true }
cw-multi-test = { workspace = true, optional = true }
andromeda-testing = { workspace = true, optional = true }
13 changes: 12 additions & 1 deletion contracts/math/andromeda-point/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Response};
use cosmwasm_std::{Binary, Deps, DepsMut, Env, MessageInfo, Reply, Response, StdError};

use crate::{
execute::handle_execute,
Expand Down Expand Up @@ -72,3 +72,14 @@ pub fn query(deps: Deps, env: Env, msg: QueryMsg) -> Result<Binary, ContractErro
pub fn migrate(deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
ADOContract::default().migrate(deps, CONTRACT_NAME, CONTRACT_VERSION)
}

#[cfg_attr(not(feature = "library"), entry_point)]
pub fn reply(_deps: DepsMut, _env: Env, msg: Reply) -> Result<Response, ContractError> {
if msg.result.is_err() {
return Err(ContractError::Std(StdError::generic_err(
msg.result.unwrap_err(),
)));
}

Ok(Response::default())
}
6 changes: 6 additions & 0 deletions contracts/math/andromeda-point/src/interface.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
use andromeda_math::point::{ExecuteMsg, InstantiateMsg, QueryMsg};
use andromeda_std::{ado_base::MigrateMsg, contract_interface, deploy::ADOMetadata};

pub const CONTRACT_ID: &str = "point";

contract_interface!(PointContract, CONTRACT_ID, "andromeda_point.wasm");
5 changes: 5 additions & 0 deletions contracts/math/andromeda-point/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,8 @@ mod state;

#[cfg(test)]
mod testing;

#[cfg(not(target_arch = "wasm32"))]
mod interface;
#[cfg(not(target_arch = "wasm32"))]
pub use crate::interface::PointContract;
2 changes: 2 additions & 0 deletions packages/deploy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ andromeda-curve = { path = "../../contracts/math/andromeda-curve" }
andromeda-distance = { path = "../../contracts/math/andromeda-distance" }
andromeda-date-time = { path = "../../contracts/math/andromeda-date-time" }
andromeda-shunting = { path = "../../contracts/math/andromeda-shunting" }
andromeda-graph = { path = "../../contracts/math/andromeda-graph" }
andromeda-point = { path = "../../contracts/math/andromeda-point" }

andromeda-std = { workspace = true }
env_logger = "0.11.5"
Expand Down
4 changes: 4 additions & 0 deletions packages/deploy/src/contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ use andromeda_cw20_staking::CW20StakingContract;
use andromeda_cw721::CW721Contract;
use andromeda_distance::DistanceContract;
use andromeda_economics::EconomicsContract;
use andromeda_graph::GraphContract;
use andromeda_ibc_registry::IBCRegistryContract;
use andromeda_kernel::KernelContract;
use andromeda_lockdrop::LockdropContract;
Expand All @@ -31,6 +32,7 @@ use andromeda_validator_staking::ValidatorStakingContract;
use andromeda_vesting::VestingContract;
use andromeda_vfs::VFSContract;
use andromeda_weighted_distribution_splitter::WeightedDistributionSplitterContract;
use andromeda_point::PointContract;

use cw_orch::prelude::*;
use cw_orch_daemon::{DaemonBase, Wallet};
Expand Down Expand Up @@ -84,6 +86,8 @@ pub fn all_contracts() -> Vec<DeployableContract> {
deployable!(CrowdfundContract),
deployable!(MarketplaceContract),
deployable!(DistanceContract),
deployable!(GraphContract),
deployable!(PointContract),
]
}

Expand Down

0 comments on commit bb82b89

Please sign in to comment.