generated from rajput-hemant/react-template-vite
-
Notifications
You must be signed in to change notification settings - Fork 4
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
5 changed files
with
4,445 additions
and
86 deletions.
There are no files selected for viewing
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,46 @@ | ||
require("@nomicfoundation/hardhat-toolbox"); | ||
//require("@nomiclabs/hardhat-etherscan"); | ||
|
||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
module.exports = { | ||
solidity: { | ||
compilers: [ | ||
{ | ||
version: "0.8.21", | ||
settings: { | ||
optimizer: { | ||
enabled: true, | ||
runs: 3000, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
networks: { | ||
scrollSepolia: { | ||
url: "https://sepolia-rpc.scroll.io/" || "", | ||
accounts: | ||
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], | ||
}, | ||
zkEVM_testnet: { | ||
url: "https://rpc.public.zkevm-test.net" || "", | ||
accounts: | ||
process.env.PRIVATE_KEY !== undefined ? [process.env.PRIVATE_KEY] : [], | ||
}, | ||
}, | ||
etherscan: { | ||
apiKey: { | ||
scrollSepolia: '2TWMJ1A7DVHAC1TH538S6IWJ5UT5T9VKTP', | ||
}, | ||
customChains: [ | ||
{ | ||
network: 'scrollSepolia', | ||
chainId: 534351, | ||
urls: { | ||
apiURL: 'https://sepolia-blockscout.scroll.io/api', | ||
browserURL: 'https://sepolia-blockscout.scroll.io/', | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
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,41 @@ | ||
// We require the Hardhat Runtime Environment explicitly here. This is optional | ||
// but useful for running the script in a standalone fashion through `node <script>`. | ||
// | ||
// You can also run a script with `npx hardhat run <script>`. If you do that, Hardhat | ||
// will compile your contracts, add the Hardhat Runtime Environment's members to the | ||
// global scope, and execute the script. | ||
const hre = require("hardhat"); | ||
|
||
async function main() { | ||
const maToken = await hre.ethers.deployContract("MockERC20", ["MockAToken", "maToken"]); | ||
await maToken.waitForDeployment(); | ||
const maTokenAddress = await maToken.getAddress(); | ||
console.log("maTokenAddress", maTokenAddress); | ||
|
||
const mockPool = await hre.ethers.deployContract("MockPool", [maTokenAddress]); | ||
await mockPool.waitForDeployment(); | ||
const mockPoolAddress = await mockPool.getAddress(); | ||
console.log("mockPoolAddress", mockPoolAddress); | ||
|
||
const mockPoolAddressesProvider = await hre.ethers.deployContract("MockPoolAddressesProvider", [mockPoolAddress]); | ||
await mockPoolAddressesProvider.waitForDeployment(); | ||
const mockPoolAddressesProviderAddress = await mockPoolAddressesProvider.getAddress(); | ||
console.log("mockPoolAddressesProviderAddress", mockPoolAddressesProviderAddress); | ||
|
||
const mockDAI = await hre.ethers.deployContract("MockERC20", ["MockDAI", "mDAI"]); | ||
await mockDAI.waitForDeployment(); | ||
const mockDAIAddress = await mockDAI.getAddress(); | ||
console.log("mockDAIAddress", mockDAIAddress); | ||
|
||
const lapuVault = await hre.ethers.deployContract("LapuVault", ["0x15bc81b35a8498cee37E2C7B857538B006CeCAa5", mockDAIAddress, "LapuVault", "LAPU", mockPoolAddressesProviderAddress, maTokenAddress]); | ||
await lapuVault.waitForDeployment(); | ||
const lapuVaultAddress = await lapuVault.getAddress(); | ||
console.log("lapuVaultAddress", lapuVaultAddress); | ||
} | ||
|
||
// We recommend this pattern to be able to use async/await everywhere | ||
// and properly handle errors. | ||
main().catch((error) => { | ||
console.error(error); | ||
process.exitCode = 1; | ||
}); |
Oops, something went wrong.