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: deposit boost support #187

Merged
merged 18 commits into from
Nov 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
5 changes: 5 additions & 0 deletions .changeset/selfish-eggs-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@folks-finance/xchain-sdk": patch
---

deposit boost support
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ yarn-error.log*
# local env files
.env
.env*.local

# intellij
.idea
3 changes: 3 additions & 0 deletions src/chains/evm/common/constants/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ export const GAS_LIMIT_ESTIMATE_INCREASE = 10_000n;
export const SEND_TOKEN_ACTION_RETURN_GAS_LIMIT = 500_000n;
export const RECEIVER_VALUE_SLIPPAGE = 0.01;
export const RETRY_REVERSE_GAS_LIMIT_SLIPPAGE = 0.05;
export const UPDATE_USER_POINTS_IN_LOANS_GAS_LIMIT_SLIPPAGE = 0.1;
export const UPDATE_ACCOUNT_POINTS_FOR_REWARDS_GAS_LIMIT_SLIPPAGE = 0.01;
export const CLAIM_REWARDS_GAS_LIMIT_SLIPPAGE = 0;
18 changes: 17 additions & 1 deletion src/chains/evm/common/types/module.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import type { MessageReceived } from "./gmp.js";
import type { GenericAddress } from "../../../../common/types/address.js";
import type { EvmAddress, GenericAddress } from "../../../../common/types/address.js";
import type { AccountId } from "../../../../common/types/lending.js";
import type { MessageParams } from "../../../../common/types/message.js";
import type { SpokeTokenData } from "../../../../common/types/token.js";
import type { PoolEpoch } from "../../hub/types/rewards.js";
import type { Hex } from "viem";

export type PrepareCall = {
Expand Down Expand Up @@ -103,3 +104,18 @@ export type PrepareResendWormholeMessageCall = {
deliveryProviderAddress: GenericAddress;
wormholeRelayerAddress: GenericAddress;
} & Omit<PrepareCall, "messageParams">;

export type PrepareUpdateUserPointsInLoans = {
loanManagerAddress: GenericAddress;
} & Omit<PrepareCall, "messageParams" | "msgValue">;

export type PrepareUpdateAccountsPointsForRewardsCall = {
poolEpochs: Array<PoolEpoch>;
rewardsV1Address: GenericAddress;
} & Omit<PrepareCall, "messageParams" | "msgValue">;

export type PrepareClaimRewardsCall = {
poolEpochs: Array<PoolEpoch>;
receiver: EvmAddress;
rewardsV1Address: GenericAddress;
} & Omit<PrepareCall, "messageParams" | "msgValue">;
Loading
Loading