-
Notifications
You must be signed in to change notification settings - Fork 41
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
dYdX Airdrop updates #652
dYdX Airdrop updates #652
Conversation
Cosm-Orc Gas Usage
Raw Report for 5f1ed3e
|
Ok(res) | ||
} | ||
|
||
pub fn dust_and_whitelist_add( |
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.
I think this can just be whitelist_add and call the dust( ) function from the calling function
@@ -19,158 +15,21 @@ pub fn claim_airdrop( | |||
eth_sig: String, | |||
) -> Result<Response, ContractError> { | |||
let config = CONFIG.load(deps.storage)?; | |||
let airdrop_count_limit = config.airdrop_count_limit; | |||
if AIRDROP_COUNT.load(deps.storage)? >= airdrop_count_limit { |
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.
This can be a one line assert check
Ok(()) | ||
} | ||
|
||
pub fn check_previous_claim(deps: &DepsMut, eth_address: &str) -> Result<(), ContractError> { |
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.
Shouldn't a "previous claim" just be the address to mint count matches the max airdrop amount or do we need to track something different?
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.
Only the reward is being claimed currently. Not tracking a mint count. The user is expected to mint the token outside of the airdrop contract through the regular minting process.
@@ -37,6 +37,7 @@ fn query_minter_as_expected(app: &mut StargazeApp, airdrop_contract: Addr, minte | |||
fn test_instantiate() { | |||
let mut app = custom_mock_app(); | |||
let minter_address = Addr::unchecked("contract1"); | |||
let name_discount_wl_address = Addr::unchecked(MOCK_NAME_DISCOUNT_WL_ADDR_STR); |
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.
I think we need some new unit tests that test the additional functionality, such as can only do the claim after name is registered correct?
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.
Correct. Updating them currently.
…updates dydx airdrop updates
4744ccb
into
humanalgorithm/dydx-main-branch-v3.x
No description provided.