Skip to content

Commit

Permalink
chore(artifacts): tidy + wasm-all
Browse files Browse the repository at this point in the history
  • Loading branch information
Unique-Divine committed Mar 6, 2024
1 parent 58e3517 commit 7d0e432
Show file tree
Hide file tree
Showing 13 changed files with 130 additions and 140 deletions.
Binary file modified artifacts/airdrop_token_vesting.wasm
Binary file not shown.
21 changes: 10 additions & 11 deletions artifacts/checksums.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
6e43956a6ae41e032b611529bbbd0112699f96a8126fc32b879cfe14521ad85f airdrop.wasm
79f5056138d9d0e4b25131ffb02aa5679d5242fe5ef2d9ae64299280645034cd airdrop_token_vesting.wasm
84148d7b8c372a9f103c51c8626464fe93bc560e43b711a1cd7ffd188969f891 airdrop_token_vesting.wasm
382c05baf544f2886de849933ecf59e8bc3bcdcdd552d5a63537bd6d63f2ecf1 controller.wasm
0ee6293c7ab257139d6b10abb31cafe7a6c00f3fbf2c8be126363f3c1e4e6d80 cw3_flex_multisig.wasm
515a13e891e6bf6a95ab985f653a45668c24991931fc664b64d5a0e803e4ab33 incentives.wasm
159602bf4ca5b4b2430662f0f4cf198fc764608dc2ceb25e35970896e2e4563c lockup.wasm
ced175298f8e6b4af8f414609f3c05c0ec533f1312bac3e650a75974a0e1312f nibi_stargate.wasm
540c83759a1ec8b4a78565345275c6da6c7fdfb420748c2e60d392148eb21bda nibi_stargate_perp.wasm
96c155ab1314f818baf9c0c91373446c822a0f49dccfdbacd3e18cb3579028f7 nusd_valuator.wasm
fb19953e1fdba3ac783dcd3fce80fd28e93f09ac383e0b98326a04a9e6075c08 pricefeed.wasm
decbc751198e3a4fe0ee134f85b1983c0e97d6cfa4c2bad5c084ebb5080566ec shifter.wasm
d9b341cd6b3f5879159f60cd1f4a1eedf82f9358e0989068a2a6317cf3055beb token_vesting.wasm
b56a880d4c67d9f353f549b502256f73159f89b50aa6dae683948e117efa4792 cw3_flex_multisig.wasm
1ecff403bbf3b5fcedccb5de76a0ef5f1fdbcc5f60890e3388f5425584899f0b incentives.wasm
dc89ed88f1c69bf63fc284492b7bf6935e3a85da2945067d70f71f08c01df60d lockup.wasm
222eac4e17c7ddffbecde0b196bc06ed1e458b8578ab25ed200a6fd7db4e5eda nibi_stargate.wasm
ef5b4de76526713e3531c3b9bbc4620b5d61599c4a0e8605365ebb0f1d7ee2ac nibi_stargate_perp.wasm
0074489ff40c8ecbd766f7140b32d288dcaf7302ba630d452f79e7d292ea57ef nusd_valuator.wasm
955592d08017aa41f3c9ba3883153d6de024e8c7a3a79aa3b664a241ec1e7a19 pricefeed.wasm
354fdeff1386394d7aa829358323f89bde548d4aa782bae4a16dddfe33dad739 shifter.wasm
8d982ca2d679ea8d44f825fe91a3d4e0cb92150b12e4684497eee9e76991d247 token_vesting.wasm
Binary file modified artifacts/cw3_flex_multisig.wasm
Binary file not shown.
Binary file modified artifacts/incentives.wasm
Binary file not shown.
Binary file modified artifacts/lockup.wasm
Binary file not shown.
Binary file modified artifacts/nibi_stargate.wasm
Binary file not shown.
Binary file modified artifacts/nibi_stargate_perp.wasm
Binary file not shown.
Binary file modified artifacts/nusd_valuator.wasm
Binary file not shown.
Binary file modified artifacts/pricefeed.wasm
Binary file not shown.
Binary file modified artifacts/shifter.wasm
Binary file not shown.
Binary file modified artifacts/token_vesting.wasm
Binary file not shown.
22 changes: 9 additions & 13 deletions contracts/airdrop-token-vesting/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ pub fn instantiate(
if info.funds.len() != 1 {
return Err(StdError::generic_err(
"must deposit exactly one type of token",
)
.into());
));
}
if info.funds[0].amount.is_zero() {
return Err(StdError::generic_err("must deposit some token").into());
return Err(StdError::generic_err("must deposit some token"));
}
// Managers validation
if msg.managers.is_empty() {
return Err(StdError::generic_err("managers cannot be empty").into());
return Err(StdError::generic_err("managers cannot be empty"));
}

deps.api.addr_validate(&msg.admin)?;
Expand Down Expand Up @@ -117,7 +116,7 @@ pub fn withdraw(
return Err(StdError::generic_err("Nothing to withdraw").into());
}

unallocated_amount = unallocated_amount - amount_max;
unallocated_amount -= amount_max;
UNALLOCATED_AMOUNT.save(deps.storage, &unallocated_amount)?;

// validate recipient address
Expand All @@ -131,8 +130,8 @@ pub fn withdraw(
)?])
.add_attribute("action", "withdraw")
.add_attribute("recipient", &recipient)
.add_attribute("amount", &amount_max.to_string())
.add_attribute("unallocated_amount", &unallocated_amount.to_string()))
.add_attribute("amount", amount_max.to_string())
.add_attribute("unallocated_amount", unallocated_amount.to_string()))
}

fn reward_users(
Expand Down Expand Up @@ -317,7 +316,7 @@ fn send_if_amount_is_not_zero(
default_recipient: String,
) -> Result<(), ContractError> {
if !amount.is_zero() {
let recipient = recipient_option.unwrap_or_else(|| default_recipient);
let recipient = recipient_option.unwrap_or(default_recipient);
let msg_send: CosmosMsg = build_send_msg(denom, amount, recipient)?;
messages.push(msg_send);
}
Expand Down Expand Up @@ -391,10 +390,7 @@ fn build_send_msg(
) -> StdResult<CosmosMsg> {
Ok(BankMsg::Send {
to_address: to,
amount: vec![Coin {
denom: denom,
amount,
}],
amount: vec![Coin { denom, amount }],
}
.into())
}
Expand Down Expand Up @@ -441,7 +437,7 @@ fn vesting_account(
vesting_amount: account.vesting_amount,
vesting_schedule: vesting_schedule_query,

vested_amount: vested_amount,
vested_amount,
claimable_amount: vested_amount
.checked_sub(account.claimed_amount)?,
};
Expand Down
Loading

0 comments on commit 7d0e432

Please sign in to comment.