Skip to content

Commit

Permalink
rm venv
Browse files Browse the repository at this point in the history
  • Loading branch information
olegkron committed Aug 8, 2024
1 parent 00ddf18 commit 08a1d34
Show file tree
Hide file tree
Showing 25 changed files with 394 additions and 536 deletions.
16 changes: 8 additions & 8 deletions .env.deployments.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ CONCERO_INFRA_PROXY_POLYGON=0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323
CONCERO_INFRA_PROXY_AVALANCHE=0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323

# INFRA PROXY ADMIN CONTRACT
CONCERO_INFRA_PROXY_ADMIN_CONTRACT_BASE=0x3888A36fF10D894DA4000c94340C40761138C69F
CONCERO_INFRA_PROXY_ADMIN_CONTRACT_AVALANCHE=0xF069f384a177083c4d62539e187860d2e163b0F4
CONCERO_INFRA_PROXY_ADMIN_CONTRACT_POLYGON=0xF069f384a177083c4d62539e187860d2e163b0F4
CONCERO_INFRA_PROXY_ADMIN_CONTRACT_ARBITRUM=0xF069f384a177083c4d62539e187860d2e163b0F4
CONCERO_INFRA_PROXY_ADMIN_BASE=0x3888A36fF10D894DA4000c94340C40761138C69F
CONCERO_INFRA_PROXY_ADMIN_AVALANCHE=0xF069f384a177083c4d62539e187860d2e163b0F4
CONCERO_INFRA_PROXY_ADMIN_POLYGON=0xF069f384a177083c4d62539e187860d2e163b0F4
CONCERO_INFRA_PROXY_ADMIN_ARBITRUM=0xF069f384a177083c4d62539e187860d2e163b0F4

# BRIDGE CONTRACTS MAINNET
CONCERO_BRIDGE_BASE=0x9c3Ab328f91A82a0a63896ebaC92364Ea527AaFf
Expand All @@ -34,9 +34,9 @@ CHILD_POOL_PROXY_POLYGON=0x164c20A4E11cBE0d8B5e23F5EE35675890BE280d
CHILD_POOL_PROXY_AVALANCHE=0x164c20A4E11cBE0d8B5e23F5EE35675890BE280d

# CHILD POOLS PROXY ADMIN CONTRACTS MAINNET
CHILD_POOL_PROXY_ADMIN_CONTRACT_ARBITRUM=0x3888A36fF10D894DA4000c94340C40761138C69F
CHILD_POOL_PROXY_ADMIN_CONTRACT_AVALANCHE=0x3888A36fF10D894DA4000c94340C40761138C69F
CHILD_POOL_PROXY_ADMIN_CONTRACT_POLYGON=0x3888A36fF10D894DA4000c94340C40761138C69F
CHILD_POOL_PROXY_ADMIN_ARBITRUM=0x3888A36fF10D894DA4000c94340C40761138C69F
CHILD_POOL_PROXY_ADMIN_AVALANCHE=0x3888A36fF10D894DA4000c94340C40761138C69F
CHILD_POOL_PROXY_ADMIN_POLYGON=0x3888A36fF10D894DA4000c94340C40761138C69F

### CHILD POOLS IMPLEMENTATIONS MAINNET ###
CHILD_POOL_ARBITRUM=0x33a3d7150D13798B1f4163F62bC5070336fDda0B
Expand All @@ -47,7 +47,7 @@ CHILD_POOL_AVALANCHE=0xBE7b5f0F11E297F9b0a2a7400ca597e1c627639f
PARENT_POOL_PROXY_BASE=0x0AE1B2730066AD46481ab0a5fd2B5893f8aBa323

### PARENT POOL PROXY ADMIN CONTRACTS ###
PARENT_POOL_PROXY_ADMIN_CONTRACT_BASE=0xF069f384a177083c4d62539e187860d2e163b0F4
PARENT_POOL_PROXY_ADMIN_BASE=0xF069f384a177083c4d62539e187860d2e163b0F4

### PARENT POOL IMPLEMENTATION PRODUCTION CONTRACTS ADDRESSES ###
PARENT_POOL_BASE=0x8eBC9C9BDB0b5Cd22838f15Fbd18862dB1d7f8d4
Expand Down
25 changes: 13 additions & 12 deletions .env.deployments.testnet
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
### INFRA PROXY CONTRACTS ADDRESSES ###
## todo: when this infra proxy env var is not set, deploy script throws error:
## todo: Error: Missing required environment variable CONCERO_INFRA_PROXY_FUJI
CONCERO_INFRA_PROXY_BASE_SEPOLIA=0xb7A02DFB077B0c909A5D7aCcEdd716f4c36DEF41
CONCERO_INFRA_PROXY_FUJI=0x0Db7753a6ad115B129202ce499e23578b2991Eb0
CONCERO_INFRA_PROXY_BASE_SEPOLIA=0xAb1495878a1BBcd23ec69A2ECA16A0357334447d
CONCERO_INFRA_PROXY_ARBITRUM_SEPOLIA=0x4dfD6f3ffB7f6426793D55dEAb3783375206aaEd

