diff --git a/.env.example b/.env.example index 2194556..fc1b313 100644 --- a/.env.example +++ b/.env.example @@ -8,3 +8,5 @@ OJO_CHAIN=ojo OJO_ADDRESS=ojo1es9mhmnunh208ucwq8rlrl97hqulxrz8k37dcu RESOLVE_WINDOW=7200 ASSET_LIMIT=5 +PRICE_FEED_IMPLEMENTATION_CONTRACT_ADDRESS=0xD1077c12ba7C0ED41d288F5505af2Cb23bBD680a +CLONE_FACTORY_CONTRACT_ADDRESS=0x9AaE2ac2637B9f441d1537bBdCEB712854dd426B diff --git a/contracts/pricefeed/PriceFeed.sol b/contracts/pricefeed/PriceFeed.sol index 48c760f..b0c466d 100644 --- a/contracts/pricefeed/PriceFeed.sol +++ b/contracts/pricefeed/PriceFeed.sol @@ -9,9 +9,9 @@ import "../OjoTypes.sol"; /// @title Contract for calling Ojo's oracle contract with chainlink's AggregatorV3Interface implemented. /// @author Ojo Network (https://docs.ojo.network/) contract PriceFeed is Initializable, AggregatorV3Interface { - uint8 public priceFeedDecimals; + uint8 private priceFeedDecimals; - string public priceFeedDescription; + string private priceFeedDescription; IOjo public immutable ojo; diff --git a/scripts/createPriceFeed.ts b/scripts/createPriceFeed.ts index 362e37f..41b0ac5 100644 --- a/scripts/createPriceFeed.ts +++ b/scripts/createPriceFeed.ts @@ -4,7 +4,7 @@ import testnet_chains from '../testnet_chains.json'; import mainnet_chains from '../mainnet_chains.json'; async function main() { - const cloneFactoryAddress = process.env.CLONE_FACTORY_ADDRESS as string; + const cloneFactoryAddress = process.env.CLONE_FACTORY_CONTRACT_ADDRESS as string; const priceFeedDecimals = 18; const priceFeedDescription = "ETH"; @@ -14,9 +14,9 @@ async function main() { throw new Error('Invalid private key. Make sure the PRIVATE_KEY environment variable is set.'); } - const mainnet = Boolean(process.env.MAINNET) + const mainnet = process.env.MAINNET as string let evmChains = testnet_chains.map((chain) => ({ ...chain })); - if (mainnet === true) { + if (mainnet === "TRUE") { evmChains = mainnet_chains.map((chain) => ({ ...chain })); } diff --git a/scripts/deployCloneFactory.ts b/scripts/deployCloneFactory.ts index d78f813..e5f73a3 100644 --- a/scripts/deployCloneFactory.ts +++ b/scripts/deployCloneFactory.ts @@ -4,7 +4,7 @@ import testnet_chains from '../testnet_chains.json'; import mainnet_chains from '../mainnet_chains.json'; async function main () { - const priceFeedImplementation = process.env.PRICE_FEED_IMPLEMENTATION_ADDRESS; + const priceFeedImplementation = process.env.PRICE_FEED_IMPLEMENTATION_CONTRACT_ADDRESS; const privateKey = process.env.PRIVATE_KEY; @@ -12,9 +12,9 @@ async function main () { throw new Error('Invalid private key. Make sure the PRIVATE_KEY environment variable is set.'); } - const mainnet = Boolean(process.env.MAINNET) + const mainnet = process.env.MAINNET as string let evmChains = testnet_chains.map((chain) => ({ ...chain })); - if (mainnet === true) { + if (mainnet === "TRUE") { evmChains = mainnet_chains.map((chain) => ({ ...chain })); } diff --git a/scripts/deployPriceFeedImplementation.ts b/scripts/deployPriceFeedImplementation.ts index 77368ec..491f4a1 100644 --- a/scripts/deployPriceFeedImplementation.ts +++ b/scripts/deployPriceFeedImplementation.ts @@ -4,7 +4,7 @@ import testnet_chains from '../testnet_chains.json'; import mainnet_chains from '../mainnet_chains.json'; async function main() { - const ojoAddress = process.env.OJO_ADDRESS; + const ojoAddress = process.env.OJO_CONTRACT_ADDRESS; const privateKey = process.env.PRIVATE_KEY; @@ -12,9 +12,9 @@ async function main() { throw new Error('Invalid private key. Make sure the PRIVATE_KEY environment variable is set.'); } - const mainnet = Boolean(process.env.MAINNET) + const mainnet = process.env.MAINNET as string let evmChains = testnet_chains.map((chain) => ({ ...chain })); - if (mainnet === true) { + if (mainnet === "TRUE") { evmChains = mainnet_chains.map((chain) => ({ ...chain })); }