From fd1a67aba9fbc7d8b5020b2fd8db20aa1a99670c Mon Sep 17 00:00:00 2001 From: "Simon.ZG" Date: Mon, 8 Jul 2024 15:55:03 -0700 Subject: [PATCH] feat: deploy OneJumpOralce with redstone if feed is referred by asset --- deploy/1-deploy-oracles.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deploy/1-deploy-oracles.ts b/deploy/1-deploy-oracles.ts index 05027d55..390934fe 100644 --- a/deploy/1-deploy-oracles.ts +++ b/deploy/1-deploy-oracles.ts @@ -208,7 +208,7 @@ const func: DeployFunction = async function ({ getNamedAccounts, deployments, ne throw new Error(`address for token ${asset.denominatedBy} must be configured in ADDRESSES`); } - const denominator = ADDRESSES[networkName][asset.denominatedBy]; + const denominator = ADDRESSES[networkName][`${asset.token}/${asset.denominatedBy}`]; if (chainlinkFeed[networkName] && chainlinkFeed[networkName][asset.denominatedBy]) { const chainlinkOracle = await ethers.getContract(contractName); const oneJumpName = `OneJumpOracle_${asset.denominatedBy}_Chainlink`; @@ -226,7 +226,8 @@ const func: DeployFunction = async function ({ getNamedAccounts, deployments, ne } oneJumpNames[oneJumpName] = true; } - if (redstoneFeed[networkName] && redstoneFeed[networkName][asset.denominatedBy]) { + + if (redstoneFeed[networkName] && redstoneFeed[networkName][`${asset.token}/${asset.denominatedBy}`]) { const redstoneOracle = await ethers.getContract("RedStoneOracle"); const oneJumpName = `OneJumpOracle_${asset.denominatedBy}_RedStone`; if (!oneJumpNames[oneJumpName]) {