We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1eea6fa commit 96de6d5Copy full SHA for 96de6d5
1 file changed
lib/agent/lockup/withdrawByPosition.ts
@@ -0,0 +1,20 @@
1
+import { getLockupContract } from './common'
2
+import { Provider } from '@ethersproject/abstract-provider'
3
+
4
+type Options = {
5
+ readonly provider: Provider
6
+ readonly positionTokenId: string
7
+ readonly amount: string
8
+}
9
10
+export const withdrawByPosition = async (
11
+ options: Options
12
+): Promise<boolean | undefined> => {
13
+ const lockupContract = await getLockupContract(options.provider)
14
+ return lockupContract
15
+ ? await lockupContract.withdrawByPosition(
16
+ options.positionTokenId,
17
+ options.amount
18
+ )
19
+ : undefined
20
0 commit comments