Skip to content

Commit

Permalink
script: add deploy quoter script
Browse files Browse the repository at this point in the history
  • Loading branch information
xenide committed Sep 16, 2023
1 parent 984dad4 commit 9987ad2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"clean": "forge clean",
"deploy:avax:test": "forge script script/deploy_router_timelock_asset_manager.s.sol --target-contract DeployRouterTimeLockAaveManager --fork-url \"http://127.0.0.1:8545\" --broadcast -vvvv --verify --ledger --mnemonic-derivation-paths \"m/44'/60'/0'/0/4\" --sender 0x5c5c2a70504AfD08845D5Ee6fD77E98E0bC3dFcd",
"deploy:avax": "forge script script/deploy_router_timelock_asset_manager.s.sol --target-contract DeployRouterTimeLockAaveManager --fork-url \"https://api.avax.network/ext/bc/C/rpc\" --broadcast -vvvv --verify --ledger --mnemonic-derivation-paths \"m/44'/60'/0'/0/4\" --sender 0x5c5c2a70504AfD08845D5Ee6fD77E98E0bC3dFcd",
"deploy:avax:quoter": "forge script script/deploy_quoter.s.sol --target-contract DeployQuoter --fork-url \"https://api.avax.network/ext/bc/C/rpc\" --broadcast -vvvv --verify --ledger --mnemonic-derivation-paths \"m/44'/60'/0'/0/4\" --sender 0x5c5c2a70504AfD08845D5Ee6fD77E98E0bC3dFcd",
"eslint": "npm run eslint:check",
"eslint:check": "eslint scripts",
"eslint:fix": "eslint scripts --fix",
Expand Down
23 changes: 23 additions & 0 deletions script/deploy_quoter.s.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "forge-std/Script.sol";

import { Quoter } from "src/Quoter.sol";

contract DeployQuoter is Script {
address internal constant FACTORY = 0xDd723D9273642D82c5761a4467fD5265d94a22da;
address internal constant WETH_AVAX_MAINNET = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;

function run() external {
vm.startBroadcast(msg.sender);
_deployQuoter();
vm.stopBroadcast();
}

function _deployQuoter() internal {
Quoter lQuoter = new Quoter(FACTORY, WETH_AVAX_MAINNET);
require(address(lQuoter.factory()) == FACTORY);
require(address(lQuoter.WETH()) == WETH_AVAX_MAINNET);
}
}

0 comments on commit 9987ad2

Please sign in to comment.