-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
302 additions
and
104 deletions.
There are no files selected for viewing
103 changes: 0 additions & 103 deletions
103
contracts/integration/GrumpyCat/GrumpyCatXERC20Adapter.sol
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { config as envConfig } from "dotenv"; | ||
import { DEFAULT_ARGS, GRUMPYCAT_CONFIG, MIDAS_CONFIG } from "../index"; | ||
|
||
envConfig(); | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
// Get the chain id | ||
const chainId = +(await hre.getChainId()); | ||
console.log("chainId", chainId); | ||
|
||
if (!GRUMPYCAT_CONFIG[chainId]) { | ||
throw new Error(`No defaults provided for ${chainId}`); | ||
} | ||
|
||
// Get the constructor args | ||
const args = [ | ||
DEFAULT_ARGS[chainId].CONNEXT, | ||
GRUMPYCAT_CONFIG[chainId].LOCKBOX, | ||
GRUMPYCAT_CONFIG[chainId].ERC20, | ||
GRUMPYCAT_CONFIG[chainId].XERC20, | ||
]; | ||
|
||
// Get the deployer | ||
const [deployer] = await hre.ethers.getSigners(); | ||
if (!deployer) { | ||
throw new Error(`Cannot find signer to deploy with`); | ||
} | ||
console.log("\n============================= Deploying MidasProtocolTarget ==============================="); | ||
console.log("deployer: ", deployer.address); | ||
console.log("constructorArgs:", args); | ||
|
||
// Deploy contract | ||
const adapter = await hre.deployments.deploy("GrumpyCatLockboxAdapter", { | ||
from: deployer.address, | ||
args: args, | ||
skipIfAlreadyDeployed: true, | ||
log: true, | ||
// deterministicDeployment: true, | ||
}); | ||
console.log(`GrumpyCatLockboxAdapter deployed to ${adapter.address}`); | ||
}; | ||
export default func; | ||
func.tags = ["grumpycat", "test", "prod"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters