import type { TransactionResponse } from "@ethersproject/abstract-provider"; import type { MetaTransaction } from "@gnosis.pm/safe-contracts"; import type { HardhatEthersHelpers } from "@nomiclabs/hardhat-ethers/types"; import { BigNumber, BigNumberish, BytesLike, Contract, Signer } from "ethers"; /** * The salt used when deterministically deploying smart contracts. */ export declare const SALT: string; /** * The contract used to deploy contracts deterministically with CREATE2. * The address is chosen by the hardhat-deploy library. * It is the same in any EVM-based network. * * https://github.com/Arachnid/deterministic-deployment-proxy */ export declare const DEPLOYER_CONTRACT = "0x4e59b44847b379578588920ca78fbf26c0b4956c"; /** * The information needed to deploy a contract. */ export interface DeterministicDeploymentInfo { /** * The *deployment* bytecode for the contract. */ bytecode: BytesLike; /** * Deterministic deployment salt, defaults to the zero word if none is * specified. */ salt?: BytesLike; } export interface RealTokenDeployParams { initialTokenHolder: string; cowDao: string; totalSupply: BigNumberish; } export interface DeploymentHelperDeployParams { foreignToken: string; multiTokenMediatorGnosisChain: string; merkleRoot: string; communityFundsTarget: string; gnoToken: string; gnoPrice: BigNumberish; wrappedNativeToken: string; nativeTokenPrice: BigNumberish; } export interface VirtualTokenDeployParams { merkleRoot: string; realToken: string; communityFundsTarget: string; investorFundsTarget: string; usdcToken: string; usdcPrice: BigNumberish; gnoToken: string; gnoPrice: BigNumberish; wrappedNativeToken: string; nativeTokenPrice: BigNumberish; teamController: string; } export declare enum ContractName { RealToken = "CowProtocolToken", VirtualToken = "CowProtocolVirtualToken", BridgedTokenDeployer = "BridgedTokenDeployer", Forwarder = "Forwarder" } export interface DeployParams { [ContractName.RealToken]: RealTokenDeployParams; [ContractName.VirtualToken]: VirtualTokenDeployParams; [ContractName.BridgedTokenDeployer]: DeploymentHelperDeployParams; [ContractName.Forwarder]: Record; } export declare type ContructorInput = { [ContractName.RealToken]: [string, string, BigNumberish]; [ContractName.VirtualToken]: [ string, string, string, string, string, BigNumber, string, BigNumber, string, BigNumber, string ]; [ContractName.BridgedTokenDeployer]: [ string, string, string, string, string, BigNumber, string, BigNumber ]; [ContractName.Forwarder]: []; }; export declare function constructorInput(contract: T, params: DeployParams[T]): ContructorInput[T]; export interface DeterministicDeploymentTransaction { data: string; to: string; } export declare function deterministicallyDeploy(deploymentInfo: DeterministicDeploymentInfo, sender: Signer): Promise; export declare function deterministicDeploymentTransaction({ bytecode, salt, }: DeterministicDeploymentInfo): DeterministicDeploymentTransaction; export declare function deterministicDeploymentAddress({ bytecode, salt, }: DeterministicDeploymentInfo): string; export declare function getDeterministicDeploymentTransaction(contract: T, params: DeployParams[T], ethers: HardhatEthersHelpers, salt?: string): Promise<{ safeTransaction: MetaTransaction; address: string; }>; export declare function getNonDeterministicDeploymentTransaction(contract: T, params: DeployParams[T], createCallAddress: string, ethers: HardhatEthersHelpers): Promise<{ safeTransaction: MetaTransaction; }>; export declare function prepareRealAndVirtualDeploymentFromSafe(realTokenDeployParams: RealTokenDeployParams, virtualTokenDeployParams: Omit, multisendAddress: string, createCallAddress: string, ethers: HardhatEthersHelpers, salt?: string): Promise<{ realTokenDeployTransaction: MetaTransaction; virtualTokenDeployTransaction: MetaTransaction; deployTransaction: MetaTransaction; realTokenAddress: string; }>; export declare function prepareVirtualDeploymentFromSafe(virtualTokenDeployParams: VirtualTokenDeployParams, ethers: HardhatEthersHelpers, createCallAddress: string): Promise<{ virtualTokenDeployTransaction: MetaTransaction; }>; export declare function getDeployArgsFromRealToken(realToken: Contract): Promise; export declare function getDeployArgsFromVirtualToken(virtualToken: Contract): Promise; export declare function getDeployArgsFromBridgedTokenDeployer(bridgedTokenDeployer: Contract): Promise;