Skip to content
Merged
Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions deployments/deploy-ethereum-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,12 @@ RepayerRoutes:
│ 20 │ '0x4ce56b5D7e79dF121aF2eC055D096eF983F459e6' │ 'ARBITRUM_ONE' │ 'EVERCLEAR' │ true │
│ 21 │ '0x578aD20ec27E11B3772F91cc6f435d782cc362EA' │ 'ETHEREUM' │ 'LOCAL' │ false │
└─────────┴──────────────────────────────────────────────┴────────────────┴─────────────┴───────────────────┘

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying USDC Pool
Using config for: stage, ETHEREUM
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V4-7187ffa: 0x626afF63118191b6202636848711c0645AFED94D
16 changes: 8 additions & 8 deletions deployments/deployments.staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ eip155:8453:
deployment id: MVP
env: stage
name: BASE
LiquidityPoolAaveUSDC: "0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683"
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
LiquidityPoolAaveUSDC: "0x4e13849d29a9a7A200196DC16722ddeb67b6e769"
LiquidityPoolUSDC: "0x626afF63118191b6202636848711c0645AFED94D"
SprinterUSDCLPShare: "0xCb85b9fEFcA1316EFe0B7E1965A8922701fF502f"
LiquidityHub: "0x6FD4142Be84134C5a6D45d454529A6C3c9573B61"
SprinterLiquidityMining: "0xa85Aa9ac9EaC15BA8636cE4C8014135bC34B0525"
Expand All @@ -17,8 +17,8 @@ eip155:10:
deployment id: MVP
env: stage
name: OP_MAINNET
LiquidityPoolAaveUSDC: "0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683"
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
LiquidityPoolAaveUSDC: "0x4e13849d29a9a7A200196DC16722ddeb67b6e769"
LiquidityPoolUSDC: "0x626afF63118191b6202636848711c0645AFED94D"
CensoredTransferFromMulticall: "0xd0A630c391daEb244369DB0f75CBDF7dFeEaEaC3"
USDC: "0x0b2c639c533813f4aa9d7837caf62653d097ff85"
Rebalancer: "0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9"
Expand All @@ -29,9 +29,9 @@ eip155:42161:
deployment id: MVP
env: stage
name: ARBITRUM_ONE
LiquidityPoolAaveUSDC: "0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683"
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
LiquidityPoolAaveUSDCLongTerm: "0x4ce56b5D7e79dF121aF2eC055D096eF983F459e6"
LiquidityPoolAaveUSDC: "0x4e13849d29a9a7A200196DC16722ddeb67b6e769"
LiquidityPoolUSDC: "0x626afF63118191b6202636848711c0645AFED94D"
LiquidityPoolAaveUSDCLongTerm: "0x072AFfAa29E812A9F680ba1266a9c61Ac10d3853"
LiquidityPoolPublicUSDC: "0xEBa34aE94CFf4142E30544F86D210b1807BdCb42"
ERC4626AdapterUSDC: "0x5291A3582a7eC37BA800327f7Cd1e0bF137A4ec0"
CensoredTransferFromMulticall: "0xd0A630c391daEb244369DB0f75CBDF7dFeEaEaC3"
Expand All @@ -44,7 +44,7 @@ eip155:1:
deployment id: MVP
env: stage
name: ETHEREUM
LiquidityPoolUSDC: "0x578aD20ec27E11B3772F91cc6f435d782cc362EA"
LiquidityPoolUSDC: "0x626afF63118191b6202636848711c0645AFED94D"
CensoredTransferFromMulticall: "0xd0A630c391daEb244369DB0f75CBDF7dFeEaEaC3"
USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
Rebalancer: "0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9"
Expand Down
9 changes: 9 additions & 0 deletions deployments/redeploy-usdcpool-arbitrumone-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, ARBITRUM_ONE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V3-e09cc75: 0x578aD20ec27E11B3772F91cc6f435d782cc362EA

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying USDC Pool
Using config for: stage, ARBITRUM_ONE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V4-7187ffa: 0x626afF63118191b6202636848711c0645AFED94D
9 changes: 9 additions & 0 deletions deployments/redeploy-usdcpool-base-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, BASE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V3-e09cc75: 0x578aD20ec27E11B3772F91cc6f435d782cc362EA

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying USDC Pool
Using config for: stage, BASE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V4-7187ffa: 0x626afF63118191b6202636848711c0645AFED94D
9 changes: 9 additions & 0 deletions deployments/redeploy-usdcpool-opmainnet-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, OP_MAINNET
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V3-e09cc75: 0x578aD20ec27E11B3772F91cc6f435d782cc362EA

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying USDC Pool
Using config for: stage, OP_MAINNET
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying USDC Liquidity Pool
LiquidityPoolUSDC-V4-7187ffa: 0x626afF63118191b6202636848711c0645AFED94D
9 changes: 9 additions & 0 deletions deployments/redeploy-usdcpoolaave-arbitrumone-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, ARBITRUM_ONE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Liquidity Pool
LiquidityPoolAaveUSDC-V3-e09cc75: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying Aave USDC Pool
Using config for: stage, ARBITRUM_ONE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Liquidity Pool
LiquidityPoolAaveUSDC-V4-7187ffa: 0x4e13849d29a9a7A200196DC16722ddeb67b6e769
9 changes: 9 additions & 0 deletions deployments/redeploy-usdcpoolaave-base-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, BASE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Liquidity Pool
LiquidityPoolAaveUSDC-V3-e09cc75: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying Aave USDC Pool
Using config for: stage, BASE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Liquidity Pool
LiquidityPoolAaveUSDC-V4-7187ffa: 0x4e13849d29a9a7A200196DC16722ddeb67b6e769
9 changes: 9 additions & 0 deletions deployments/redeploy-usdcpoolaave-opmainnet-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, OP_MAINNET
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Liquidity Pool
LiquidityPoolAaveUSDC-V3-e09cc75: 0x2B7899f3d553FCcf61122BdA60f5f9a9AE390683

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying Aave USDC Pool
Using config for: stage, OP_MAINNET
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Liquidity Pool
LiquidityPoolAaveUSDC-V4-7187ffa: 0x4e13849d29a9a7A200196DC16722ddeb67b6e769
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,12 @@ Using config for: stage, ARBITRUM_ONE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Long Term Liquidity Pool
LiquidityPoolAaveUSDCLongTerm-V2-e09cc75: 0x4ce56b5D7e79dF121aF2eC055D096eF983F459e6

