import { Signer , Contract } from 'ethers' ; import { TestRelayFactory } from '../typechain/TestRelayFactory' ; import { RelayFactory } from '../typechain/RelayFactory' ; import { Relay } from '../typechain/Relay' ; import { TestRelay } from '../typechain/TestRelay' ; export type Genesis = { header : string ; height : number ; } ; export async function DeployRelay ( signer , genesis ) { const factory = new RelayFactory ( signer ) ; const contract = await factory . deploy ( genesis . header , genesis . height ) ; return contract . deployed ( ) ; } export async function DeployTestRelay ( signer , genesis ) { const factory = new TestRelayFactory ( signer ) ; const contract = await factory . deploy ( genesis . header , genesis . height ) ; return contract . deployed ( ) ; }