mirror of
https://github.com/zoo-labs/zoo.git
synced 2026-11-10 22:32:34 +00:00
10 lines
424 B
TypeScript
10 lines
424 B
TypeScript
import { BigNumber } from '@ethersproject/bignumber'
|
|
import { useMulticall2Contract } from './useContract'
|
|
import { useSingleCallResult } from '../state/multicall/hooks'
|
|
|
|
// gets the current timestamp from the blockchain
|
|
export default function useCurrentBlockTimestamp(): BigNumber | undefined {
|
|
const multicall = useMulticall2Contract()
|
|
return useSingleCallResult(multicall, 'getCurrentBlockTimestamp')?.result?.[0]
|
|
}
|