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

refactor: rewards #219

Merged
merged 4 commits into from
Feb 4, 2025
Merged

refactor: rewards #219

merged 4 commits into from
Feb 4, 2025

Conversation

palace22
Copy link
Collaborator

@palace22 palace22 commented Feb 3, 2025

Refactored rewards v1 and v2, then finalized gas estimation on rewards v2

Refactored rewards v1 and v2, then finalized gas estimation on rewards v2
Copy link

changeset-bot bot commented Feb 3, 2025

⚠️ No Changeset found

Latest commit: 6aaa656

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@palace22 palace22 requested a review from gidonkatten February 3, 2025 18:56
Copy link

pkg-pr-new bot commented Feb 3, 2025

Open in Stackblitz

npm i https://pkg.pr.new/@folks-finance/xchain-sdk@219

commit: 6aaa656

Comment on lines -57 to +58
const { hubAddress: rewardsV1Address } = hubChain.rewardsV1;
const rewardsV1Address = hubChain.rewards[REWARDS_TYPE.V1].hubAddress;
Copy link
Member

Choose a reason for hiding this comment

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

const rewardsV1Address = getHubRewardAddress(network, REWARDS_TYPE.V1);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

here we already have the hubChain, we should pass another param (network) just to be able to call that method

Comment on lines -83 to +84
const { hubAddress: rewardsV1Address } = hubChain.rewardsV1;
const rewardsV1Address = hubChain.rewards[REWARDS_TYPE.V1].hubAddress;
Copy link
Member

Choose a reason for hiding this comment

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

const rewardsV1Address = getHubRewardAddress(network, REWARDS_TYPE.V1);

Comment on lines -81 to +87
const { hubAddress: rewardsV2Address } = hubChain.rewardsV2;
const rewardsV2Address = hubChain.rewards[REWARDS_TYPE.V2].hubAddress;
Copy link
Member

Choose a reason for hiding this comment

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

const rewardsV2Address = getHubRewardAddress(network, REWARDS_TYPE.V2);

src/chains/evm/hub/modules/folks-hub-rewards-v2.ts Outdated Show resolved Hide resolved
src/chains/evm/hub/utils/chain.ts Outdated Show resolved Hide resolved
src/chains/evm/hub/constants/chain.ts Outdated Show resolved Hide resolved
src/common/constants/chain.ts Outdated Show resolved Hide resolved
src/common/utils/chain.ts Outdated Show resolved Hide resolved
src/common/utils/chain.ts Outdated Show resolved Hide resolved
src/common/utils/chain.ts Outdated Show resolved Hide resolved
@palace22 palace22 requested a review from gidonkatten February 4, 2025 09:21
@palace22 palace22 merged commit 5b1620d into rewards-v2 Feb 4, 2025
3 checks passed
@palace22 palace22 deleted the refactor/rewards branch February 4, 2025 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants