Skip to content
Draft
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
43 changes: 0 additions & 43 deletions .github/workflows/cache.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ on:

jobs:
del_runs:
runs-on: self-hosted
runs-on: ubicloud-standard-2
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
# This job only runs for pull request comments
name: PR comment
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
runs-on: ubicloud-standard-2
steps:
- name: Send Notification
uses: appleboy/telegram-action@master
Expand All @@ -26,7 +26,7 @@ jobs:
pull_requests_and_review:
name: Pull request action or review
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
runs-on: ubicloud-standard-2
steps:
- name: Send Notification
uses: appleboy/telegram-action@master
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: tests
jobs:
clippy:
name: Actions - clippy
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -23,7 +23,7 @@ jobs:
- run: cargo clippy --lib --target wasm32-unknown-unknown -- -D warnings
coverage:
name: Actions - unit tests coverage
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
coverage-summary-title: Code Coverage Summary
rustfmt:
name: Actions - rustfmt
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -73,7 +73,7 @@ jobs:
- run: cargo fmt -- --check
unit-test:
name: Actions - unit test
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -89,7 +89,7 @@ jobs:
RUST_BACKTRACE: 1
lint-test:
name: Actions - integration tests lint
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Setup node
uses: actions/setup-node@v4
Expand All @@ -104,7 +104,7 @@ jobs:
run: cd integration_tests && yarn --ignore-engines && yarn lint
images-prepare:
name: Actions - images prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -136,7 +136,7 @@ jobs:
yarn build-images
artifacts-prepare:
name: Actions - artifacts prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -157,7 +157,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -202,7 +202,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -247,7 +247,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -292,7 +292,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -337,7 +337,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -382,7 +382,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -472,7 +472,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -517,7 +517,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -562,7 +562,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -607,7 +607,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down Expand Up @@ -652,7 +652,7 @@ jobs:
needs:
- images-prepare
- artifacts-prepare
runs-on: self-hosted
runs-on: ubicloud-standard-4
steps:
- name: Upgrade docker compose to use v2
run: sudo curl -L
Expand Down
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 @@ -22,6 +22,7 @@ members = [
"contracts/price-provider",
"contracts/validators-stats",
"contracts/validators-set",
"contracts/nft-querier",
"packages/base",
"packages/helpers",
"packages/macros",
Expand Down
2 changes: 1 addition & 1 deletion contracts/factory/src/bin/drop-factory-schema.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use cosmwasm_schema::write_api;
use drop_factory::msg::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};
use drop_staking_base::msg::factory::{ExecuteMsg, InstantiateMsg, MigrateMsg, QueryMsg};

fn main() {
write_api! {
Expand Down
26 changes: 13 additions & 13 deletions contracts/factory/src/contract.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
use crate::{
error::ContractResult,
msg::{
ExecuteMsg, InstantiateMsg, MigrateMsg, ProxyMsg, QueryMsg, UpdateConfigMsg,
ValidatorSetMsg,
},
state::{State, STATE},
};
use cosmwasm_std::{
attr, instantiate2_address, to_json_binary, Attribute, Binary, CodeInfoResponse, CosmosMsg,
Deps, DepsMut, Env, HexBinary, MessageInfo, Response, StdResult, Uint128, WasmMsg,
};
use drop_helpers::answer::response;
use drop_staking_base::state::splitter::Config as SplitterConfig;
use drop_staking_base::{
error::factory::ContractResult,
msg::{
core::{InstantiateMsg as CoreInstantiateMsg, QueryMsg as CoreQueryMsg},
distribution::InstantiateMsg as DistributionInstantiateMsg,
factory::{
ExecuteMsg, InstantiateMsg, MigrateMsg, ProxyMsg, QueryMsg, UpdateConfigMsg,
ValidatorSetMsg,
},
pump::InstantiateMsg as RewardsPumpInstantiateMsg,
puppeteer::InstantiateMsg as PuppeteerInstantiateMsg,
rewards_manager::{
Expand All @@ -32,7 +29,10 @@ use drop_staking_base::{
},
withdrawal_voucher::InstantiateMsg as WithdrawalVoucherInstantiateMsg,
},
state::pump::PumpTimeout,
state::{
factory::{State, STATE},
pump::PumpTimeout,
},
Comment on lines +32 to +35
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seem to be out of the scope of this PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

moving messages from factory to package

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also as far as I remember it was made in the other pr

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's related because it's used in the contract itself to query a factory state

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it was done in #81. I guess it's okay to do that in both of these PR's and merge updates between them in future

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, my bad. IC. so this way I see you are already trying to query factory in phonebook-like manner. this way I think it we be great to adopt actual phonebook implementation

};
use neutron_sdk::{
bindings::{msg::NeutronMsg, query::NeutronQuery},
Expand Down Expand Up @@ -411,7 +411,7 @@ pub fn query(deps: Deps<NeutronQuery>, _env: Env, msg: QueryMsg) -> StdResult<Bi
fn query_pause_info(deps: Deps<NeutronQuery>) -> StdResult<Binary> {
let state = STATE.load(deps.storage)?;

to_json_binary(&crate::state::PauseInfoResponse {
to_json_binary(&drop_staking_base::state::factory::PauseInfoResponse {
core: deps
.querier
.query_wasm_smart(state.core_contract, &CoreQueryMsg::PauseInfo {})?,
Expand Down Expand Up @@ -569,14 +569,14 @@ fn execute_proxy_msg(
}
},
ProxyMsg::Core(msg) => match msg {
crate::msg::CoreMsg::Pause {} => {
drop_staking_base::msg::factory::CoreMsg::Pause {} => {
messages.push(get_proxied_message(
state.core_contract,
drop_staking_base::msg::core::ExecuteMsg::Pause {},
vec![],
)?);
}
crate::msg::CoreMsg::Unpause {} => {
drop_staking_base::msg::factory::CoreMsg::Unpause {} => {
messages.push(get_proxied_message(
state.core_contract,
drop_staking_base::msg::core::ExecuteMsg::Unpause {},
Expand Down Expand Up @@ -627,7 +627,7 @@ pub fn migrate(
}

fn get_splitter_receivers(
fee_params: Option<crate::msg::FeeParams>,
fee_params: Option<drop_staking_base::msg::factory::FeeParams>,
staker_address: String,
) -> ContractResult<Vec<(String, cosmwasm_std::Uint128)>> {
match fee_params {
Expand Down
3 changes: 0 additions & 3 deletions contracts/factory/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
pub mod contract;
pub mod error;
pub mod msg;
pub mod state;
2 changes: 2 additions & 0 deletions contracts/nft-querier/.cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
schema = "run --bin drop-nft-querier-schema"
Loading