Add deploy script for Flowers (#13)
* Updates for v2 * Add canonical wrapper * Use v2 connection client * Fix prettier * Update 721 for v2 * Use msg lib * Update deployer with collateral * Use better union types * Rename and organize contracts * Rename TransferRemoteRouter to TokenRouter * Update deployers * Fix tests * Pull in prerelease versions * Improve test coverage * Update yarn lock * Add tests for collateral * Fix prettier * Add bridge router skeleton * Use Create2 deployments * Refactor CREATE2 logic * Fix prettier * Add HypERC721URIStorage * Add HypERC721URICollateral * Add deployer and unit tests for URI relay * Fix prettier * Remove bridge router * Add docstrings * Use enum for type discriminant * Fix prettier * Add deploy script for Flowers * Update scripts/deploy.ts Co-authored-by: Yorke Rhodes <yorke@hyperlane.xyz> * Dont pay for gas for now * Dont pass ism * Remove console.log * PR review * Update base * Fix prettier * Fix lint * Make mods to Erc20 too * lint * Prettier Co-authored-by: Yorke Rhodes <yorke@hyperlane.xyz>pull/2435/head
parent
5dd421b54e
commit
dea4b2a942
@ -1,5 +1,6 @@ |
||||
node_modules |
||||
dist |
||||
coverage |
||||
src/types |
||||
hardhat.config.ts |
||||
types |
||||
hardhat.config.ts |
||||
scripts |
@ -0,0 +1,61 @@ |
||||
import { ethers, Wallet } from 'ethers'; |
||||
|
||||
import { |
||||
Chains, |
||||
HyperlaneCore, |
||||
MultiProvider, |
||||
objMap, |
||||
} from '@hyperlane-xyz/sdk'; |
||||
import { RouterConfig, chainConnectionConfigs } from '@hyperlane-xyz/sdk'; |
||||
|
||||
import { TokenConfig, TokenType } from '../src/config'; |
||||
import { HypERC20Deployer } from '../src/deploy'; |
||||
|
||||
const connectionConfigs = { |
||||
goerli: { |
||||
...chainConnectionConfigs.goerli, |
||||
provider: new ethers.providers.JsonRpcProvider( |
||||
'https://eth-goerli.public.blastapi.io', |
||||
5, |
||||
), |
||||
}, |
||||
fuji: chainConnectionConfigs.fuji, |
||||
alfajores: chainConnectionConfigs.alfajores, |
||||
moonbasealpha: chainConnectionConfigs.moonbasealpha, |
||||
}; |
||||
|
||||
async function deployNFTWrapper() { |
||||
console.info('Getting signer'); |
||||
const signer = new Wallet( |
||||
'pkey', |
||||
); |
||||
|
||||
const multiProvider = new MultiProvider(connectionConfigs); |
||||
multiProvider.rotateSigner(signer) |
||||
const core = HyperlaneCore.fromEnvironment('testnet2', multiProvider); |
||||
|
||||
const config = objMap(connectionConfigs, (chain, c) => ({ |
||||
type: TokenType.synthetic, |
||||
name: 'Dai', |
||||
symbol: 'DAI', |
||||
totalSupply: 0, |
||||
owner: signer.address, |
||||
mailbox: '0x1d3aAC239538e6F1831C8708803e61A9EA299Eec', |
||||
interchainGasPaymaster: core.getContracts(chain) |
||||
.interchainGasPaymaster.address, |
||||
} as TokenConfig & RouterConfig)) |
||||
config.goerli = { |
||||
type: TokenType.collateral, |
||||
token: '0xb4fbf271143f4fbf7b91a5ded31805e42b2208d6', |
||||
owner: signer.address, |
||||
mailbox: '0x1d3aAC239538e6F1831C8708803e61A9EA299Eec', |
||||
interchainGasPaymaster: core.getContracts(Chains.goerli) |
||||
.interchainGasPaymaster.address, |
||||
} as TokenConfig & RouterConfig |
||||
|
||||
const deployer = new HypERC20Deployer(multiProvider, config, core); |
||||
|
||||
await deployer.deploy(); |
||||
} |
||||
|
||||
deployNFTWrapper().then(console.log).catch(console.error); |
Loading…
Reference in new issue