### INFRA PROXY ADMIN CONTRACTS ###
CONCERO_INFRA_PROXY_ADMIN_CONTRACT_BASE_SEPOLIA=0xdAf5AECA9Fb62CcaAe98B5b0e8F3030047868e9B
CONCERO_INFRA_PROXY_ADMIN_CONTRACT_ARBITRUM_SEPOLIA=0x4a63B67d5bd94e3CfA8fEa1498085b9684b084ec
CONCERO_INFRA_PROXY_ADMIN_BASE_SEPOLIA=0x7cB2398963f8969ABB7FB7544b4FD97530B062b9
CONCERO_INFRA_PROXY_ADMIN_ARBITRUM_SEPOLIA=0x4a63B67d5bd94e3CfA8fEa1498085b9684b084ec

### BRIDGE CONTRACTS ADDRESSES ###
CONCERO_BRIDGE_SEPOLIA=""
CONCERO_BRIDGE_FUJI=""
CONCERO_BRIDGE_ARBITRUM_SEPOLIA=0x1464A54b9DF0a92877c087644941C11b598e9921
CONCERO_BRIDGE_BASE_SEPOLIA=0x81B0CbF3131aEA76788660d0f94a515e0fa96C87
CONCERO_BRIDGE_BASE_SEPOLIA=0x00E6DB575cE7379F0ab09E952565a5607685620a
CONCERO_BRIDGE_OPTIMISM_SEPOLIA=0x1CACCEe6bBB49A1391471192f6e013079191C367
CONCERO_BRIDGE_POLYGON_AMOY=0xC432d1c19F80E04f0D9A8BA19E890A77D34131C8

### PARENT POOL PROXY CONTRACTS ADDRESSES ###
PARENT_POOL_PROXY_BASE_SEPOLIA=0xC80ff076966e86B62C5c9134FbC3D1439C09f6B6
PARENT_POOL_PROXY_BASE_SEPOLIA=0x6dCC61b865aA11FA502AeAdABb5269f6a8fB7d61

### PARENT POOL PROXY ADMIN CONTRACTS ###
PARENT_POOL_PROXY_ADMIN_CONTRACT_BASE_SEPOLIA=0x4FEb1b24b55564F7aB0C0b336b64CE4906354a39
PARENT_POOL_PROXY_ADMIN_BASE_SEPOLIA=0xED71d1FDC6857D313Fe3705adB4133fDf2fdFE8f

### PARENT POOL CONTRACTS ADDRESSES ###
PARENT_POOL_BASE_SEPOLIA=0x769Ef1290414eAD0096118f26CdF135375A80eec
PARENT_POOL_BASE_SEPOLIA=""

### AUTOMATIONS CONTRACTS ADDRESSES ###
CONCERO_AUTOMATION_BASE_SEPOLIA=0xF78297412C4b74aC451b16Fe1e6F0FfDc9F5D9C1
Expand All @@ -37,9 +37,9 @@ CHILD_POOL_PROXY_ARBITRUM_SEPOLIA=0x1bb4233765838Ee69076845D10fa231c8cd500a3
CHILD_POOL_PROXY_FUJI=0xED007301D6AfacD5FA30Fb2fD4B45951A064f798

### CHILD POOL PROXY ADMIN CONTRACTS ###
CHILD_POOL_PROXY_ADMIN_CONTRACT_ARBITRUM_SEPOLIA=0xED007301D6AfacD5FA30Fb2fD4B45951A064f798
CHILD_POOL_PROXY_ADMIN_CONTRACT_FUJI=0xab2C8D956308AB91EBfe6034abdCd8c3bf650298
CHILD_POOL_PROXY_ADMIN_CONTRACT_BASE_SEPOLIA=""
CHILD_POOL_PROXY_ADMIN_ARBITRUM_SEPOLIA=0xED007301D6AfacD5FA30Fb2fD4B45951A064f798
CHILD_POOL_PROXY_ADMIN_FUJI=0xab2C8D956308AB91EBfe6034abdCd8c3bf650298
CHILD_POOL_PROXY_ADMIN_BASE_SEPOLIA=""

