Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcap arb mainnet oracle script #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions deploy/arbitrum/004_reference_oracles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ module.exports = async ({ getNamedAccounts, deployments }: any) => {
const { deployIfDifferent, log } = deployments;
const { deployer } = await getNamedAccounts();

let JPEGZOracle, WETHOracle, DAIOracle;
let JPEGZOracle, WETHOracle, DAIOracle, TCAPOracle;

//params
const l2MessageExecutorProxy = await deployments.get("L2MessageExecutorProxy");
const l2MessageExecutorProxy = await deployments.get(
"L2MessageExecutorProxy"
);
const daiAggregator = "0xc5C8E77B397E531B8EC06BFb0048328B30E9eCfB";
const jpegzAggregator = "0x8D0e319eBAA8DF32e088e469062F85abF2eBe599";
const ethAggregator = "0x639Fe6ab55C921f74e7fac1ee960C0B6293ba612";
const tcapAggregator = "0x4763b84cdBc5211B9e0a57D5E39af3B3b2440012";

try {
DAIOracle = await deployments.get("DAIOracle");
Expand Down Expand Up @@ -74,6 +77,26 @@ module.exports = async ({ getNamedAccounts, deployments }: any) => {
);
}
}
try {
TCAPOracle = await deployments.get("TCAPOracle");
} catch (error: any) {
log(error.message);

const deployResult = await deployments.deploy("TCAPOracle", {
from: deployer,
contract: "ChainlinkOracle",
skipIfAlreadyDeployed: true,
log: true,
args: [tcapAggregator, l2MessageExecutorProxy.address],
});

DAIOracle = await deployments.get("TCAPOracle");
if (deployResult.newlyDeployed) {
log(
`Oracle deployed at ${TCAPOracle.address} for ${deployResult.receipt.gasUsed}`
);
}
}
}
};
module.exports.tags = ["Oracle", "ChainlinkOracle"];