Skip to content

Commit

Permalink
Merge branch 'main' into acrossv3-hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
ezynda3 authored Dec 12, 2024
2 parents 34dcdc1 + 802a0d8 commit 3bdbf13
Show file tree
Hide file tree
Showing 32 changed files with 948 additions and 67 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ ETH_NODE_URI_GRAVITY=https://rpc.gravity.xyz #[pre-commit-checker: not a secret
ETH_NODE_URI_IMMUTABLEZKEVM=https://rpc.immutable.com #[pre-commit-checker: not a secret]
ETH_NODE_URI_KAIA=https://klaytn.drpc.org #[pre-commit-checker: not a secret]
ETH_NODE_URI_LINEA=https://rpc.linea.build #[pre-commit-checker: not a secret]
ETH_NODE_URI_LISK=https://rpc.api.lisk.com #[pre-commit-checker: not a secret]
ETH_NODE_URI_MANTLE=https://rpc.mantle.xyz #[pre-commit-checker: not a secret]
ETH_NODE_URI_METIS=https://metis-mainnet.public.blastapi.io #[pre-commit-checker: not a secret]
ETH_NODE_URI_MODE=https://mainnet.mode.network #[pre-commit-checker: not a secret]
Expand Down Expand Up @@ -60,6 +61,7 @@ GRAVITY_ETHERSCAN_API_KEY=
IMMUTABLEZKEVM_ETHERSCAN_API_KEY=
KAIA_ETHERSCAN_API_KEY=
LINEA_ETHERSCAN_API_KEY=
LISK_ETHERSCAN_API_KEY=
MANTLE_ETHERSCAN_API_KEY=
METIS_ETHERSCAN_API_KEY=
MODE_ETHERSCAN_API_KEY=
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [ ] I have performed a self-review of my code
- [ ] This pull request is as small as possible and only tackles one problem
- [ ] I have added tests that cover the functionality / test the bug
- [ ] For new facets: I have checked all points from this list: https://www.notion.so/lifi/New-Facet-Contract-Checklist-157f0ff14ac78095a2b8f999d655622e
- [ ] I have updated any required documentation

# Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/diamondEmergencyPause.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
ETH_NODE_URI_IMMUTABLEZKEVM: ${{ secrets.ETH_NODE_URI_IMMUTABLEZKEVM }}
ETH_NODE_URI_KAIA: ${{ secrets.ETH_NODE_URI_KAIA }}
ETH_NODE_URI_LINEA: ${{ secrets.ETH_NODE_URI_LINEA }}
ETH_NODE_URI_LISK: ${{ secrets.ETH_NODE_URI_LISK }}
ETH_NODE_URI_MANTLE: ${{ secrets.ETH_NODE_URI_MANTLE }}
ETH_NODE_URI_METIS: ${{ secrets.ETH_NODE_URI_METIS }}
ETH_NODE_URI_MODE: ${{ secrets.ETH_NODE_URI_MODE }}
Expand All @@ -78,6 +79,7 @@ jobs:
ETH_NODE_URI_SCROLL: ${{ secrets.ETH_NODE_URI_SCROLL }}
ETH_NODE_URI_SEI: ${{ secrets.ETH_NODE_URI_SEI }}
ETH_NODE_URI_TAIKO: ${{ secrets.ETH_NODE_URI_TAIKO }}
ETH_NODE_URI_WORLDCHAIN: ${{ secrets.ETH_NODE_URI_WORLDCHAIN }}
ETH_NODE_URI_XLAYER: ${{ secrets.ETH_NODE_URI_XLAYER }}
ETH_NODE_URI_ZKSYNC: ${{ secrets.ETH_NODE_URI_ZKSYNC }}
PRIVATE_KEY_PAUSER_WALLET: ${{ secrets.PRIV_KEY_PAUSER_WALLET }}
Expand Down
113 changes: 113 additions & 0 deletions .github/workflows/forceMergePRBypassAudit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
name: Force-Merge PR (Bypass Audit Requirement)
# - This git action may only be used in exceptional cases
# - Exceptional cases are for example issues in an audit-protected contract that do not touch the code itself such
# as an issue with the solidity pragma or some issue in a comment
# - it can only be executed by the CTO or the Information Security Manager/Architect
# - a valid reason must be provided in order to force-merge a given PR

on:
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to bypass'
required: true
justification:
description: 'Reason for bypass'
required: true

