- Bun
- Foundry (for testing)
bun install
bunx hardhat compile
forge test
For SPELL OFT, replace
MIMOFTwithSpellOFTin the commands below and use the configuration inlayerzero.spell.config.tsinstead oflayerzero.mim.config.ts.
Can be reused for both MIM and SPELL OFT.
Edit deploy/FeeHandler.ts and update configurations with the right values for the network you are deploying to.
bunx hardhat deploy --network <network-name> --tags FeeHandler
be sure to update the owner of the MIMOFT to the multisig address
bunx hardhat lz:deploy --tags MIMOFT --networks <network-name>
Rename the
DefaultProxyAdminfile toMIMOFT_ProxyAdmin
bunx hardhat etherscan-verify --network <network-name>
On Hyperliquid it should be sourcify:
bunx hardhat sourcify --endpoint "https://sourcify.parsec.finance"
endpoints: https://docs.layerzero.network/v2/deployments/deployed-contracts
cast --rpc-url <url> send <oft proxy address> "setDelegate(address)" <owner address>
Double check the delegate is set to the owner.
cast --rpc-url <url> call <layer zero endpoint> "delegates(address)(address)" <oft address>
bunx hardhat lz:ownable:transfer-ownership --oapp-config layerzero.mim.config.ts
Double check the owner is the safe address.
cast --rpc-url <url> call <oft proxy address> "owner()(address)"
cast --rpc-url <url> send <MIMOFT_ProxyAdmin address> "transferOwnership(address)" <safe address>
Double check the owner is the safe address.
cast --rpc-url <url> call <MIMOFT_ProxyAdmin address> "owner()(address)"
Ask the team to review the deployment.
be sure the safe api endpoint is the right transaction api one. For example, appending
/api/v1/safes/<safe address>/should not fail.
bunx hardhat lz:oapp:wire --oapp-config layerzero.mim.config.ts --safe
https://docs.layerzero.network/v2/developers/evm/technical-reference/deployed-contracts
bunx hardhat bridge \
--token MIM \
--network ethereum-mainnet \
--dst-chain arbitrum-mainnet \
--to 0xfB3485c2e209A5cfBDC1447674256578f1A80eE3 \
--amount 1
bunx hardhat bridge \
--token SPELL \
--network ethereum-mainnet \
--dst-chain arbitrum-mainnet \
--to 0xfB3485c2e209A5cfBDC1447674256578f1A80eE3 \
--amount 1