Deployer: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
DEPLOYER_ADDRESS: 0xdBD91aD22bE5304e385b7b0A2Cfe91164e416e11
Deployment ID: MVP
Deploying Aave USDC Long Term Pool
Using config for: stage, ARBITRUM_ONE
Rebalancer: 0x34Df9cD75fA0b4d8fF300AeDf7591f79dFdd61C9
Deploying Aave USDC Long Term Liquidity Pool
LiquidityPoolAaveUSDCLongTerm-V3-7187ffa: 0x072AFfAa29E812A9F680ba1266a9c61Ac10d3853
13 changes: 13 additions & 0 deletions deployments/upgrade-liquidityhub-base-stage.log
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,16 @@ To finalize upgrade send the following transaction from ProxyAdmin owner: 0x2D5B
To: 0x806BA52Fad6BED2EE431e4a3CC436B3F3Da54aED
Value: 0
Data: 0x9623609d0000000000000000000000006fd4142be84134c5a6d45d454529a6c3c9573b61000000000000000000000000b7b59d39041ad311d4d46b90a85e3b4f5fad3e9d00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000

Deployment ID: MVP
Upgrade ID: MVP3
Upgrading Liquidity Hub
Using config for: stage, BASE
Liquidity Pool: 0x4e13849d29a9a7A200196DC16722ddeb67b6e769
New LiquidityHub implementation deployed to 0xA5903B26a940Dd4Bb35484bc6611F265A94f94bf
Simulating LiquidityHub upgrade.
Success.
To finalize upgrade send the following transaction from ProxyAdmin owner: 0x2D5B6C193C39D2AECb4a99052074E6F325258a0f
To: 0x806BA52Fad6BED2EE431e4a3CC436B3F3Da54aED
Value: 0
Data: 0x9623609d0000000000000000000000006fd4142be84134c5a6d45d454529a6c3c9573b61000000000000000000000000a5903b26a940dd4bb35484bc6611f265a94f94bf00000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000
32 changes: 21 additions & 11 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,18 @@ task("set-routes-rebalancer", "Update Rebalancer config")

