Skip to content

Commit

Permalink
Merge branch 'LF-3988' of github.com:lifinance/contracts into LF-3988
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Sep 5, 2023
2 parents 6afecfa + e8ee471 commit 4f8ba92
Show file tree
Hide file tree
Showing 62 changed files with 2,951 additions and 259 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ ETH_NODE_URI_POLYGONZKEVM=https://zkevm-rpc.com
ETH_NODE_URI_VELAS=https://explorer.velas.com/rpc
ETH_NODE_URI_ZKSYNC=https://zksync2-mainnet.zksync.io
ETH_NODE_URI_BASE=https://mainnet.base.org
ETH_NODE_URI_LINEA=https://rpc.linea.build

# Testnet RPCs
ETH_NODE_URI_GOERLI=https://rpc.ankr.com/eth_goerli
Expand Down Expand Up @@ -54,6 +55,7 @@ OPTIMISM_ETHERSCAN_API_KEY=
POLYGON_ETHERSCAN_API_KEY=
POLYGONZKEVM_ETHERSCAN_API_KEY=
BASE_ETHERSCAN_API_KEY=
LINEA_ETHERSCAN_API_KEY=

# Testnet Explorer API Keys
GOERLI_ETHERSCAN_API_KEY=
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
LATEST_TAG=$(echo "$release_json" | jq -r '.[0].name')
# we need to make sure that on staging we're going to update a -beta version, if any
if [[ "$BRANCH_NAME" != "master" ]]; then
if [[ "$BRANCH_NAME" != "main" ]]; then
# if it has already "-beta", no other action is required, since it means
# that we're already going to update the latest staging release
if [[ "$LATEST_TAG" != *"beta"* ]]; then
Expand All @@ -90,7 +90,7 @@ jobs:
uses: christian-draeger/[email protected]
with:
current-version: "${{ env.LATEST_TAG }}"
version-fragment: "${{ env.BRANCH_NAME == 'master' && (contains(github.event.head_commit.message, 'major') && 'major' || contains(github.event.head_commit.message, 'feat') && 'feature' || 'bug') || 'beta' }}"
version-fragment: "${{ env.BRANCH_NAME == 'main' && (contains(github.event.head_commit.message, 'major') && 'major' || contains(github.event.head_commit.message, 'feat') && 'feature' || 'bug') || 'beta' }}"

