generated from dymensionxyz/rollapp
-
Notifications
You must be signed in to change notification settings - Fork 28
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
Faulty Tolly
committed
Dec 17, 2024
1 parent
b94e91b
commit 2757edd
Showing
1 changed file
with
34 additions
and
0 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,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); | ||
}); |