task("update-routes-rebalancer", "Update Rebalancer routes based on current network config")
.addOptionalParam("rebalancer", "Rebalancer address or id", "Rebalancer", types.string)
.addOptionalParam("action", "Action to perform, allow, deny, or both (default)", "both", types.string)
.setAction(async (args: {
rebalancer: string,
action: string,
}, hre) => {
const {resolveProxyXAddress, resolveXAddress} = await loadTestHelpers();
const {getNetworkConfig, addLocalPools} = await loadScriptHelpers();
const {network, config} = await getNetworkConfig();

const [admin] = await hre.ethers.getSigners();

assert(["allow", "deny", "both"].includes(args.action), "Invalid action");
const targetAddress = await resolveProxyXAddress(args.rebalancer);
const target = (await hre.ethers.getContractAt("Rebalancer", targetAddress, admin)) as Rebalancer;
const onchainRoutes = await target.getAllRoutes();
Expand Down Expand Up @@ -190,7 +193,7 @@ task("update-routes-rebalancer", "Update Rebalancer routes based on current netw
domains: DomainSolidity[el.Domain],
providers: ProviderSolidity[el.Provider],
}));
if (hasRole) {
if (hasRole && (args.action === "allow" || args.action === "both")) {
await target.setRoute(
toAllowParams.map(el => el.pools),
toAllowParams.map(el => el.domains),
Expand All @@ -217,7 +220,7 @@ task("update-routes-rebalancer", "Update Rebalancer routes based on current netw
domains: DomainSolidity[el.Domain],
providers: ProviderSolidity[el.Provider],
}));
if (hasRole) {
if (hasRole && (args.action === "deny" || args.action === "both")) {
await target.setRoute(
toDenyParams.map(el => el.pools),
toDenyParams.map(el => el.domains),
Expand Down Expand Up @@ -283,15 +286,18 @@ task("set-routes-repayer", "Update Repayer config")

task("update-routes-repayer", "Update Repayer routes based on current network config")
.addOptionalParam("repayer", "Repayer address or id", "Repayer", types.string)
.addOptionalParam("action", "Action to perform, allow, deny, or both (default)", "both", types.string)
.setAction(async (args: {
repayer: string,
action: string,
}, hre) => {
const {resolveProxyXAddress, resolveXAddress} = await loadTestHelpers();
const {getNetworkConfig, addLocalPools} = await loadScriptHelpers();
const {network, config} = await getNetworkConfig();

const [admin] = await hre.ethers.getSigners();

assert(["allow", "deny", "both"].includes(args.action), "Invalid action");
const targetAddress = await resolveProxyXAddress(args.repayer);
const target = (await hre.ethers.getContractAt("Repayer", targetAddress, admin)) as Repayer;
const onchainRoutes = await target.getAllRoutes();
Expand Down Expand Up @@ -349,7 +355,7 @@ task("update-routes-repayer", "Update Repayer routes based on current network co
providers: ProviderSolidity[el.Provider],
supportsAllTokens: el.SupportsAllTokens,
}));
if (hasRole) {
if (hasRole && (args.action === "deny" || args.action === "both")) {
await target.setRoute(
toDenyParams.map(el => el.pools),
toDenyParams.map(el => el.domains),
Expand Down Expand Up @@ -378,7 +384,7 @@ task("update-routes-repayer", "Update Repayer routes based on current network co
providers: ProviderSolidity[el.Provider],
supportsAllTokens: el.SupportsAllTokens,
}));
if (hasRole) {
if (hasRole && (args.action === "allow" || args.action === "both")) {
await target.setRoute(
toAllowParams.map(el => el.pools),
toAllowParams.map(el => el.domains),
Expand All @@ -403,8 +409,10 @@ task("update-routes-repayer", "Update Repayer routes based on current network co

task("add-tokens-repayer", "Add input output tokens based on current network configs")
.addOptionalParam("repayer", "Repayer address or id", "Repayer", types.string)
.addOptionalParam("check", "Check if tokens are already allowed", true, types.boolean)
.setAction(async (args: {
repayer: string,
check: boolean,
}, hre) => {
const {resolveProxyXAddress, toBytes32} = await loadTestHelpers();
const {
Expand All @@ -422,20 +430,22 @@ task("add-tokens-repayer", "Add input output tokens based on current network con
const target = (await hre.ethers.getContractAt("Repayer", targetAddress, sender)) as Repayer;
const filteredInputOutputTokens: Repayer.InputOutputTokenStruct[] = [];
for (const entry of inputOutputTokens) {
const alreadyAllowed = await Promise.all(entry.destinationTokens.map(
el => target.isOutputTokenAllowed(entry.inputToken, el.destinationDomain, el.outputToken)
));
const alreadyAllowed = await Promise.all(entry.destinationTokens.map(el => {
if (args.check) {
return target.isOutputTokenAllowed(entry.inputToken, el.destinationDomain, el.outputToken);
}
return false;
}));
entry.destinationTokens = entry.destinationTokens.filter((_, index) => !alreadyAllowed[index]);
if (entry.destinationTokens.length > 0) {
filteredInputOutputTokens.push(entry);
}
}

const hasRole = await target.hasRole(toBytes32("SET_TOKENS_ROLE"), sender);
console.log(`Following tokens will be added to ${targetAddress}.`);
console.table(flattenInputOutputTokens(filteredInputOutputTokens));

if (filteredInputOutputTokens.length > 0) {
console.log(`Following tokens will be added to ${targetAddress}.`);
console.table(flattenInputOutputTokens(filteredInputOutputTokens));
const hasRole = await target.hasRole(toBytes32("SET_TOKENS_ROLE"), sender);
if (hasRole) {
await target.setInputOutputTokens(filteredInputOutputTokens, true);
console.log("Done.");
Expand Down
Loading