Skip to content

Commit

Permalink
feat(universal-router-sdk): add UR position management commands (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
marktoda authored Sep 26, 2024
1 parent fba0e8a commit 3417c81
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions sdks/universal-router-sdk/src/utils/routerCommands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ export enum CommandType {
PERMIT2_TRANSFER_FROM_BATCH = 0x0d,
BALANCE_CHECK_ERC20 = 0x0e,

V3_POSITION_MANAGER_PERMIT = 0x11,
V3_POSITION_MANAGER_CALL = 0x12,
V4_POSITION_CALL = 0x13,

EXECUTE_SUB_PLAN = 0x21,
}

Expand Down Expand Up @@ -60,6 +64,11 @@ const ABI_DEFINITION: { [key in CommandType]: string[] } = {
[CommandType.TRANSFER]: ['address', 'address', 'uint256'],
[CommandType.PAY_PORTION]: ['address', 'address', 'uint256'],
[CommandType.BALANCE_CHECK_ERC20]: ['address', 'address', 'uint256'],

// Position Actions
[CommandType.V3_POSITION_MANAGER_PERMIT]: ['bytes'],
[CommandType.V3_POSITION_MANAGER_CALL]: ['bytes'],
[CommandType.V4_POSITION_CALL]: ['bytes'],
}

export class RoutePlanner {
Expand Down

0 comments on commit 3417c81

Please sign in to comment.