-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Deploy & verify Legacy Multsiig * Non-AMM Base Bridge Deploys * Add USDB / WETH predeploys to deployments/ * Base AMM Deployments, nUSD & nETH Pools, SwapETHWrapper * deploy SwapETHWrapper (Missed in last commit) * Fix Blast url * Deploy/blast synapse router (#317) * Add blast settings * Deploy aux contracts * Prep for Router deployment * Deploy QuoterV2 and RouterV1 * Save blast configs * Deploy: blast fb router (#318) * Add Blast deployment of FastBridge * Deploy FB Router --------- Co-authored-by: ChiTimesChi <[email protected]>
- Loading branch information
1 parent
5d46220
commit 47fe6e8
Showing
54 changed files
with
22,881 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { CHAIN_ID } from "../../utils/network"; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts, getChainId } = hre; | ||
const { execute, get, getOrNull, log, read, save } = deployments; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
// Manually check if the pool is already deployed | ||
let ETHPool = await getOrNull("ETHPool"); | ||
if (ETHPool) { | ||
log(`reusing "ETHPool" at ${ETHPool.address}`); | ||
} else if ((await getChainId()) != CHAIN_ID.BLAST && (await getChainId()) != CHAIN_ID.HARDHAT) { | ||
log(`Not Blast or Hardhat`); | ||
} else { | ||
// Constructor arguments | ||
const TOKEN_ADDRESSES = [(await get("nETH")).address, (await get("WETH")).address]; | ||
const TOKEN_DECIMALS = [18, 18]; | ||
const LP_TOKEN_NAME = "nETH-LP"; | ||
const LP_TOKEN_SYMBOL = "nETH-LP"; | ||
const INITIAL_A = 500; | ||
const SWAP_FEE = 1e6; // 4bps | ||
const ADMIN_FEE = 9900000000; | ||
|
||
const receipt = await execute( | ||
"SwapDeployer", | ||
{ from: deployer, log: true }, | ||
"deploy", | ||
( | ||
await get("SwapFlashLoan") | ||
).address, | ||
TOKEN_ADDRESSES, | ||
TOKEN_DECIMALS, | ||
LP_TOKEN_NAME, | ||
LP_TOKEN_SYMBOL, | ||
INITIAL_A, | ||
SWAP_FEE, | ||
ADMIN_FEE, | ||
( | ||
await get("LPToken") | ||
).address | ||
); | ||
|
||
const newPoolEvent = receipt?.events?.find((e: any) => e["event"] == "NewSwapPool"); | ||
const usdSwapAddress = newPoolEvent["args"]["swapAddress"]; | ||
log(`deployed ETH pool clone (targeting "SwapFlashLoan") at ${usdSwapAddress}`); | ||
await save("ETHPool", { | ||
abi: (await get("SwapFlashLoan")).abi, | ||
address: usdSwapAddress, | ||
}); | ||
|
||
const lpTokenAddress = (await read("ETHPool", "swapStorage")).lpToken; | ||
log(`ETH pool LP Token at ${lpTokenAddress}`); | ||
|
||
await save("ETHPoolLPToken", { | ||
abi: (await get("WETH")).abi, // Generic ERC20 ABI | ||
address: lpTokenAddress, | ||
}); | ||
} | ||
}; | ||
export default func; | ||
func.tags = ["BLAST_ETHPool"]; | ||
func.dependencies = ["SwapUtils", "SwapDeployer", "SwapFlashLoan", "USDPoolTokens"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { DeployFunction } from "hardhat-deploy/types"; | ||
import { HardhatRuntimeEnvironment } from "hardhat/types"; | ||
import { CHAIN_ID } from "../../utils/network"; | ||
|
||
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { | ||
const { deployments, getNamedAccounts, getChainId } = hre; | ||
const { deploy, get } = deployments; | ||
const { deployer } = await getNamedAccounts(); | ||
|
||
if ((await getChainId()) === CHAIN_ID.BLAST) { | ||
await deploy("SwapEthWrapper", { | ||
from: deployer, | ||
log: true, | ||
skipIfAlreadyDeployed: true, | ||
args: [ | ||
(await get("WETH")).address, | ||
(await get("ETHPool")).address, | ||
(await get("DevMultisig")).address, | ||
], | ||
}); | ||
} | ||
}; | ||
export default func; | ||
func.tags = ["BLAST_SwapEthWrapper"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
81457 |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"address": "0xa6190aBC82427800935E0598892f7488a7F73A04", | ||
"constructorArgs": "0x" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"address": "0x0000000000Cc5af216a3E1614091a20e11bbfD32", | ||
"constructorArgs": "0x", | ||
"abi": [ | ||
{ | ||
"type": "function", | ||
"name": "calculateAddLiquidity", | ||
"inputs": [ | ||
{ | ||
"name": "pool", | ||
"type": "address", | ||
"internalType": "address" | ||
}, | ||
{ | ||
"name": "amounts", | ||
"type": "uint256[]", | ||
"internalType": "uint256[]" | ||
} | ||
], | ||
"outputs": [ | ||
{ | ||
"name": "amountOut", | ||
"type": "uint256", | ||
"internalType": "uint256" | ||
} | ||
], | ||
"stateMutability": "view" | ||
} | ||
] | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"address": "0x11EB5B6C45fB7E70aDf6a639E6C9CF58F0073aa9", | ||
"abi": [{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":""}],"name":"owners","inputs":[{"type":"uint256","name":""}],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"removeOwner","inputs":[{"type":"address","name":"owner"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"revokeConfirmation","inputs":[{"type":"uint256","name":"transactionId"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isOwner","inputs":[{"type":"address","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"confirmations","inputs":[{"type":"uint256","name":""},{"type":"address","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"calcMaxWithdraw","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"count"}],"name":"getTransactionCount","inputs":[{"type":"bool","name":"pending"},{"type":"bool","name":"executed"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"dailyLimit","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"lastDay","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"addOwner","inputs":[{"type":"address","name":"owner"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"bool","name":""}],"name":"isConfirmed","inputs":[{"type":"uint256","name":"transactionId"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":"count"}],"name":"getConfirmationCount","inputs":[{"type":"uint256","name":"transactionId"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address","name":"destination"},{"type":"uint256","name":"value"},{"type":"bytes","name":"data"},{"type":"bool","name":"executed"}],"name":"transactions","inputs":[{"type":"uint256","name":""}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":""}],"name":"getOwners","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256[]","name":"_transactionIds"}],"name":"getTransactionIds","inputs":[{"type":"uint256","name":"from"},{"type":"uint256","name":"to"},{"type":"bool","name":"pending"},{"type":"bool","name":"executed"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"address[]","name":"_confirmations"}],"name":"getConfirmations","inputs":[{"type":"uint256","name":"transactionId"}],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"transactionCount","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"changeRequirement","inputs":[{"type":"uint256","name":"_required"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"confirmTransaction","inputs":[{"type":"uint256","name":"transactionId"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[{"type":"uint256","name":"transactionId"}],"name":"submitTransaction","inputs":[{"type":"address","name":"destination"},{"type":"uint256","name":"value"},{"type":"bytes","name":"data"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"changeDailyLimit","inputs":[{"type":"uint256","name":"_dailyLimit"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"MAX_OWNER_COUNT","inputs":[],"constant":true},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"required","inputs":[],"constant":true},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"replaceOwner","inputs":[{"type":"address","name":"owner"},{"type":"address","name":"newOwner"}],"constant":false},{"type":"function","stateMutability":"nonpayable","payable":false,"outputs":[],"name":"executeTransaction","inputs":[{"type":"uint256","name":"transactionId"}],"constant":false},{"type":"function","stateMutability":"view","payable":false,"outputs":[{"type":"uint256","name":""}],"name":"spentToday","inputs":[],"constant":true},{"type":"constructor","stateMutability":"nonpayable","payable":false,"inputs":[{"type":"address[]","name":"_owners"},{"type":"uint256","name":"_required"},{"type":"uint256","name":"_dailyLimit"}]},{"type":"fallback","stateMutability":"payable","payable":true},{"type":"event","name":"DailyLimitChange","inputs":[{"type":"uint256","name":"dailyLimit","indexed":false}],"anonymous":false},{"type":"event","name":"Confirmation","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"uint256","name":"transactionId","indexed":true}],"anonymous":false},{"type":"event","name":"Revocation","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"uint256","name":"transactionId","indexed":true}],"anonymous":false},{"type":"event","name":"Submission","inputs":[{"type":"uint256","name":"transactionId","indexed":true}],"anonymous":false},{"type":"event","name":"Execution","inputs":[{"type":"uint256","name":"transactionId","indexed":true}],"anonymous":false},{"type":"event","name":"ExecutionFailure","inputs":[{"type":"uint256","name":"transactionId","indexed":true}],"anonymous":false},{"type":"event","name":"Deposit","inputs":[{"type":"address","name":"sender","indexed":true},{"type":"uint256","name":"value","indexed":false}],"anonymous":false},{"type":"event","name":"OwnerAddition","inputs":[{"type":"address","name":"owner","indexed":true}],"anonymous":false},{"type":"event","name":"OwnerRemoval","inputs":[{"type":"address","name":"owner","indexed":true}],"anonymous":false},{"type":"event","name":"RequirementChange","inputs":[{"type":"uint256","name":"required","indexed":false}],"anonymous":false}] | ||
} |
Oops, something went wrong.