jobs:
force-merge-pr-bypass-audit:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Fetch Information Security Team Members
env:
GH_PAT: ${{ secrets.GIT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
##### Unset default GITHUB_TOKEN (insufficient permissions)
unset GITHUB_TOKEN
##### Authenticate with Personal Access Token
echo "::add-mask::$GH_PAT" # Mask the token
echo $GH_PAT | gh auth login --with-token
##### Fetch team members of 'informationsecuritymanager' team
ORG_NAME="lifinance"
TEAM_SLUG="informationsecuritymanager"
TEAM_MEMBERS=$(gh api \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"/orgs/$ORG_NAME/teams/$TEAM_SLUG/members" | jq -r '.[].login')
if [[ -z "$TEAM_MEMBERS" ]]; then
echo -e "\033[31mERROR: Could not retrieve team members of $TEAM_SLUG.\033[0m"
exit 1
fi
echo "The following users are members of $TEAM_SLUG: $TEAM_MEMBERS"
echo "$TEAM_MEMBERS" > team_members.txt
- name: Verify Actor's Team Membership
run: |
##### Check if the actor is in the team members list
ACTOR="${{ github.actor }}"
TEAM_MEMBERS=$(cat team_members.txt)
# Strict validation of actor against team members
if echo "$TEAM_MEMBERS" | while read -r member; do
[[ "$member" == "$ACTOR" ]] && exit 0
done; then
echo -e "\033[32m$ACTOR is authorized to approve bypasses.\033[0m"
echo "CONTINUE=true" >> "$GITHUB_ENV"
else
echo -e "\033[31mERROR: $ACTOR is NOT authorized to approve bypasses\033[0m"
exit 1
fi
- name: Log Justification
if: env.CONTINUE == 'true'
run: |
echo "Bypass approved for PR #${{ github.event.inputs.pr_number }} by $ACTOR."
echo "Justification: ${{ github.event.inputs.justification }}"
- name: Merge the PR
uses: actions/[email protected]
if: env.CONTINUE == 'true'
with:
script: |
const pr = parseInt(core.getInput('pr_number'));
const { context } = github;
console.log(`Merging PR ${pr} now`)
// Fetch PR details
const { data: prData } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr
});
// Validate PR state
if (!prData.mergeable) {
throw new Error('PR is not in a mergeable state');
}
await github.rest.pulls.merge({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: pr,
merge_method: "squash",
commit_title: `[BYPASS] ${prData.title}`,
commit_message: `Bypassed by ${context.actor}\nJustification: ${core.getInput('justification')}`
});
- name: Send Discord message
uses: Ilshidur/[email protected]
with:
args: |
:warning: '${{ github.actor }} just bypassed the audit requirement controls to force-merge PR #${{ github.event.inputs.pr_number }}.'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_DEV_SMARTCONTRACTS }}
10 changes: 9 additions & 1 deletion config/across.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@
"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f"
]
},
"lisk": {
"chainId": 1135,
"acrossSpokePool": "0x9552a0a6624A23B848060AE5901659CDDa1f83f8",
"weth": "0x4200000000000000000000000000000000000006",
"tokensToApprove": [
"0x4200000000000000000000000000000000000006"
]
},
"blast": {
"chainId": 81457,
"acrossSpokePool": "0x2D509190Ed0172ba588407D4c2df918F955Cc6E1",
Expand Down Expand Up @@ -142,4 +150,4 @@
"0x4200000000000000000000000000000000000006"
]
}
}
}
6 changes: 6 additions & 0 deletions config/amarok.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f"
]
},
"lisk": {
"chainId": 1135,
"connextHandler": "0x0000000000000000000000000000000000000000",
"domain": "",
"tokensToApprove": []
},
"mantle": {
"chainId": 5000,
"connextHandler": "0x0000000000000000000000000000000000000000",
Expand Down
7 changes: 7 additions & 0 deletions config/dexs.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,13 @@
"0x6b2c0c7be2048daa9b5527982c29f48062b34d58",
"0x57df6092665eb6058DE53939612413ff4B09114E"
],
"lisk": [
"0x603a538477d44064eA5A5d8C345b4Ff6fca1142a",
"0x2321F1a63A683a1F3634Dbe1CbA0d657D5F56d54",
"0x8f023b4193a6b18C227B4a755f8e28B3D30Ef9a1",
"0x76aE215b11797b32397d878e6f3E65081ff58b13",
"0x50D5a8aCFAe13Dceb217E9a071F6c6Bd5bDB4155"
],
"mantle": [
"0xD9F4e85489aDCD0bAF0Cd63b4231c6af58c26745",
"0x6352a56caadC4F1E25CD6c75970Fa768A3304e64",
Expand Down
1 change: 1 addition & 0 deletions config/gaszip.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"gnosis": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"gravity": "0x6Efc6Ead40786bD87A884382b6EA4BcA3C985e99",
"linea": "0xA60768b03eB14d940F6c9a8553329B7F9037C91b",
"lisk": "0xA60768b03eB14d940F6c9a8553329B7F9037C91b",
"mantle": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"metis": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"mode": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
Expand Down
22 changes: 20 additions & 2 deletions config/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,24 @@
"safeWebUrl": "https://app.safe.global/transactions/queue?safe=linea:0xdf61270fDC1A892874Fd3C0143A0A4CBA74F4EF1",
"gasZipChainId": 59
},
"lisk": {
"name": "Lisk",
"chainId": 1135,
"nativeAddress": "0x0000000000000000000000000000000000000000",
"nativeCurrency": "ETH",
"wrappedNativeAddress": "0x4200000000000000000000000000000000000006",
"status": "active",
"type": "mainnet",
"rpcUrl": "https://rpc.api.lisk.com",
"verificationType": "blockscout",
"explorerUrl": "https://blockscout.lisk.com",
"explorerApiUrl": "https://blockscout.lisk.com/api",
"multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",
"safeApiUrl": "https://transaction-lisk.safe.optimism.io/api",
"safeAddress": "0x86E02d7383D6a045848b0a1A842996AC9E943113",
"safeWebUrl": "https://safe.optimism.io/home?safe=lisk:0x86E02d7383D6a045848b0a1A842996AC9E943113",
"gasZipChainId": 238
},
"mantle": {
"name": "mantle",
"chainId": 5000,
Expand Down Expand Up @@ -565,7 +583,7 @@
"wrappedNativeAddress": "0x4200000000000000000000000000000000000006",
"status": "inactive",
"type": "mainnet",
"rpcUrl": "https://worldchain-mainnet.g.alchemy.com/public",
"rpcUrl": "https://worldchain-mainnet.gateway.tenderly.co",
"verificationType": "etherscan",
"explorerUrl": "https://worldscan.org",
"explorerApiUrl": "https://api.worldscan.org/api",
Expand Down Expand Up @@ -629,4 +647,4 @@
"safeWebUrl": "",
"gasZipChainId": 0
}
}
}
5 changes: 3 additions & 2 deletions config/sigs.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
"0xc4af5a74",
"0x03b87e5f",
"0x0d5f0e3b",
"0x08298b5a"
"0x08298b5a",
"0xff84aafa"
]
}
}
3 changes: 3 additions & 0 deletions config/stargate.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"kaia": "0x0000000000000000000000000000000000000000",
"velas": "0x0000000000000000000000000000000000000000",
"linea": "0x1a44076050125825900e736c501f859c50fE728c",
"lisk": "0x0000000000000000000000000000000000000000",
"metis": "0x1a44076050125825900e736c501f859c50fE728c",
"mode": "0x1a44076050125825900e736c501f859c50fE728c",
"mantle": "0x1a44076050125825900e736c501f859c50fE728c",
Expand Down Expand Up @@ -224,6 +225,7 @@
"bsc-testnet": "0x0000000000000000000000000000000000000000",
"lineatest": "0x0000000000000000000000000000000000000000",
"linea": "0xeCc19E177d24551aA7ed6Bc6FE566eCa726CC8a9",
"lisk": "0x0000000000000000000000000000000000000000",
"metis": "0xeCc19E177d24551aA7ed6Bc6FE566eCa726CC8a9",
"mode": "0x0000000000000000000000000000000000000000",
"mantle": "0x296F55F8Fb28E498B858d0BcDA06D955B2Cb3f97",
Expand Down Expand Up @@ -266,6 +268,7 @@
"bsc-testnet": "0x0000000000000000000000000000000000000000",
"lineatest": "0x0000000000000000000000000000000000000000",
"linea": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
"lisk": "0x0000000000000000000000000000000000000000",
"mantle": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
"metis": "0x2F6F07CDcf3588944Bf4C42aC74ff24bF56e7590",
"scroll": "0x36d4686e19c052787D7f24E6913cEbC025714895",
Expand Down
6 changes: 5 additions & 1 deletion config/symbiosis.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"metaRouter": "0xcE8f24A58D85eD5c5A6824f7be1F8d4711A0eb4C",
"gateway": "0xAdB2d3b711Bb8d8Ea92ff70292c466140432c278"
},
"gravity": {
"metaRouter": "0xcE8f24A58D85eD5c5A6824f7be1F8d4711A0eb4C",
"gateway": "0xAdB2d3b711Bb8d8Ea92ff70292c466140432c278"
},
"linea": {
"metaRouter": "0x9A31bAC4b3B958C835C243800B474818D04393dd",
"gateway": "0x83f71AabdDBb9F0E3B6462Cc7635b6fFAD0f2f2e"
Expand Down Expand Up @@ -83,4 +87,4 @@
"metaRouter": "0x7057aB3fB2BeE9c18e0cDe4240DE4ff7f159E365",
"gateway": "0xa0079829B9F1Edc5DD0DE3eC104f281745C4bD81"
}
}
}
1 change: 1 addition & 0 deletions config/tokenwrapper.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"celo": "0x471ece3750da237f93b8e339c536989b8978a438",
"avalanche": "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
"linea": "0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",
"lisk": "0x4200000000000000000000000000000000000006",
"blast": "0x4300000000000000000000000000000000000004",
"worldchain": "0x4200000000000000000000000000000000000006",
"taiko": "0xA51894664A773981C6C112C43ce576f315d5b1B6",
Expand Down
Loading

0 comments on commit 3bdbf13

Please sign in to comment.