The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hyperlane-monorepo/test/HelloWorldDeploy.ts

29 lines
908 B

import { SignerWithAddress } from '@nomiclabs/hardhat-ethers/signers';
import { types } from '@abacus-network/utils';
import { TestAbacusDeploy, TestRouterDeploy } from '@abacus-network/hardhat';
import { HelloWorld__factory, HelloWorld } from '../src/types';
type HelloWorldTestConfig = {
signer: SignerWithAddress;
};
export class HelloWorldDeploy extends TestRouterDeploy<
HelloWorld,
HelloWorldTestConfig
> {
async deployInstance(
domain: types.Domain,
abacus: TestAbacusDeploy,
): Promise<HelloWorld> {
const helloWorldFactory = new HelloWorld__factory(this.config.signer);
const router = await helloWorldFactory.deploy();
await router.initialize(abacus.abacusConnectionManager(domain).address);
await router.transferOwnership(this.config.signer.address);
return router;
}
router(domain: types.Domain): HelloWorld {
return this.instances[domain];
}
}