Skip to content

Commit

Permalink
add contract deployer
Browse files Browse the repository at this point in the history
  • Loading branch information
Faulty Tolly committed Dec 17, 2024
1 parent b94e91b commit 2757edd
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions contracts/ignition/deploy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
async function main() {
const [deployer] = await ethers.getSigners();

console.log("Deploying contract with the account:", deployer.address);

const PriceOracle = await ethers.getContractFactory("PriceOracle");

// Constructor parameters
const expirationOffset = 3600; // For example, 1 hour
const assetInfos = [
{
localNetworkName: "0xTokenAddress1",
oracleNetworkName: "OracleDenom1",
localNetworkPrecision: 18,
},
// Add more assets as needed
];
const boundThreshold = 500; // For example

const priceOracle = await PriceOracle.deploy(
expirationOffset,
assetInfos,
boundThreshold
);

console.log("Price Oracle deployed at:", priceOracle.address);
}

main()
.then(() => process.exit(0))
.catch((error) => {
console.error(error);
process.exit(1);
});

0 comments on commit 2757edd

Please sign in to comment.