-
Notifications
You must be signed in to change notification settings - Fork 141
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
cw-abc: Updated hatch phase mechanics, donations, queries #699
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
532375a
Separate hatcher allowlist
adairrr f02dae4
Donation feature
adairrr 64dab18
Initial sell exit tax
adairrr b5fd8b8
Hatchers to amount
adairrr e9e90b4
Hatch phase exit tax
adairrr ce1f540
TokenMsg methods
adairrr 32ce666
Format
adairrr a187a5a
Hatchers query
adairrr a9e74ce
Fix bug where float was not taken into account in supply
adairrr e55bc45
Buy and sell refactoring
adairrr 5ee7f91
Update hatch phase config
adairrr 0f2e577
Update phase config enum
adairrr 70074a5
Add adairrr to authors
adairrr 18f14aa
Initial boot integration with custom msgs
adairrr eaceea0
Initial testing infrastructure
adairrr bd0d400
Abstract-OS to AbstractSDK
adairrr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,43 @@ | ||
use crate::msg::*; | ||
use boot_core::{contract, Contract, CwEnv}; | ||
#[cfg(feature = "daemon")] | ||
use boot_core::{ArtifactsDir, Daemon, WasmPath}; | ||
use boot_core::{ContractWrapper, Mock, MockState, TxHandler, Uploadable}; | ||
use cosmwasm_std::Empty; | ||
use token_bindings::{TokenFactoryMsg, TokenFactoryQuery}; | ||
|
||
#[contract(InstantiateMsg, ExecuteMsg, QueryMsg, Empty)] | ||
pub struct CwAbc<Chain>; | ||
|
||
impl<Chain: CwEnv> CwAbc<Chain> { | ||
pub fn new(name: &str, chain: Chain) -> Self { | ||
let contract = Contract::new(name, chain); | ||
Self(contract) | ||
} | ||
} | ||
|
||
/// Basic app for the token factory contract | ||
/// TODO: should be in the bindings, along with custom handler for multi-test | ||
pub(crate) type TokenFactoryBasicApp = boot_core::BasicApp<TokenFactoryMsg, TokenFactoryQuery>; | ||
|
||
type TokenFactoryMock = Mock<MockState, TokenFactoryMsg, TokenFactoryQuery>; | ||
|
||
impl Uploadable<TokenFactoryMock> for CwAbc<TokenFactoryMock> { | ||
fn source(&self) -> <TokenFactoryMock as TxHandler>::ContractSource { | ||
Box::new(ContractWrapper::new( | ||
crate::contract::execute, | ||
crate::contract::instantiate, | ||
crate::contract::query, | ||
)) | ||
} | ||
} | ||
|
||
#[cfg(feature = "daemon")] | ||
impl Uploadable<Daemon> for CwAbc<Daemon> { | ||
fn source(&self) -> <Daemon as TxHandler>::ContractSource { | ||
ArtifactsDir::env() | ||
.expect("Expected ARTIFACTS_DIR in env") | ||
.find_wasm_path("cw_abc") | ||
.unwrap() | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️