import { providers } from "ethers" ; import { assertExists } from "." ; export type GetNetworkId = ( ) => Promise < number > ; export default function provideGetNetworkId ( ethersProvider ) { assertExists ( ethersProvider , 'ethersProvider' ) ; return async function provideGetNetworkId ( ) { return ethersProvider . send ( 'net_version' , [ ] ) ; } ; }