Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas zip facet revisited [GasZipFacet v2.0.0,IGasZip v1.0.0,GasZipPeriphery v1.0.0] #807

Merged
merged 124 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 106 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
58984a1
wip zip
H3xept May 2, 2024
d7fae0a
feat: zip erc20 with libswap
H3xept May 5, 2024
978955b
chore: update bsc gaszip address
melianessa Jun 20, 2024
2fe6d8d
Merge branch 'main' into gaszip
maxklenk Jun 25, 2024
277f7e8
clean
maxklenk Jun 25, 2024
dc58aa2
chore: updated gaszip routers + add docs
melianessa Jun 25, 2024
d8763ec
Merge branch 'gaszip' of https://github.com/lifinance/contracts into …
melianessa Jun 25, 2024
384462e
chore: deployRequirements
melianessa Jun 25, 2024
c46f575
chore: remove allowedToken
melianessa Jun 25, 2024
6d4a65b
chore: withdraw wallet from global config
melianessa Jun 25, 2024
4befbe6
chore: comments
melianessa Jun 25, 2024
11f2132
chore: import
melianessa Jun 25, 2024
5e6f2d1
chore: remove owner
melianessa Jun 25, 2024
db0a141
chore: unused import
melianessa Jun 25, 2024
aea3404
chore: remove unused errors
melianessa Jun 25, 2024
423d3b6
forge install: solady
0xDEnYO Jun 26, 2024
e61e22b
forge install: solady
0xDEnYO Jun 26, 2024
123df87
added test and fixed some issues in the contract
0xDEnYO Jun 26, 2024
1b98a5f
adds refundAddress parameter for ERC20
0xDEnYO Jun 26, 2024
5a9b78b
forge install: solady
0xDEnYO Jun 26, 2024
91aa0ec
forge install: solady
0xDEnYO Jun 26, 2024
4dd4db1
tests updated
0xDEnYO Jun 26, 2024
8e743bd
gasZip redeployed to BSC staging
0xDEnYO Jun 26, 2024
bd118ff
update .gitmodules file
0xDEnYO Jun 26, 2024
37bcf04
removes ERC20 refund handling and adds complex test case
0xDEnYO Jun 27, 2024
e96fc41
removes coverage files
0xDEnYO Jun 27, 2024
46cc685
cleanup
0xDEnYO Jun 27, 2024
d3333bd
update docs
0xDEnYO Jun 27, 2024
cbf2fcc
adds complex native test case
0xDEnYO Jun 27, 2024
7255dfa
deploys GasZipFacet to BSC staging
0xDEnYO Jun 27, 2024
2c7b525
fixes issue in deploy log file
0xDEnYO Jun 27, 2024
0ed7770
adds a function with deposit for standalone gas-zip only calls
0xDEnYO Jun 27, 2024
c9a5a75
adds the usual startBridge... functions to the facet + tests
0xDEnYO Jun 28, 2024
fd55da5
adds a amountOutMin parameter for ERC20 deposit function
0xDEnYO Jun 28, 2024
22ef343
redeployed gasZipFacet to bsc staging
0xDEnYO Jul 1, 2024
d7d9fe3
feat: removes destinationChains parameter from GasZipData
0xDEnYO Jul 1, 2024
29b8472
docs: updates GasZipFacet docs
0xDEnYO Jul 1, 2024
d2f49f6
Merge branch 'main' of github.com:lifinance/contracts into gasZipFacet
0xDEnYO Jul 1, 2024
2683fc0
updates facet (startBridge => nativeOnly)
0xDEnYO Jul 2, 2024
c488dc1
replaces amountOutMin parameter with balance checks & updates tests
0xDEnYO Jul 2, 2024
3f37ddf
updates docs
0xDEnYO Jul 2, 2024
2942649
Merge branch 'main' of github.com:lifinance/contracts into gasZipFacet
0xDEnYO Jul 2, 2024
261b93d
fixes typo in URL and adds link to config file
0xDEnYO Jul 2, 2024
71c324e
restricts swapAndBridge.. function to native only + updates tests
0xDEnYO Jul 3, 2024
bbbcbf3
restricts swapAndBridge.. function to native only + updates tests
0xDEnYO Jul 3, 2024
3994945
redeployed gasZipFacet to bsc staging
0xDEnYO Jul 3, 2024
92395be
Merge branch 'gasZipFacet' of github.com:lifinance/contracts into gas…
0xDEnYO Jul 3, 2024
cee6883
Merge branch 'main' of github.com:lifinance/contracts into gasZipFacet
0xDEnYO Jul 3, 2024
352c971
Merge branch 'gasZipFacet' into gasZipFacet-revisited
0xDEnYO Sep 19, 2024
9c7173d
Gas.Zip split into facet & periphery, tests and docs added
0xDEnYO Sep 23, 2024
07562de
Merge branch 'main' into gasZipFacet-revisited
0xDEnYO Sep 23, 2024
fe10183
remove receiver address from GasZipData struct
0xDEnYO Sep 23, 2024
fe0310b
Merge branch 'gasZipFacet-revisited' of github.com:lifinance/contract…
0xDEnYO Sep 23, 2024
c9d79f0
minor fixes
0xDEnYO Sep 23, 2024
0e3ae14
some changes based on coderabbit review comments
0xDEnYO Sep 23, 2024
f19a839
opens swapAndBridge on GasZipFacet for both ERC20 and native
0xDEnYO Sep 26, 2024
a469766
deployed to bsc staging
0xDEnYO Sep 27, 2024
bed2752
updated gasZip to use V2 router
0xDEnYO Sep 30, 2024
1187290
updates git actions and docs
0xDEnYO Sep 30, 2024
07a4893
adds an amount parameter to native deposit function in periphery
0xDEnYO Oct 1, 2024
2ba5c76
redeployed GasZipPeriphery to bsc staging
0xDEnYO Oct 1, 2024
f835d4a
Merge branch 'gasZipFacet-revisited' of github.com:lifinance/contract…
0xDEnYO Oct 1, 2024
b87ae57
returns leftover native funds to msg.sender after deposit plus bsc st…
0xDEnYO Oct 2, 2024
14f43c9
bugfix + bsc staging redeploy
0xDEnYO Oct 2, 2024
91d54ac
bugfix#2 + bsc staging redeploy
0xDEnYO Oct 2, 2024
6740b65
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Oct 4, 2024
3bd0e5a
adds a test case to increase coverage to 100%
0xDEnYO Oct 4, 2024
6bc6446
minor fixes
0xDEnYO Oct 4, 2024
dcced13
test fixed
0xDEnYO Oct 10, 2024
193afc4
gas optimization of helper function (audit issue #1)
0xDEnYO Oct 10, 2024
883b3f4
remove unused error (audit issue #2)
0xDEnYO Oct 10, 2024
eac03e1
adds check for msg.value==amount and removes refundExcessNative mod …
0xDEnYO Oct 10, 2024
0988472
replaces require with custom error (audit issue#6)
0xDEnYO Oct 10, 2024
26ae13c
adds WithdrawablePeriphery for stuck token withdrawals (audit issue#8)
0xDEnYO Oct 10, 2024
b03e658
adds WithdrawablePeriphery base contract for token withdrawals
0xDEnYO Oct 10, 2024
bfa147f
adds receiverAddress check (audit issue#9)
0xDEnYO Oct 10, 2024
bcf24aa
fix test
0xDEnYO Oct 10, 2024
40bf7ee
adds version tag to contract
0xDEnYO Oct 10, 2024
46dbb5a
Merge remote-tracking branch 'origin/withdrawable-periphery' into gas…
0xDEnYO Oct 10, 2024
29106c5
ensures last swap output is native before bridging (audit issue#5)
0xDEnYO Oct 10, 2024
c000a46
removes validateBridgeData modifier and adds dedicated bridgeData che…
0xDEnYO Oct 14, 2024
1e7b10d
redeployed gasZipPeriphery with PROD LiFiDEXAggregator address
0xDEnYO Oct 16, 2024
ca9b659
audit report added
0xDEnYO Oct 18, 2024
2e6512e
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Oct 21, 2024
be6845a
change facet variable to constant
0xDEnYO Oct 22, 2024
cd422f7
change parameter name and order in GasZipData
0xDEnYO Oct 22, 2024
d07da1b
redeployed to BSC staging
0xDEnYO Oct 22, 2024
ff83727
test coverage back to 100%
0xDEnYO Oct 22, 2024
de380ac
redeployed to BSC staging
0xDEnYO Oct 24, 2024
9168e95
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Oct 24, 2024
ae55144
add complex testcase for destinationChains value
0xDEnYO Oct 24, 2024
6414ffa
adjust test case
0xDEnYO Oct 24, 2024
136bddd
Merge branch 'gasZipFacet-revisited' of github.com:lifinance/contract…
0xDEnYO Oct 24, 2024
c501877
fix staging diamond log
0xDEnYO Oct 24, 2024
8ab109a
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Nov 5, 2024
2d8927a
replaces low-level native transfer with function from solady lib
0xDEnYO Nov 5, 2024
ffc537b
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Nov 7, 2024
82bcecc
removes unused import (re-audit issue#11)
0xDEnYO Nov 7, 2024
1f4732a
update (re-)audit report
0xDEnYO Nov 11, 2024
95de3f5
remove old gaszip audit entry
0xDEnYO Nov 11, 2024
7466528
fix incorrect path in audit log
0xDEnYO Nov 11, 2024
1f27a1e
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Nov 11, 2024
0ecbba9
Redeploy to production (except zksync)
ezynda3 Nov 12, 2024
f7c2ed7
Update pragma
ezynda3 Nov 12, 2024
b735e77
update audit
ezynda3 Nov 13, 2024
d0f013f
deploy to zksync
ezynda3 Nov 13, 2024
2c58190
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Nov 20, 2024
f5da97d
adds GasZipPeriphery addresses to dexs.json
0xDEnYO Nov 20, 2024
12db0d3
Merge branch 'gasZipFacet-revisited' of github.com:lifinance/contract…
0xDEnYO Nov 20, 2024
5a19128
make error message more visible in console output
0xDEnYO Nov 20, 2024
afa5c59
update some diamond logs
0xDEnYO Nov 20, 2024
9ee2193
remove old openzeppelin lib
0xDEnYO Nov 20, 2024
e93fb21
forge install: openzeppelin-contracts
0xDEnYO Nov 20, 2024
9c204fa
reinstall openzeppelin contracts 4.9.2
0xDEnYO Nov 20, 2024
202b5bc
add gasZipPeriphery sigs
ezynda3 Nov 21, 2024
b57ec39
Merge branch 'main' of github.com:lifinance/contracts into gasZipFace…
0xDEnYO Nov 25, 2024
93e8ced
Merge branch 'main' into gasZipFacet-revisited
ezynda3 Dec 3, 2024
5ffedeb
fix json
ezynda3 Dec 3, 2024
9918960
fix json
ezynda3 Dec 3, 2024
6d7fe0e
fix logs
ezynda3 Dec 3, 2024
ffe2606
diamond logs updated
0xDEnYO Dec 4, 2024
7b54459
Merge branch 'gasZipFacet-revisited' of github.com:lifinance/contract…
0xDEnYO Dec 4, 2024
38c0c13
undo (wording) changes in git action
0xDEnYO Dec 4, 2024
3e2bf46
added test cases to increase to 100% coverage
0xDEnYO Dec 4, 2024
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
6 changes: 4 additions & 2 deletions .github/workflows/enforceTestCoverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ jobs:
- name: Install Dependencies
run: forge install

- name: Generate Coverage Report
- name: Generate and Filter Coverage Report
run: |
forge coverage --report lcov --force --evm-version 'shanghai' --ir-minimum
echo "Generating coverage report now"

forge coverage --report lcov --force --evm-version shanghai --ir-minimum

echo "Filtering coverage report to only contain coverage info for 'src/'' folder now"

Expand Down
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@
[submodule "lib/solady"]
path = lib/solady
url = https://github.com/Vectorized/solady

16 changes: 16 additions & 0 deletions audit/auditLog.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@
"auditorGitHandle": "sujithsomraaj",
"auditReportPath": "./audit/reports/2024.11.05_EmergencyPauseFacet_ReAudit.pdf",
"auditCommitHash": "da61880ba3847c07c35b64a78b957ff845ec18ac"
},
"audit20241107": {
"auditCompletedOn": "07.11.2024",
"auditedBy": "Sujith Somraaj (individual security researcher)",
"auditorGitHandle": "sujithsomraaj",
"auditReportPath": "./audit/reports/2024.11.07_GasZip.pdf",
"auditCommitHash": "2d8927ababff6ace0c577d92407bcf289ebb89c0"
}
},
"auditedContracts": {
Expand All @@ -47,6 +54,15 @@
"AcrossFacetPackedV3": {
"1.0.0": ["audit20241007"]
},
"GasZipFacet": {
"2.0.0": ["audit20241107"]
},
"GasZipPeriphery": {
"1.0.0": ["audit20241107"]
},
"IGasZip": {
"1.0.0": ["audit20241107"]
},
"ReceiverAcrossV3": {
"1.0.0": ["audit20241007"]
},
Expand Down
Binary file added audit/reports/2024.11.07_GasZip.pdf
Binary file not shown.
24 changes: 24 additions & 0 deletions config/gaszip.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"gasZipRouters": {
"---ListOfRouterAddresses---": "https://dev.gas.zip/gas/chain-support/inbound",
"mainnet": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"arbitrum": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"avalanche": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"base": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"bsc": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"blast": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"fantom": "0xA60768b03eB14d940F6c9a8553329B7F9037C91b",
"gnosis": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"gravity": "0x6Efc6Ead40786bD87A884382b6EA4BcA3C985e99",
"linea": "0xA60768b03eB14d940F6c9a8553329B7F9037C91b",
"mantle": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"metis": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"mode": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"optimism": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"polygon": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"scroll": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"taiko": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"xlayer": "0x2a37D63EAdFe4b4682a3c28C1c2cD4F109Cc2762",
"zksync": "0x252fb662e4d7435d2a5ded8ec94d8932cf76c178"
}
}
2 changes: 1 addition & 1 deletion config/global.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"aurora": "https://safe-transaction-aurora.safe.global/api",
"avalanche": "https://safe-transaction-avalanche.safe.global/api",
"base": "https://safe-transaction-base.safe.global/api",
"blast": "https://transaction.blast-safe.io/api",
"blast": "https://safe-transaction-blast.safe.global/api",
"boba": "https://safe-transaction.mainnet.boba.network/api",
"bsc": "https://safe-transaction-bsc.safe.global/api",
"celo": "https://safe-transaction-celo.safe.global/api",
Expand Down
2 changes: 1 addition & 1 deletion config/networks.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"explorerUrl": "https://blastscan.io",
"explorerApiUrl": "https://api.blastscan.io/api",
"multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",
"safeApiUrl": "https://transaction.blast-safe.io/api",
"safeApiUrl": "https://safe-transaction-blast.safe.global/api",
"safeAddress": "0xdf61270fDC1A892874Fd3C0143A0A4CBA74F4EF1",
"gasZipChainId": 96
},
Expand Down
Loading
Loading