LZEndpointMock.js 704 B

1234567891011121314151617181920212223242526
  1. const { getEndpointId } = require("../utils/network")
  2. module.exports = async ({ getNamedAccounts, deployments }) => {
  3. const { deploy } = deployments
  4. const { deployer } = await getNamedAccounts()
  5. await deploy("LZEndpointMock", {
  6. from: deployer,
  7. args: [await getEndpointId()],
  8. log: true,
  9. waitConfirmations: 1,
  10. })
  11. }
  12. //only deploy for chainId 31337
  13. module.exports.skip = ({ getChainId }) =>
  14. new Promise(async (resolve, reject) => {
  15. try {
  16. const chainId = await getChainId()
  17. resolve(chainId !== "31337")
  18. } catch (error) {
  19. reject(error)
  20. }
  21. })
  22. module.exports.tags = ["LZEndpointMock", "test"]