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

[ADHOC] Fix decodeClaimData for ERC20PeggedVariableCriteriaIncentive #345

Merged
merged 6 commits into from
Dec 20, 2024

Conversation

jonathandiep
Copy link
Contributor

@jonathandiep jonathandiep commented Dec 19, 2024

Description

  • Fixes decodeClaimData for ERC20PeggedVariableCriteriaIncentive
  • Adds test for claim flow on ERC20PeggedVariableCriteriaIncentive

Copy link

changeset-bot bot commented Dec 19, 2024

🦋 Changeset detected

Latest commit: 872d6ac

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@boostxyz/sdk Patch
@boostxyz/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the SDK label Dec 19, 2024
@sammccord
Copy link
Contributor

Fails
🚫

Your PR body must reference a Github issue using a valid keyword, or your PR title must include the internal Boost ticket number, ie: [BOOST-1234] Innovate like nuts

Warnings
⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against 5b03859

@jonathandiep jonathandiep changed the title test(ERC20PeggedVariableCriteriaIncentive): minor update for tests [ADHOC] test(ERC20PeggedVariableCriteriaIncentive): minor update for tests Dec 20, 2024
@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against 5b03859

Copy link
Member

@Quazia Quazia left a comment

Choose a reason for hiding this comment

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

shipit

@jonathandiep jonathandiep changed the title [ADHOC] test(ERC20PeggedVariableCriteriaIncentive): minor update for tests [ADHOC] Fix decodeClaimData for ERC20PeggedVariableCriteriaIncentive Dec 20, 2024
@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against 5b0215c

1 similar comment
@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against 5b0215c

@jonathandiep jonathandiep requested a review from Quazia December 20, 2024 18:57
@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against 5b0215c

@jonathandiep jonathandiep force-pushed the jon/minor-updates-pegged-incentive branch from 5b0215c to a1c7516 Compare December 20, 2024 18:57
@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against a1c7516

@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

⚠️

Are you sure you want to be submitting a change without including a changeset? If you're just changing docs or tests, you probably don't need to. See the publishing section of the README for more info.

Generated by 🚫 dangerJS against 26f1bc1

Copy link
Member

@Quazia Quazia left a comment

Choose a reason for hiding this comment

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

LGTM - one potential tweak but non-blocking. Up to you. Concern is around the behavior being slightly different between incentives.

* @returns {BigInt} Returns the reward amount from a claim data payload
*/
public decodeClaimData(data: Hex) {
return BigInt(decodeAbiParameters([{ type: 'uint256' }], data)[0]);
public async decodeClaimData(
Copy link
Member

Choose a reason for hiding this comment

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

I think it makes sent to keep the decode just decoding, and put this functionality in a secondary helper, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense -- will add secondary helper!

@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

Generated by 🚫 dangerJS against 872d6ac

@sammccord
Copy link
Contributor

Warnings
⚠️

By using the [ADHOC] title prefix, you are bypassing best practice protections.

Generated by 🚫 dangerJS against 872d6ac

@jonathandiep jonathandiep merged commit f01db75 into main Dec 20, 2024
6 checks passed
@jonathandiep jonathandiep deleted the jon/minor-updates-pegged-incentive branch December 20, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants