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

feat: adds example HRC904 contracts + new methods to HTS contract #1125

Merged
merged 22 commits into from
Jan 16, 2025

Conversation

simzzz
Copy link
Contributor

@simzzz simzzz commented Dec 20, 2024

Description:
This PR adds example contracts for HRC904 #1012 functionality such as cancelAirdrops, claimAirdrops, airdropTokens, rejectTokens as well as adding the new methods to the HederaTokenService.sol contract

Related issue(s):
Closes #1160
Fixes #1135

Notes for reviewer:

Checklist

  • Figure out a way to assert the child transactions (most time consuming so far)
  • Fix some Airdrop contract tests which show wrong balance possibly due to a race condition
  • Polish code and fix assertions to use the right status codes and messages
  • Debug why airdrops fail with more than 5 FT tokens

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz changed the title 1012 proxy coverage feat: Adds test coverage for HRC904Proxy functions Dec 20, 2024
@simzzz simzzz changed the title feat: Adds test coverage for HRC904Proxy functions feat: adds example HRC904 contracts + airdrop test coverage + hrc904Proxy test coverage Dec 20, 2024
simzzz added 2 commits January 6, 2025 14:00
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
simzzz added 2 commits January 7, 2025 14:25
…tion successfully

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz changed the title feat: adds example HRC904 contracts + airdrop test coverage + hrc904Proxy test coverage feat: adds example HRC904 contracts + airdrop contract test coverage Jan 7, 2025
@simzzz simzzz marked this pull request as ready for review January 7, 2025 14:01
@quiet-node quiet-node added the enhancement New feature or request label Jan 7, 2025
@quiet-node quiet-node added this to the 0.12.0 milestone Jan 7, 2025
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

Nice work, some tweaks and then let's get this in

Nana-EC
Nana-EC previously approved these changes Jan 10, 2025
Copy link
Collaborator

@Nana-EC Nana-EC left a comment

Choose a reason for hiding this comment

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

LG

Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

Nice process. Non blocking but I have an idea for the PR tho.

Given the urgent priority of pushing the example contracts for Frictionless Airdrop, I suggest repurposing this PR to focus solely on feat: adds example HRC904 contracts.

The test coverage for the AirdropContract can be moved to a separate PR, as I believe it would need additional work on it. This approach is preferable since other contracts, such as CancelAirdrop, ClaimAirdrop, etc., also need test coverage.

Additionally, we would also have these tests running in CI for better visibility as well. And in order to run these tests in CI it would require extra work, including adding a new workflow and updating local-node to use the correct network version.

For now, limiting this PR to the example contracts seems like the best appraoch I believe.

simzzz added a commit to simzzz/hedera-smart-contracts that referenced this pull request Jan 13, 2025
…rop contract test coverage for a later PR

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz dismissed stale reviews from acuarica and Nana-EC via cc959b7 January 13, 2025 10:48
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
…rop contract test coverage for a later PR

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz force-pushed the 1012-proxy-coverage branch from cc959b7 to 087749c Compare January 13, 2025 11:28
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz changed the title feat: adds example HRC904 contracts + airdrop contract test coverage feat: adds example HRC904 contracts + new methods to HTS contract Jan 13, 2025
…ent PR

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
@simzzz simzzz requested a review from quiet-node January 14, 2025 12:16
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
quiet-node
quiet-node previously approved these changes Jan 14, 2025
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!

@konstantinabl konstantinabl dismissed their stale review January 15, 2025 11:09

Accidentally approved

Copy link
Contributor

@konstantinabl konstantinabl left a comment

Choose a reason for hiding this comment

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

Left some comments

Signed-off-by: Simeon Nakov <simeon.nakov@limechain.tech>
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM! Great work!

@konstantinabl konstantinabl merged commit e00a81f into hashgraph:main Jan 16, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
5 participants