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

Airdrop | minor tweaks #138

Merged
merged 6 commits into from
Nov 23, 2021
Merged

Airdrop | minor tweaks #138

merged 6 commits into from
Nov 23, 2021

Conversation

FloppyDisck
Copy link
Contributor

@FloppyDisck FloppyDisck commented Nov 20, 2021

Added a brute decay where the unclaimed amount gets dumped into the dump_address once end_date is reached.
Replaced minting items with sending, the contract will now have to be funded before it can start distributing rewards.
Fixed potential issue regarding token distribution when handling certain amounts with certain task percentages; token division will sometimes create very little uToken to not be claimed, to combat this when a user claims and its total percentage achieved is 100% then we just return the current claimed amount subtracted by the total rewarded amount.

Closes #128, Closes #129, Closes #135

@FloppyDisck FloppyDisck added the airdrop Airdrop contract label Nov 20, 2021
@FloppyDisck FloppyDisck changed the base branch from main to dev November 20, 2021 07:49
contracts/airdrop/src/handle.rs Show resolved Hide resolved
Comment on lines +200 to +203
let messages = vec![send_msg(
dump_address, send_total, None, None,
1, config.airdrop_snip20.code_hash,
config.airdrop_snip20.address)?];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is just hard-coded like that can we just initialize it in the HandleResponse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup we can

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 76ff676

@FloppyDisck FloppyDisck merged commit a730bdb into dev Nov 23, 2021
@FloppyDisck FloppyDisck deleted the airdrop/minor-tweaks branch November 23, 2021 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
airdrop Airdrop contract
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Airdrop milestone amount precision Replace minting with sending Add decay
2 participants