Skip to content

Commit

Permalink
Merge pull request #2 from MattPereira/deploy-example-on-sepolia
Browse files Browse the repository at this point in the history
Repo start up and deploy test on sepolia
  • Loading branch information
MattPereira authored Mar 12, 2024
2 parents 465d7d4 + 2c31f14 commit 367e7ad
Show file tree
Hide file tree
Showing 7 changed files with 1,700 additions and 41 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { Contract } from "ethers";
// import { Contract } from "ethers";

/**
* Deploys a contract named "YourContract" using the deployer account and
* Deploys a contract named "ConstantPricePool" using the deployer account and
* constructor arguments set to the deployer address
*
* @param hre HardhatRuntimeEnvironment object.
Expand All @@ -22,23 +22,24 @@ const deployYourContract: DeployFunction = async function (hre: HardhatRuntimeEn
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;

await deploy("YourContract", {
const vaultAddress = "0xDaa273AeEc06e9CCb7428a77E2abb1E4659B16D2";
const tokenName = "Constant Price Pool";
const tokenSymbol = "CPP";
const args = [vaultAddress, tokenName, tokenSymbol];

await deploy("ConstantPricePool", {
from: deployer,
// Contract constructor arguments
args: [deployer],
args, // contract constructor arguments
log: true,
// autoMine: can be passed to the deploy function to make the deployment process faster on local networks by
// automatically mining the contract deployment transaction. There is no effect on live networks.
autoMine: true,
});

// Get the deployed contract to interact with it after deploying.
const yourContract = await hre.ethers.getContract<Contract>("YourContract", deployer);
console.log("👋 Initial greeting:", await yourContract.greeting());
// const yourContract = await hre.ethers.getContract<Contract>("ConstantPricePool", deployer);
// const poolTokens = await ConstantPricePool.getPoolTokens());
};

export default deployYourContract;

// Tags are useful if you have multiple deploy files and only want to run one of them.
// e.g. yarn deploy --tags YourContract
deployYourContract.tags = ["YourContract"];
deployYourContract.tags = ["constant", "all"];
1 change: 1 addition & 0 deletions packages/hardhat/deployments/sepolia/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11155111
Loading

0 comments on commit 367e7ad

Please sign in to comment.