Skip to content

Commit

Permalink
retractParams: rename from and to args (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
anasbelbaz authored Jun 19, 2024
1 parent 5ea3e27 commit 918a274
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/chilled-candles-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@mangrovedao/mgv": patch
---

rename retractParams (from,to) args
10 changes: 5 additions & 5 deletions src/builder/kandel/retract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const restractKandelABI = parseAbi([
])

export type RetractParams = {
from?: bigint | undefined
to: bigint
fromIndex?: bigint | undefined
toIndex: bigint
baseAmount?: bigint | undefined
quoteAmount?: bigint | undefined
freeWei?: bigint | undefined
Expand All @@ -20,8 +20,8 @@ export type RetractParams = {

export function retractParams(params: RetractParams) {
const {
from = 0n,
to,
fromIndex = 0n,
toIndex,
baseAmount = 0n,
quoteAmount = 0n,
freeWei = maxUint256,
Expand All @@ -31,7 +31,7 @@ export function retractParams(params: RetractParams) {
return {
abi: restractKandelABI,
functionName: 'retractAndWithdraw',
args: [from, to, baseAmount, quoteAmount, freeWei, recipient],
args: [fromIndex, toIndex, baseAmount, quoteAmount, freeWei, recipient],
} satisfies Omit<
ContractFunctionParameters<
typeof restractKandelABI,
Expand Down

0 comments on commit 918a274

Please sign in to comment.