Skip to content

Commit

Permalink
add script just to deploy a chainlink provider
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseMiguelHerrera committed Aug 7, 2024
1 parent a9d3955 commit ce61455
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions script/v2/DeployChainLinkProvider.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
pragma solidity ^0.8.17;

import "forge-std/Script.sol";
import "forge-std/console2.sol";

import {ChainlinkPriceProvider} from "../../src/v2/oracles/individual/ChainlinkPriceProvider.sol";


//forge script script/v2/DeployChainLinkProvider.s.sol --rpc-url https://arb-sepolia.g.alchemy.com/v2/SA1EqG4RW6GcciKBnPtu8n6OJqxy164t
contract DeployChainLinkProvider is Script {
function run() public {

uint256 privateKey = vm.envUint("PRIVATE_KEY");
vm.startBroadcast(privateKey);

//arbitrum main net
address arbitrumSequencer = 0xFdB631F5EE196F0ed6FAa767959853A9F217697D;
//address priceFeed = 0x0a32255dd4BB6177C994bAAc73E0606fDD568f66;
address factory = 0x442Fd67F2CcF92eD73E7B7E4ff435835EcA890C9;

//sepolia
address priceFeed = 0xD1092a65338d049DB68D7Be6bD89d17a0929945e;

uint256 timeOut = 12 hours;

ChainlinkPriceProvider chainlinkPriceProvider =
new ChainlinkPriceProvider(arbitrumSequencer, factory, priceFeed, timeOut);
console2.log(
"Chainlink Price Provider",
address(chainlinkPriceProvider)
);
}
}

0 comments on commit ce61455

Please sign in to comment.