We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d44a19b commit 7735190Copy full SHA for 7735190
1 file changed
lib/agent/lockup/calculateWithdrawableInterestAmountByPosition.ts
@@ -0,0 +1,18 @@
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
+}
8
9
+export const calculateWithdrawableInterestAmountByPosition = async (
10
+ options: Options
11
+): Promise<string | undefined> => {
12
+ const lockupContract = await getLockupContract(options.provider)
13
+ return lockupContract
14
+ ? lockupContract.calculateWithdrawableInterestAmountByPosition(
15
+ options.positionTokenId
16
+ )
17
+ : undefined
18
0 commit comments