Initial Commit
This commit is contained in:
30
scripts/deploySOracle.js
Normal file
30
scripts/deploySOracle.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const hre = require("hardhat");
|
||||
|
||||
async function main() {
|
||||
const privateKey = process.env.pk
|
||||
|
||||
const deployer = new ethers.Wallet(privateKey, ethers.provider);
|
||||
|
||||
console.log(
|
||||
"Deploying contracts with the account:",
|
||||
deployer.address
|
||||
);
|
||||
|
||||
// 3) Get the ContractFactory
|
||||
const SPriceOracle = await hre.ethers.getContractFactory("UsdcQuoteV3", deployer);
|
||||
|
||||
// 4) Deploy
|
||||
const contract = await SPriceOracle.deploy();
|
||||
await contract.waitForDeployment();
|
||||
|
||||
console.log("Contract deployed at:", contract.address);
|
||||
|
||||
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => process.exit(0))
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user