Skip to content
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

chore: Fix some typos in comments #1089

Merged
merged 1 commit into from
Apr 15, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ contract HappyRedPacket is Initializable {
require(_number < 256, "At most 255 recipients");
require(_token_type == 0 || _token_type == 1, "Unrecognizable token type");

// require minium 0.1 for each user
// require minimum 0.1 for each user
require(_total_tokens > 10**(IERC20(_token_addr).decimals() - 1) * _number , "At least 0.1 for each user");

uint256 received_amount = _total_tokens;
Expand Down Expand Up @@ -139,12 +139,12 @@ contract HappyRedPacket is Initializable {
if (total_number - claimed_number == 1)
claimed_tokens = remaining_tokens;
else{
// reserve minium amount => (total_number - claimed_number) * 0.1
// reserve minimum amount => (total_number - claimed_number) * 0.1
uint reserve_amount = (total_number - claimed_number) * minium_value;
uint distribute_tokens = remaining_tokens - reserve_amount;
claimed_tokens = random(seed, nonce) % (distribute_tokens * 2/ (total_number - claimed_number));

// minium claimed_tokens for user is 0.1 ; and round the claimed_tokens to decimal 0.1
// minimum claimed_tokens for user is 0.1 ; and round the claimed_tokens to decimal 0.1
claimed_tokens = claimed_tokens < minium_value ? minium_value : (claimed_tokens - (claimed_tokens % minium_value));
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions defi/Alchemix/contracts/Transmuter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ contract Transmuter is Context {
// NOTE: if last deposit was updated in the same block as the current call
// then the below logic gates will fail

//calculate diffrence in time
//calculate difference in time
uint256 deltaTime = _currentBlock.sub(_lastDepositBlock);

// distribute all if bigger than timeframe
Expand Down Expand Up @@ -297,7 +297,7 @@ contract Transmuter is Context {
// empty bucket
tokensInBucket[toTransmute] = 0;

// calculaate diffrence
// calculaate difference
uint256 diff = pendingz.sub(depositedAlTokens[toTransmute]);

// remove overflow
Expand Down
6 changes: 3 additions & 3 deletions defi/Alchemix/contracts/TransmuterB.sol
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ contract TransmuterB is Context {
// NOTE: if last deposit was updated in the same block as the current call
// then the below logic gates will fail

//calculate diffrence in time
//calculate difference in time
uint256 deltaTime = _currentBlock.sub(_lastDepositBlock);

// distribute all if bigger than timeframe
Expand Down Expand Up @@ -325,7 +325,7 @@ contract TransmuterB is Context {
_;
}

/// @dev checks that the block delay since a user's last action is longer than the minium delay
/// @dev checks that the block delay since a user's last action is longer than the minimum delay
///
modifier ensureUserActionDelay() {
require(block.number.sub(lastUserAction[msg.sender]) >= minUserActionDelay, "action delay not met");
Expand Down Expand Up @@ -469,7 +469,7 @@ contract TransmuterB is Context {
// empty bucket
tokensInBucket[toTransmute] = 0;

// calculaate diffrence
// calculaate difference
uint256 diff = pendingz.sub(depositedAlTokens[toTransmute]);

// remove overflow
Expand Down
6 changes: 3 additions & 3 deletions defi/Alchemix/contracts/TransmuterEth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ contract TransmuterEth is Context {
// NOTE: if last deposit was updated in the same block as the current call
// then the below logic gates will fail

//calculate diffrence in time
//calculate difference in time
uint256 deltaTime = _currentBlock.sub(_lastDepositBlock);

// distribute all if bigger than timeframe
Expand Down Expand Up @@ -326,7 +326,7 @@ contract TransmuterEth is Context {
_;
}

/// @dev checks that the block delay since a user's last action is longer than the minium delay
/// @dev checks that the block delay since a user's last action is longer than the minimum delay
///
modifier ensureUserActionDelay() {
require(block.number.sub(lastUserAction[msg.sender]) >= minUserActionDelay, "action delay not met");
Expand Down Expand Up @@ -475,7 +475,7 @@ contract TransmuterEth is Context {
// empty bucket
tokensInBucket[toTransmute] = 0;

// calculaate diffrence
// calculaate difference
uint256 diff = pendingz.sub(depositedAlTokens[toTransmute]);

// remove overflow
Expand Down
Loading