-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vxASTRO): remove max pool limit; vote once per epoch; privileged…
… instant unlock (#111) * remove max pools per vote limitation on the hub * feat(emissions controller): allow to vote once per epoch Aligned voting with vxASTRO epochs. Removed separate per-user voting cooldown of 10 days * Fix build script. See astroport-fi/astroport-core#428 * add emissions controller migration * align docs with new changes * feat(vxastro): add privileged feature to allow unlocking vxASTRO instantly * fix instant unlocking logic
- Loading branch information
Showing
29 changed files
with
542 additions
and
76 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#![cfg(not(tarpaulin_include))] | ||
|
||
use cosmwasm_std::{entry_point, DepsMut, Empty, Env, Response}; | ||
use cw2::{get_contract_version, set_contract_version}; | ||
|
||
use crate::error::ContractError; | ||
use crate::instantiate::{CONTRACT_NAME, CONTRACT_VERSION}; | ||
|
||
#[cfg_attr(not(feature = "library"), entry_point)] | ||
pub fn migrate(deps: DepsMut, _env: Env, _msg: Empty) -> Result<Response, ContractError> { | ||
let contract_version = get_contract_version(deps.storage)?; | ||
|
||
match contract_version.contract.as_ref() { | ||
CONTRACT_NAME => match contract_version.version.as_ref() { | ||
"1.0.0" => Ok(()), | ||
_ => Err(ContractError::MigrationError {}), | ||
}, | ||
_ => Err(ContractError::MigrationError {}), | ||
}?; | ||
|
||
set_contract_version(deps.storage, CONTRACT_NAME, CONTRACT_VERSION)?; | ||
|
||
Ok(Response::new() | ||
.add_attribute("previous_contract_name", &contract_version.contract) | ||
.add_attribute("previous_contract_version", &contract_version.version) | ||
.add_attribute("new_contract_name", CONTRACT_NAME) | ||
.add_attribute("new_contract_version", CONTRACT_VERSION)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.