### CHILD POOL IMPLEMENTATIONS ###
CHILD_POOL_BASE_SEPOLIA=""
Expand All @@ -51,13 +51,13 @@ CHILD_POOL_SEPOLIA=""
CHILD_POOL_POLYGON_AMOY=""

# DEX SWAP
CONCERO_DEX_SWAP_BASE_SEPOLIA=0x08b726F8A669D6e1c4CD1c87De5e83c197Bffd29
CONCERO_DEX_SWAP_BASE_SEPOLIA=0xE07297F9B8dfC4C3c2E7ad174B2596356f9Bc1FE
CONCERO_DEX_SWAP_OPTIMISM_SEPOLIA=0xD4437bE364F065Fba62E08899aD3219cbE3fAa4A
CONCERO_DEX_SWAP_ARBITRUM_SEPOLIA=0x48887B04abF5fe71Ae444739B5E6C93C9B9CfDCc
CONCERO_DEX_SWAP_POLYGON_AMOY=0x4713f263E826c700aA2B4df6760973dBCfFF0cce

# ORCHESTRATOR
CONCERO_ORCHESTRATOR_BASE_SEPOLIA=0x1A0BC347Aea62f95650637EB1F83d12a9FB573b6
CONCERO_ORCHESTRATOR_BASE_SEPOLIA=0x4c5a71adddeFA0551ff2C6DE7363AFfc918ff32d
CONCERO_ORCHESTRATOR_OPTIMISM_SEPOLIA=0x2B22a64f932739a2CB392dd38A9B2f087072b0D1
CONCERO_ORCHESTRATOR_ARBITRUM_SEPOLIA=0xb8a36C25bCCe9beF4632ff97581427D40255327B
CONCERO_ORCHESTRATOR_POLYGON_AMOY=0x8Bd9245B23780047ae5B0F8aCF31F217Aa207CBB
Expand All @@ -66,3 +66,4 @@ CONCERO_ORCHESTRATOR_POLYGON_AMOY=0x8Bd9245B23780047ae5B0F8aCF31F217Aa207CBB
CONCERO_PAUSE_BASE_SEPOLIA=0x45c1C5fDe180a7a23B6D4ae03Ee015102436Ce37
CONCERO_PAUSE_ARBITRUM_SEPOLIA=0x6c7B572ae10f7d5c79128e68Ce1A43A16311dE3f
CONCERO_PAUSE_FUJI=0x0Db7753a6ad115B129202ce499e23578b2991Eb0

12 changes: 7 additions & 5 deletions packages/hardhat/constants/deploymentVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ export const poolMessengers: string[] = [
getEnvVar("POOL_MESSENGER_0_ADDRESS"),
];
// The address is the same on 4 chains: ARB,POL,BASE,AVAX. Can be deployed to others later using Lifi's Create3 Factory.
export const initialProxyImplementationAddress = getEnvVar("CONCERO_PAUSE_ARBITRUM");

export const viemReceiptConfig: WaitForTransactionReceiptParameters = {
timeout: 0,
confirmations: 2,
};

