Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
alcueca committed Oct 18, 2023
1 parent dad85ee commit 18bcaa9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ repayment approval.

Contracts are deployed at the same address for all supported networks.

| Contract | Lender | Address | Networks |
| ------------------------------------------------------ | ----------- | ------------------------------------------ | ---------------------- |
| Contract | Lender | Address | Networks |
| ------------------------------------------------------ | ----------- | ------------------------------------------ | ---------------------------------------- |
| [AaveWrapper](src/aave/AaveWrapper.sol) | Aave v3 | 0x9D4D2C08b29A2Db1c614483cd8971734BFDCC9F2 | Mainnet, Arbitrum One, Optimism, Polygon |
| [BalancerWrapper](src/balancer/BalancerWrapper.sol) | Balancer v2 | 0x9E092cb431e5F1aa70e47e052773711d2Ba4917E | Mainnet, Arbitrum One, Optimism, Polygon |
| [UniswapV3Wrapper](src/uniswapV3/UniswapV3Wrapper.sol) | Uniswap v3 | 0x716cef3F74d4C27B6EE206E51dFcf1D61e66dA7f | Mainnet, Arbitrum One, Optimism, Polygon |
Expand Down
5 changes: 2 additions & 3 deletions script/AaveDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,23 @@ contract AaveDeploy is Script {
POLYGON,
OPTIMISM
}

bytes32 public constant SALT = keccak256("alcueca-2");
Network public constant NETWORK = Network.MAINNET;

mapping(Network network => IPoolAddressesProvider) public providers;

address internal factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;

constructor () {
constructor() {
providers[Network.MAINNET] = IPoolAddressesProvider(0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e);
providers[Network.ARBITRUM] = IPoolAddressesProvider(0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb);
providers[Network.POLYGON] = IPoolAddressesProvider(0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb);
providers[Network.OPTIMISM] = IPoolAddressesProvider(0xa97684ead0e402dC232d5A977953DF7ECBaB3CDb);
}


IPoolAddressesProvider internal provider = IPoolAddressesProvider(0x2f39d218133AFaB8F2B819B1066c7E434Ad94E9e);


function run() public {
console2.log("Deploying as %s", msg.sender);

Expand Down
1 change: 0 additions & 1 deletion script/BalancerDeploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ contract BalancerDeploy is Script {
bytes32 public constant SALT = keccak256("alcueca-2");
IFlashLoaner internal balancer = IFlashLoaner(0xBA12222222228d8Ba445958a75a0704d566BF2C8);


function run() public {
console2.log("Deploying as %s", msg.sender);

Expand Down
9 changes: 6 additions & 3 deletions script/UniswapV3Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ contract UniswapV3Deploy is Script {
POLYGON,
OPTIMISM
}

bytes32 public constant SALT = keccak256("alcueca-2");
Network public constant NETWORK = Network.MAINNET;

Expand All @@ -25,7 +26,7 @@ contract UniswapV3Deploy is Script {
Registry internal registry = Registry(0x1BFf8Eee6ECF1c8155E81dba8894CE9cF49a220c);
address internal factory = 0x1F98431c8aD98523631AE4a59f267346ea31F984;

constructor () {
constructor() {
tokens[Network.MAINNET]["USDC"] = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48;
tokens[Network.MAINNET]["USDT"] = 0xdAC17F958D2ee523a2206206994597C13D831ec7;
tokens[Network.MAINNET]["WETH"] = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
Expand All @@ -44,12 +45,14 @@ contract UniswapV3Deploy is Script {
console2.log("Deploying as %s", msg.sender);

vm.startBroadcast();
bytes memory params = abi.encode(factory, tokens[NETWORK]["WETH"], tokens[NETWORK]["USDC"], tokens[NETWORK]["USDT"]);
bytes memory params =
abi.encode(factory, tokens[NETWORK]["WETH"], tokens[NETWORK]["USDC"], tokens[NETWORK]["USDT"]);
if (keccak256(registry.get("UniswapV3Wrapper")) != keccak256(params)) {
registry.set("UniswapV3Wrapper", params);
}

(address _factory, address _weth, address _usdc, address _usdt) = abi.decode(registry.get("UniswapV3Wrapper"), (address, address, address, address));
(address _factory, address _weth, address _usdc, address _usdt) =
abi.decode(registry.get("UniswapV3Wrapper"), (address, address, address, address));
console2.log("Factory: %s", _factory);
console2.log("WETH: %s", _weth);
console2.log("USDC: %s", _usdc);
Expand Down

0 comments on commit 18bcaa9

Please sign in to comment.