- name: Push tag
if: steps.bump_version.outputs.next-version
Expand All @@ -107,6 +107,6 @@ jobs:
git commit -m "actions: new contracts version ${{ steps.bump_version.outputs.next-version }}"
git tag -a v${{ steps.bump_version.outputs.next-version }} -m "${{ github.event.head_commit.message }}"
git push origin tag v${{ steps.bump_version.outputs.next-version }}
if [[ "$BRANCH_NAME" == "master" ]]; then
if [[ "$BRANCH_NAME" == "main" ]]; then
git push -u origin $BRANCH_NAME
fi
4 changes: 4 additions & 0 deletions config/across.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
"mumbai": {
"acrossSpokePool": "0x45fF03629D024b7763275e732a2d80202c18b31C",
"weth": "0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889"
},
"zksync": {
"acrossSpokePool": "0xE0B015E54d54fc84a6cB9B666099c46adE9335FF",
"weth": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
}
4 changes: 4 additions & 0 deletions config/amarok.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "0"
},
"linea": {
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "0"
},
"localanvil": {
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "0"
Expand Down
3 changes: 3 additions & 0 deletions config/cbridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@
"heco": {
"cBridge": "0xBB7684Cc5408F4DD0921E5c2Cadd547b8f1AD573"
},
"linea": {
"cBridge": "0x9B36f165baB9ebe611d491180418d8De4b8f3a1f"
},
"localanvil": {
"cBridge": "0xf89354F314faF344Abd754924438bA798E306DF2",
"cfUSDC": "0x0000000000000000000000000000000000000000",
Expand Down
5 changes: 5 additions & 0 deletions config/celerCircle.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
"circleBridgeProxy": "0x9744ae566c64B6B6f7F9A4dD50f7496Df6Fef990",
"usdc": "0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E",
"domain": 1
},
"optimism": {
"circleBridgeProxy": "0x697aC93c9263346c5Ad0412F9356D5789a3AA687",
"usdc": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"domain": 2
}
}
51 changes: 43 additions & 8 deletions config/dexs.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"mainnet": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -20,9 +21,11 @@
"0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9",
"0x5f509a3C3F16dF2Fba7bF84dEE1eFbce6BB85587",
"0x50f9bDe1c76bba997a5d6e7FEFff695ec8536194",
"0xB4B0ea46Fe0E9e8EAB4aFb765b527739F2718671"
"0xB4B0ea46Fe0E9e8EAB4aFb765b527739F2718671",
"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"
],
"arbitrum": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -44,9 +47,11 @@
"0xD01319f4b65b79124549dE409D36F25e04B3e551",
"0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"0x7d13268144adcdbEBDf94F654085CC15502849Ff",
"0xe05dd51e4eb5636f4f0e8e7fbe82ea31a2ecef16"
"0xe05dd51e4eb5636f4f0e8e7fbe82ea31a2ecef16",
"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"
],
"aurora": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -62,6 +67,7 @@
"0x7449Cd63C2b1A06C36945eD83f0626D303781B6E"
],
"avalanche": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -86,6 +92,7 @@
"0x1F076a800005c758a505E759720eb6737136e893"
],
"boba": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -100,6 +107,7 @@
"0x64842A3EbC09bB69429c1a34ae181375fea5f17F"
],
"bsc": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -122,9 +130,11 @@
"0x30aE282CF477E2eF28B14d0125aCEAd57Fe1d7a1",
"0x1956005bA9690B7A00b09c78769675C0cE1457AF",
"0xcF0feBd3f17CEf5b47b0cD257aCf6025c5BFf3b7",
"0x0656fD85364d03b103CEEda192FB2D3906A6ac15"
"0x0656fD85364d03b103CEEda192FB2D3906A6ac15",
"0x5302086A3a25d473aAbBd0356eFf8Dd811a4d89B"
],
"celo": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -134,9 +144,11 @@
"0x6352a56caadc4f1e25cd6c75970fa768a3304e64",
"0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"0x1421bDe4B10e8dd459b3BCb598810B1337D56842",
"0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121"
"0xE3D8bd6Aed4F159bc8000a9cD47CffDb95F96121",
"0x5Dc88340E1c5c6366864Ee415d6034cadd1A9897"
],
"cronos": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -150,6 +162,7 @@
"0x145863Eb42Cf62847A6Ca784e6416C1682b1b2Ae"
],
"evmos": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -163,6 +176,7 @@
"0x64C3b10636baBb3Ef46a7E2E5248b0dE43198fCB"
],
"fantom": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -182,6 +196,7 @@
"0x6D0176C5ea1e44b08D3dd001b0784cE42F47a3A7"
],
"fuse": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -192,6 +207,7 @@
"0xE3F85aAd0c8DD7337427B9dF5d0fB741d65EEEB5"
],
"gnosis": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -210,6 +226,7 @@
"0xe43e60736b1cb4a75ad25240e2f9a62bff65c0c0"
],
"harmony": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -223,6 +240,7 @@
"0xf012702a5f0e54015362cBCA26a26fc90AA832a3"
],
"heco": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -238,6 +256,7 @@
"0xbc3a8f63f311f3b005ff8afc1a26272faaba8d36"
],
"metis": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -249,6 +268,7 @@
"0x6352a56caadc4f1e25cd6c75970fa768a3304e64"
],
"moonbeam": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -259,6 +279,7 @@
"0xd0a01ec574d1fc6652edf79cb2f880fd47d34ab1"
],
"moonriver": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -274,6 +295,7 @@
"0x003B18357460e789e711849749A793c430d14f97"
],
"nova": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand All @@ -285,6 +307,7 @@
"0x1b02dA8Cb0d097eB8D57A175b88c7D8b47997506"
],
"okx": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -302,6 +325,7 @@
"0x5381382257c761dac6f1509b1ba1b70ddaa6862a"
],
"optimism": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -318,9 +342,11 @@
"0xfD9D2827AD469B72B69329dAA325ba7AfbDb3C98",
"0xE592427A0AEce92De3Edee1F18E0157C05861564",
"0xa492d6eabcdc3e204676f15b950bbdd448080364",
"0x716fcc67dcA500A91B4a28c9255262c398D8f971"
"0x716fcc67dcA500A91B4a28c9255262c398D8f971",
"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"
],
"polygon": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x9cc3164f01ED3796Fdf7Da538484D634608D2203",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
Expand Down Expand Up @@ -350,9 +376,11 @@
"0x67dC2703D306F72E94DbB0cE0aa0CB86149EAc70",
"0xC0788A3aD43d79aa53B09c2EaCc313A787d1d607",
"0xe7F5FF6da6DdF45F43aE7c8217AEC3ec5a0569c5",
"0x39E3e49C99834C9573c9FC7Ff5A4B226cD7B0E63"
"0x39E3e49C99834C9573c9FC7Ff5A4B226cD7B0E63",
"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"
],
"polygonzkevm": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
"0x9ca271A532392230EAe919Fb5460aEa9D9718424",
Expand All @@ -369,9 +397,12 @@
"0x0222D030e8DFAEDE2a4e7B5F181Ac1A4206A75f0",
"0x9ca271A532392230EAe919Fb5460aEa9D9718424",
"0xB49EaD76FE09967D7CA0dbCeF3C3A06eb3Aa0cB4",
"0x36a1acbbcafca2468b85011ddd16e7cb4d673230"
"0x36a1acbbcafca2468b85011ddd16e7cb4d673230",
"0x6e2b76966cbd9cf4cc2fa0d76d24d5241e0abc2f",
"0x5aEaF2883FBf30f3D62471154eDa3C0c1b05942d"
],
"velas": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0xf068cc770f32042Ff4a8fD196045641234dFaa47",
"0x894b3e1e30Be0727eb138d2cceb0A99d2Fc4C55D",
"0x4b0B89b90fF83247aEa12469CeA9A6222e09d54c",
Expand All @@ -380,9 +411,12 @@
"0x3D1c58B6d4501E34DF37Cf0f664A58059a188F00"
],
"base": [
"0xdef1c0ded9bec7f1a1670819833240f027b25eff"
"0xdef1c0ded9bec7f1a1670819833240f027b25eff",
"0x1111111254eeb25477b68fb85ed929f73a960582",
"0x198EF79F1F515F02dFE9e3115eD9fC07183f02fC"
],
"goerli": [
"0xC85c2B19958D116d79C654ecE73b359c08802A76",
"0x353a5303dD2a39aB59aEd09fb971D359b94658C7",
"0xd2981E8c29be81a8a6655764c2a60825bf1BB631",
"0x7a250d5630b4cf539739df2c5dacb4c659f2488d",
Expand All @@ -393,6 +427,7 @@
"avalancheFujiTestnet": [],
"bscTestnet": ["0x1b02da8cb0d097eb8d57a175b88c7d8b47997506"],
"localanvil": [],
"linea": ["0x8cFe327CEc66d1C090Dd72bd0FF11d690C33a2Eb"],
"mumbai": [
"0xfD0af5274aA16C72B7c463B22a435C06DEBbe894",
"0xf471d32cb40837bf24529fcf17418fc1a4807626",
Expand Down
8 changes: 7 additions & 1 deletion config/sigs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"0xdd343700",
"0x04204ceb",
"0xc6aabf84",
"0xf8be52e1",
"0x1eacd35f",
"0x91695586",
"0xa5be382e",
"0xfc374157",
Expand Down Expand Up @@ -79,6 +81,10 @@
"0xa6886da9",
"0x94cfab17",
"0xa8676443",
"0x301a3720"
"0x301a3720",
"0x7a1eb1b9",
"0xb22f4db8",
"0x3593564c",
"0x24856bc3"
]
}
1 change: 1 addition & 0 deletions config/stargate.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"goerli": "0x7612aE2a34E5A363E137De748801FB4c86499152",
"bsc-testnet": "0x0000000000000000000000000000000000000000",
"lineatest": "0x0000000000000000000000000000000000000000",
"linea": "0x0000000000000000000000000000000000000000",
"localanvil": "0x0000000000000000000000000000000000000000",
"mumbai": "0x817436a076060D158204d955E5403b6Ed0A5fac0",
"sepolia": "0x0000000000000000000000000000000000000000"
Expand Down
35 changes: 35 additions & 0 deletions deploy/012_deploy_across_facet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { HardhatRuntimeEnvironment } from 'hardhat/types'
import { DeployFunction } from 'hardhat-deploy/types'
import { network } from 'hardhat'
import { diamondContractName, deployFacet } from './9999_utils'
import config from '../config/across.json'

interface AcrossConfig {
[network: string]: {
acrossSpokePool?: string
weth?: string
}
}

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
if (!(config as AcrossConfig)[network.name]) {
console.log(`No Across config set for ${network.name}. Skipping...`)
return
}

const SPOKE_POOL = (config as AcrossConfig)[network.name].acrossSpokePool
const WETH = (config as AcrossConfig)[network.name].weth

await deployFacet(hre, 'AcrossFacet', { args: [SPOKE_POOL, WETH] })
}

export default func

func.id = 'deploy_across_facet'
func.tags = ['DeployAcrossFacet']
func.dependencies = [
// 'InitialFacets',
// diamondContractName,
// 'InitFacets',
// 'DeployDexManagerFacet',
]
Loading

0 comments on commit 4f8ba92

Please sign in to comment.