export type DeploymentPrefixes = {
infraProxy: string;
export type ProxyType = "infraProxy" | "parentPoolProxy" | "childPoolProxy";

type ProxyDeploymentPrefixes = {
[key in ProxyType]: string;
};

export type DeploymentPrefixes = ProxyDeploymentPrefixes & {
infraProxyAdmin: string;
bridge: string;
dexSwap: string;
orchestrator: string;
parentPoolProxy: string;
parentPoolProxyAdmin: string;
parentPool: string;
childPoolProxy: string;
childPoolProxyAdmin: string;
childPool: string;
automation: string;
Expand Down
1 change: 1 addition & 0 deletions packages/hardhat/contracts/ConceroChildPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ contract ConceroChildPool is CCIPReceiver, ChildPoolStorage {
* @dev This function will sent the address of the user as data. This address will be used to update the mapping on ParentPool.
* @dev when processing withdrawals, the _chainSelector will always be the index 0 of s_poolChainSelectors
*/
//todo: rename _lpAddress
function _ccipSend(
uint64 _chainSelector,
address _lpAddress,
Expand Down
1 change: 1 addition & 0 deletions packages/hardhat/contracts/ConceroParentPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -905,6 +905,7 @@ contract ConceroParentPool is
} else if (requestType == RequestType.performUpkeep_requestLiquidityTransfer) {
_handleAutomationCLFFulfill(requestId, response);
}
//todo: in case of set/remove pools we're deleting a requestId that we haven't stored
delete s_clfRequestTypes[requestId];
}

Expand Down
36 changes: 0 additions & 36 deletions packages/hardhat/deploy/00_InfraProxy.ts

This file was deleted.

68 changes: 33 additions & 35 deletions packages/hardhat/deploy/01_ConceroFakePool.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DeployFunction, Deployment } from "hardhat-deploy/types";
import { Deployment } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import chains from "../constants/CNetworks";
import CNetworks, { networkEnvKeys } from "../constants/CNetworks";
Expand All @@ -11,41 +11,39 @@ interface ConstructorArgs {
ccipRouter?: string;
}

const deployConceroPool: DeployFunction = async function (
hre: HardhatRuntimeEnvironment,
constructorArgs: ConstructorArgs = {},
) {
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;
const { name, live } = hre.network;
const networkType = CNetworks[name].type;

const { linkToken, ccipRouter } = chains[name];

const defaultArgs = {
linkToken: linkToken,
ccipRouter: ccipRouter,
conceroProxyAddress: getEnvVar(`CONCERO_INFRA_PROXY_${networkEnvKeys[name]}`),
const deployConceroPool: (hre: HardhatRuntimeEnvironment, constructorArgs?: ConstructorArgs) => Promise<void> =
async function (hre: HardhatRuntimeEnvironment, constructorArgs: ConstructorArgs = {}) {
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;
const { name, live } = hre.network;
const networkType = CNetworks[name].type;

const { linkToken, ccipRouter } = chains[name];

const defaultArgs = {
linkToken: linkToken,
ccipRouter: ccipRouter,
conceroProxyAddress: getEnvVar(`CONCERO_INFRA_PROXY_${networkEnvKeys[name]}`),
};

// Merge defaultArgs with constructorArgs
const args = { ...defaultArgs, ...constructorArgs };

console.log("Deploying ConceroPool...");
// const deployConceroPool = (await deploy("ConceroPool", {
const deployConceroPool = (await deploy("FakePool", {
from: deployer,
// args: [args.linkToken, args.ccipRouter, args.conceroProxyAddress],
args: [args.ccipRouter, args.conceroProxyAddress],
log: true,
autoMine: true,
})) as Deployment;

if (live) {
log(`ConceroPool deployed to ${name} to: ${deployConceroPool.address}`, "deployConceroPool");
updateEnvVariable(`CONCEROPOOL_${networkEnvKeys[name]}`, deployConceroPool.address, `deployments.${networkType}`);
}
};

// Merge defaultArgs with constructorArgs
const args = { ...defaultArgs, ...constructorArgs };

console.log("Deploying ConceroPool...");
// const deployConceroPool = (await deploy("ConceroPool", {
const deployConceroPool = (await deploy("FakePool", {
from: deployer,
// args: [args.linkToken, args.ccipRouter, args.conceroProxyAddress],
args: [args.ccipRouter, args.conceroProxyAddress],
log: true,
autoMine: true,
})) as Deployment;

if (live) {
log(`ConceroPool deployed to ${name} to: ${deployConceroPool.address}`, "deployConceroPool");
updateEnvVariable(`CONCEROPOOL_${networkEnvKeys[name]}`, deployConceroPool.address, `deployments.${networkType}`);
}
};

export default deployConceroPool;
deployConceroPool.tags = ["ConceroPool"];
34 changes: 0 additions & 34 deletions packages/hardhat/deploy/01_ParentPoolProxy.ts

This file was deleted.

32 changes: 0 additions & 32 deletions packages/hardhat/deploy/02_ChildPoolProxy.ts

This file was deleted.

9 changes: 6 additions & 3 deletions packages/hardhat/deploy/03_ConceroDexSwap.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
import { DeployFunction, Deployment } from "hardhat-deploy/types";
import { Deployment } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import CNetworks, { networkEnvKeys } from "../constants/CNetworks";
import updateEnvVariable from "../utils/updateEnvVariable";
import log from "../utils/log";
import { getEnvVar } from "../utils/getEnvVar";
import { messengers } from "../constants/deploymentVariables";

const deployConceroDexSwap: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const deployConceroDexSwap: (hre: HardhatRuntimeEnvironment) => Promise<void> = async function (
hre: HardhatRuntimeEnvironment,
) {
const { deployer } = await hre.getNamedAccounts();
const { deploy } = hre.deployments;
const { name, live } = hre.network;
const networkType = CNetworks[name].type;

const conceroProxyAddress = getEnvVar(`CONCERO_INFRA_PROXY_${networkEnvKeys[name]}`);

console.log("Deploying ConceroDexSwap...");
log("Deploying...", "DexSwap", name);

const deployResult = (await deploy("DexSwap", {
from: deployer,
args: [conceroProxyAddress, messengers],
Expand Down
Loading

0 comments on commit 08a1d34

Please sign in to comment.