Skip to content

Commit

Permalink
chore: deploy script for delegatecall
Browse files Browse the repository at this point in the history
  • Loading branch information
ZzzzHui committed May 28, 2024
1 parent 53b59af commit d2ce386
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions deploy/03_delegatecall.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// (c) Cartesi and individual authors (see AUTHORS)
// SPDX-License-Identifier: Apache-2.0 (see LICENSE)

import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction, DeployOptions } from "hardhat-deploy/types";

const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deployments, getNamedAccounts, network } = hre;
const { deployer } = await getNamedAccounts();

// IoTeX doesn't have support yet, see https://github.com/safe-global/safe-singleton-factory/issues/199
// Chiado is not working, see https://github.com/safe-global/safe-singleton-factory/issues/201
const nonDeterministicNetworks = ["iotex_testnet", "chiado"];
const deterministicDeployment = !nonDeterministicNetworks.includes(
network.name,
);

const opts: DeployOptions = {
deterministicDeployment,
from: deployer,
log: true,
};

await deployments.deploy("SafeERC20Transfer", opts);
};

export default func;
func.tags = ["Delegatecall"];

0 comments on commit d2ce386

Please sign in to comment.