Skip to content

Commit d44a19b

Browse files
committed
add calculateCumulativeHoldersRewardAmount function for L1 and L2
1 parent 854caa4 commit d44a19b

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { Provider } from '@ethersproject/abstract-provider'
2+
import { getLockupContract } from './common'
3+
4+
type Options = {
5+
readonly provider: Provider
6+
readonly propertyAddress: string
7+
}
8+
9+
export const calculateCumulativeHoldersRewardAmount = async (
10+
options: Options
11+
): Promise<string | undefined> => {
12+
const lockupContract = await getLockupContract(options.provider)
13+
return lockupContract
14+
? lockupContract.calculateCumulativeHoldersRewardAmount(
15+
options.propertyAddress
16+
)
17+
: undefined
18+
}

0 commit comments

Comments
 (0)