Skip to content

Commit

Permalink
Merge pull request #13 from OriumNetwork/cronos-support
Browse files Browse the repository at this point in the history
Cronos support
  • Loading branch information
karacurt authored Nov 9, 2023
2 parents 2a81880 + 1483c48 commit 6fe3c49
Show file tree
Hide file tree
Showing 10 changed files with 5,691 additions and 16,195 deletions.
4 changes: 2 additions & 2 deletions config/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const DeployAddresses = {
ImmutableCreate2Factory: '0x0000000000FFe8B47B3e2130213B802212439497',
RolesRegistry: '0xB2aD616e84e1eF7A9ED0fA3169AAF31Ee51EA824',
ImmutableOwnerCreate2Factory: '0x066f91a9Aa4C33D4ea4c12aBee6f4cb4e919F71d',
RolesRegistry: '0xB1b599Ec67ad23AF7FAC240191319822e674571A',
KMSDeployer: '0x04c8c6c56dab836f8bd62cb6884371507e706806',
}
File renamed without changes.
24 changes: 0 additions & 24 deletions contracts/RolesRegistry/interfaces/IImmutableCreate2Factory.sol

This file was deleted.

File renamed without changes.
14 changes: 14 additions & 0 deletions contracts/interfaces/IImmutableOwnerCreate2Factory.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// SPDX-License-Identifier: CC0-1.0
pragma solidity 0.8.9;

interface IImmutableOwnerCreate2Factory {
function deploy(
bytes32 salt,
bytes memory bytecode
) external returns (address addr);

function computeAddress(
bytes32 salt,
bytes32 bytecodeHash
) external view returns (address);
}
2 changes: 2 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ENVIRONMENT="prod | dev"
POLYGON_PROVIDER_URL="https://polygon-mainnet.g.alchemy.com/v2/API_KEY"
MUMBAI_PROVIDER_URL="https://polygon-mumbai.g.alchemy.com/v2/API_KEY"
GOERLI_PROVIDER_URL="https://eth-goerli.g.alchemy.com/v2/API_KEY"
CRONOS_TESTNET_PROVIDER_URL="https://evm-t3.cronos.org"
CRONOS_PROVIDER_URL="https://evm.cronos.org"
DEV_PRIVATE_KEY="Private Key"
PROD_PRIVATE_KEY="Private Key"

Expand Down
42 changes: 42 additions & 0 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ const {
POLYGON_PROVIDER_URL,
MUMBAI_PROVIDER_URL,
GOERLI_PROVIDER_URL,
CRONOS_TESTNET_PROVIDER_URL,
CRONOS_PROVIDER_URL,
CRONOSSCAN_API_KEY,
} = process.env

const BASE_CONFIG = {
Expand All @@ -33,6 +36,15 @@ const BASE_CONFIG = {
runs: 200,
},
},
{
version: '0.5.10',
settings: {
optimizer: {
enabled: true,
runs: 99999,
},
},
},
],
},
mocha: {
Expand All @@ -55,7 +67,27 @@ const BASE_CONFIG = {
polygon: POLYGONSCAN_API_KEY,
polygonMumbai: POLYGONSCAN_API_KEY,
goerli: ETHER_SCAN_API_KEY,
cronosTestnet: CRONOSSCAN_API_KEY,
cronos: CRONOSSCAN_API_KEY,
},
customChains: [
{
network: 'cronosTestnet',
chainId: 338,
urls: {
apiURL: 'https://cronos.org/explorer/testnet3/api',
blockExplorerURL: 'https://cronos.org/explorer/testnet3',
},
},
{
network: 'cronos',
chainId: 25,
urls: {
apiURL: 'https://cronos.org/explorer/api',
blockExplorerURL: 'https://cronos.org/explorer',
},
},
],
},
networks: {
hardhat: {
Expand Down Expand Up @@ -95,6 +127,16 @@ const PROD_CONFIG = {
url: GOERLI_PROVIDER_URL,
accounts: [DEV_PRIVATE_KEY],
},
cronosTestnet: {
chainId: 338,
url: CRONOS_TESTNET_PROVIDER_URL,
accounts: [DEV_PRIVATE_KEY],
},
cronos: {
chainId: 25,
url: CRONOS_PROVIDER_URL,
accounts: [DEV_PRIVATE_KEY],
},
},
}

Expand Down
Loading

0 comments on commit 6fe3c49

Please sign in to comment.