Skip to content

chore: V1.5 featuring SuperformRouter Plus #614

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

Merged
merged 452 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
452 commits
Select commit Hold shift + click to select a range
ed78e88
fix: attempt to fix test
0xTimepunk Sep 4, 2024
3bba9e5
fix: test
0xTimepunk Sep 4, 2024
c03168b
fix: test
0xTimepunk Sep 4, 2024
a0afeff
Merge pull request #608 from superform-xyz/addTestsRouterPlus
0xTimepunk Sep 4, 2024
98ba91e
Merge pull request #562 from superform-xyz/SUP-7153
0xTimepunk Sep 5, 2024
52cbfbb
fix: 7540 imports
0xTimepunk Sep 5, 2024
0cff7d7
Merge pull request #618 from superform-xyz/update7540Imports
sujithsomraaj Sep 6, 2024
1fae8cd
Merge remote-tracking branch 'origin/develop' into v1.5
0xTimepunk Sep 9, 2024
e6cefbe
fix: tests
0xTimepunk Sep 9, 2024
dcbb223
chore: deploy router plus to staging
sujithsomraaj Sep 10, 2024
6874cd7
chore: fix rounding issues in paload helper tests
sujithsomraaj Sep 10, 2024
4b680d7
chore: increase line coverage of BaseSuperformRouterPlus to 100%
sujithsomraaj Sep 10, 2024
6291c01
Merge branch 'develop' into v1.5
sujithsomraaj Sep 12, 2024
8200adf
chore: multi-position rebalance + 4626 deposit tests
sujithsomraaj Sep 15, 2024
de0167c
chore: add tests for multi-dst router plus
sujithsomraaj Sep 15, 2024
bc849c8
chore: finish all scenario for router-plus
sujithsomraaj Sep 15, 2024
e378e8e
chore: cleanup smart wallet tests
sujithsomraaj Sep 15, 2024
7e89079
chore: 90% coverage of router plus
sujithsomraaj Sep 17, 2024
15cca87
chore: complete covering all error cases of same chain rebalancing
sujithsomraaj Sep 17, 2024
315c65b
chore: 100% coverage of router plus
sujithsomraaj Sep 17, 2024
0eef4c3
chore: add more tests for router plus
sujithsomraaj Sep 17, 2024
af2504e
chore: commit wip
sujithsomraaj Sep 19, 2024
1c09e44
chore: add test for decodeXChainRebalanceCallData
sujithsomraaj Sep 19, 2024
94f1cf6
chore: remove invalid selector check in router plus async
sujithsomraaj Sep 19, 2024
ce40fe8
chore: tests for refund flow in router plus async
sujithsomraaj Sep 19, 2024
529e99b
chore: merge with develop
sujithsomraaj Sep 20, 2024
1701c63
chore: propose changes to txdata validation in crosschain rebalance
sujithsomraaj Sep 20, 2024
f12ecdd
chore: no liq data update option
sujithsomraaj Sep 23, 2024
d81a711
chore: add individual errors for liqData validation
sujithsomraaj Sep 23, 2024
251792f
Merge pull request #626 from superform-xyz/router-plus-no-txdata-bug
sujithsomraaj Sep 23, 2024
1a8b9d7
test: contitinuation
0xTimepunk Sep 23, 2024
7eb970e
Merge remote-tracking branch 'origin/v1.5' into test7540
0xTimepunk Sep 24, 2024
dd3dcf7
test: further testing of 7540
0xTimepunk Sep 24, 2024
75f37cb
fix: console log
0xTimepunk Sep 24, 2024
0aaa39b
chore: increase coverage of router-plus-async to 99%
sujithsomraaj Sep 24, 2024
5bcb344
Merge remote-tracking branch 'origin/router-plus-async-coverage' into…
sujithsomraaj Sep 24, 2024
d3f41aa
chore: increase coverage to 100%
sujithsomraaj Sep 24, 2024
6f91e58
test: add more coverage
0xTimepunk Sep 25, 2024
fb76e1c
chore: remove sweeping balance to paymaster
sujithsomraaj Sep 25, 2024
929ac37
chore: deploy router & router plus to staging base
sujithsomraaj Sep 25, 2024
a465b26
chore: deploy new router plus to staging
sujithsomraaj Sep 26, 2024
f7395d7
Merge remote-tracking branch 'origin/v1.5' into test7540
0xTimepunk Sep 27, 2024
fc96851
fix: initiate same chain withdraw tests
0xTimepunk Sep 30, 2024
99312b7
test: same chain withdraw tx data tests
0xTimepunk Sep 30, 2024
a83d659
Merge pull request #628 from superform-xyz/test7540
0xTimepunk Oct 1, 2024
6b881c7
feat: optimize router plus for backend needs
0xTimepunk Oct 1, 2024
e6021ee
fix: script
0xTimepunk Oct 1, 2024
e548dce
fix: remove interimToken check and make it keeper updateable
0xTimepunk Oct 1, 2024
7c4b981
chore: fix failing test
sujithsomraaj Oct 2, 2024
b264e46
fix: router plus
0xTimepunk Oct 2, 2024
60c5b5a
chore: add tests for negative slippage
sujithsomraaj Oct 2, 2024
344492f
chore: fix typos
sujithsomraaj Oct 2, 2024
5571888
Merge pull request #631 from superform-xyz/optimizeRouterPlus
sujithsomraaj Oct 2, 2024
e0f34d7
chore: deploy router plus to staging
sujithsomraaj Oct 2, 2024
f7f06d7
Merge pull request #632 from superform-xyz/deploy-staging-router-plus
0xTimepunk Oct 2, 2024
3284025
chore: add more tests for 7540
sujithsomraaj Oct 7, 2024
128586d
feat: berachain bartio tested
0xTimepunk Oct 7, 2024
b9ef8ea
chore: cover all internal functions of ERC7540 form
sujithsomraaj Oct 8, 2024
63da2c7
fix: script for tenderly deployment
0xTimepunk Oct 8, 2024
4f5ab6b
Merge pull request #633 from superform-xyz/berachainBartioSupport
0xTimepunk Oct 8, 2024
f255463
chore: cover zero collateral case in claimRedeem
sujithsomraaj Oct 8, 2024
157c91d
chore: full coverage of 7540 deposit
sujithsomraaj Oct 8, 2024
8f888a3
chore: bring 7540 to near 100% coverage
sujithsomraaj Oct 8, 2024
3817568
chore: bring 7540 to 100% coverage
sujithsomraaj Oct 8, 2024
19c570a
chore: test modifiers in async state registry
sujithsomraaj Oct 8, 2024
166aacd
chore: bring 7540 to 100% coverage
sujithsomraaj Oct 9, 2024
1c27a92
chore: cover all branches in async registry modifier
sujithsomraaj Oct 9, 2024
8be16b0
Merge branch 'v1.5' into SUP-8648
sujithsomraaj Oct 9, 2024
a20d3ad
test: new scenario multi dst permit2
0xTimepunk Oct 9, 2024
d570f6a
test: fix scenario
0xTimepunk Oct 9, 2024
fe71ba2
chore: cover all branches of claimRedeem
sujithsomraaj Oct 9, 2024
0ed7ca3
chore: bring async state registry to 100% coverage
sujithsomraaj Oct 9, 2024
950abb5
chore: fix form ids to 3 for 7540
sujithsomraaj Oct 9, 2024
5b6e928
chore: change 7540 form ids to 4
sujithsomraaj Oct 10, 2024
61d64f0
chore: fix failing tests
sujithsomraaj Oct 10, 2024
0084f57
chore: add staging deploy scripts
sujithsomraaj Oct 10, 2024
0891c45
chore: add deploy scripts for async state registry
sujithsomraaj Oct 10, 2024
d702778
fix: a few script files
0xTimepunk Oct 10, 2024
389dad6
Merge branch 'SUP-8648' into SUP-8769
0xTimepunk Oct 10, 2024
caa2473
Merge pull request #636 from superform-xyz/SUP-8769
0xTimepunk Oct 10, 2024
0663699
Merge pull request #635 from superform-xyz/permit2MultiDst
0xTimepunk Oct 10, 2024
0658f7c
Merge branch 'v1.5' into SUP-8648
0xTimepunk Oct 10, 2024
7bf689b
chore: deploy async state registry + smoke tests
sujithsomraaj Oct 10, 2024
4bc1acb
chore: deploy 7540 form
sujithsomraaj Oct 10, 2024
526c666
chore: add smoke tests for 7540 form
sujithsomraaj Oct 10, 2024
9aa3835
fix: staging 7540 deployment
0xTimepunk Oct 10, 2024
198a881
chore: fix all failing tests
sujithsomraaj Oct 11, 2024
f043501
chore: fix failing tests
sujithsomraaj Oct 11, 2024
6c39156
Merge pull request #634 from superform-xyz/SUP-8648
0xTimepunk Oct 11, 2024
b1d0613
feat: deploy berachain bartio
0xTimepunk Oct 11, 2024
fc4b4a0
Merge pull request #637 from superform-xyz/berachainBartioDeploy
0xTimepunk Oct 15, 2024
0fbb7ea
fix: rescuer on scripts
0xTimepunk Oct 15, 2024
08ae01f
Merge pull request #638 from superform-xyz/fixRescuerLineaBlast
0xTimepunk Oct 16, 2024
5b5d429
fix: add RECEIVER_ADDRESS_EQUAL_TO_PROCESSOR_ADDRESS() error
TamaraRingas Oct 16, 2024
11cc0da
fix: move RECEIVER_ADDRESS_EQUAL_TO_PROCESSOR_ADDRESS() error to ISup…
TamaraRingas Oct 16, 2024
f380c7a
chore: rename IS_ROUTER_PLUS_PROCESSOR() error
TamaraRingas Oct 16, 2024
00151da
chore: rm unused error
TamaraRingas Oct 16, 2024
71d5769
add NOT_CORE_STATE_REGISTRY_RESCUER() error
TamaraRingas Oct 16, 2024
5f472a0
add REFUND_AMOUNT_EXCEEDS_RECEIVED_AMOUNT() error
TamaraRingas Oct 16, 2024
5fb5af1
chore: rename REFUND_AMOUNT_EXCEEDS_EXPECTED_AMOUNT() error
TamaraRingas Oct 16, 2024
c1c2f33
feat: add requestRefund() function
TamaraRingas Oct 16, 2024
4879f8e
fix: update requestRefund() params
TamaraRingas Oct 16, 2024
53ac164
chore: add onlyCoreStateRegistryRescuer() modifier
TamaraRingas Oct 16, 2024
a0a746e
feat: add approveRefund()
TamaraRingas Oct 16, 2024
a79275c
refactor: rm old refund functions
TamaraRingas Oct 16, 2024
9924cab
refactor: rm old refund functions
TamaraRingas Oct 16, 2024
e42992c
refactor: rm _getDelay()
TamaraRingas Oct 16, 2024
7f790d3
refactor: rm refund proposal time checks
TamaraRingas Oct 16, 2024
26d0e22
refactor: rm tests for old refund mechanism
TamaraRingas Oct 16, 2024
3506d86
chore: rm unused errors
TamaraRingas Oct 16, 2024
2ec1753
add REFUND_ALREADY_APPROVED() error
TamaraRingas Oct 16, 2024
b9cea45
fix: add checks for duplicate approvals
TamaraRingas Oct 16, 2024
a49417f
chore: add test case for duplicate approvals
TamaraRingas Oct 16, 2024
094e8d8
chore: formatting
TamaraRingas Oct 16, 2024
7ead146
style: formatting
TamaraRingas Oct 17, 2024
fcd9edf
Revert "chore: formatting"
TamaraRingas Oct 17, 2024
0efc2ba
Revert "style: formatting"
TamaraRingas Oct 17, 2024
fc6f31c
fix: formatting
0xTimepunk Oct 17, 2024
477fb32
fix: correct interface of async router plus
0xTimepunk Oct 17, 2024
6fda946
refactor: rm proposedTime from Refund struct
TamaraRingas Oct 17, 2024
c861efc
Merge pull request #640 from superform-xyz/joao-fix-formatting-8873
TamaraRingas Oct 17, 2024
4e9e104
fix: delegate prank
0xTimepunk Oct 17, 2024
aa52182
fix: remainder of files
0xTimepunk Oct 17, 2024
b6ce0b7
test: fix staging test
0xTimepunk Oct 17, 2024
81e9c40
Merge remote-tracking branch 'origin/v1.5' into tamara-sup-8873-guard…
0xTimepunk Oct 17, 2024
ad7a5f5
feat: add setGlobalSlippage()
TamaraRingas Oct 17, 2024
b78b78e
feat: add _hasRole()
TamaraRingas Oct 17, 2024
8ebe706
feat: add setGlobalSlippage()
TamaraRingas Oct 17, 2024
f2c4ceb
refactor: decode amountIn in rebalanceSinglePosition()
TamaraRingas Oct 18, 2024
4b2776c
fix: add revert for invalid rebalance selector
TamaraRingas Oct 18, 2024
8a23ca2
fix: add slippage check in rebalanceSinglePosition()
TamaraRingas Oct 18, 2024
ea9d03e
fix: update approval amount in _transferSuperPositions()
TamaraRingas Oct 18, 2024
19878b6
refactor: rename RefundRequested event
TamaraRingas Oct 18, 2024
b89ec5a
refactor: rename RefundRequested event
TamaraRingas Oct 18, 2024
d6541b0
fix: typo
TamaraRingas Oct 18, 2024
747a726
Merge pull request #641 from superform-xyz/tamara-sup-8925-fail-soone…
0xTimepunk Oct 18, 2024
9656274
chore: rm unused import statement
TamaraRingas Oct 19, 2024
369bf3e
fix: move global slippage check to _rebalancePositionsSync()
TamaraRingas Oct 19, 2024
62dd458
fix: update tests
TamaraRingas Oct 21, 2024
8d38ebd
refactor: rm amount from requestRefund()
TamaraRingas Oct 21, 2024
b85030d
refactor: rm amount from requestRefund()
TamaraRingas Oct 21, 2024
9ead37a
feat: test setGlobalSlippage()
TamaraRingas Oct 21, 2024
af6b2f5
refactor: add additional slippage checks to _rebalancePositionsSync()
TamaraRingas Oct 21, 2024
b912b3c
test: fix amount in calculation
0xTimepunk Oct 21, 2024
c8af790
Merge pull request #644 from superform-xyz/tamara-sup-8878-joao-fix
TamaraRingas Oct 22, 2024
b8036d3
refactor: rm global slippage setter in constructor
TamaraRingas Oct 22, 2024
25193dc
refactor: set global slippage in setUp()
TamaraRingas Oct 22, 2024
c398275
reorder test_revert_dispatchPayload_invalidCaller() to revert correctly
TamaraRingas Oct 22, 2024
ddd63f2
Merge pull request #642 from superform-xyz/tamara-sup-8903-remove-unu…
0xTimepunk Oct 23, 2024
7b7cdc8
fix: add tolerance check to _redeemShare()
TamaraRingas Oct 23, 2024
e8a5d18
fix: undo change to test-vvv
TamaraRingas Oct 23, 2024
3cab42f
chore: add test for deposits with tolerance
TamaraRingas Oct 23, 2024
1779144
Merge branch 'tamara-sup-8873-guard-against-malicious-processors' of …
TamaraRingas Oct 23, 2024
186182d
fix: reorder test logic
TamaraRingas Oct 24, 2024
af8d01b
add check for expectedAmountInterimAsset == 0 in completeCrossCHainRe…
TamaraRingas Oct 24, 2024
b4af66d
fix: add TOLERANCE_EXCEEDED() error
TamaraRingas Oct 24, 2024
b352ece
refactor: throw check tolerance in separate block
TamaraRingas Oct 24, 2024
a548dba
fix: simplify request amount to refund
0xTimepunk Oct 24, 2024
2dad946
chore: add test_deposit4626_toleranceExceeded()
TamaraRingas Oct 24, 2024
5c246e4
refactor: update refund mechanism
TamaraRingas Oct 24, 2024
3684d11
test requested refund amount > expected
TamaraRingas Oct 24, 2024
1d1e450
fix: update requested amount too high test
TamaraRingas Oct 24, 2024
b588195
refactor: update tolerance checks in redeemShare()
TamaraRingas Oct 24, 2024
baa8aee
fix: update tolerance exceeded test
TamaraRingas Oct 24, 2024
c6191c5
chore: update refund tests
TamaraRingas Oct 24, 2024
ff9a43a
fix: update amount setter in requestRefund()
TamaraRingas Oct 24, 2024
7464511
chore: add extra tests for requestRefund()
TamaraRingas Oct 24, 2024
2375ce7
fix: update invalid approver error selector
TamaraRingas Oct 24, 2024
7d73256
chore: rm unused variable
TamaraRingas Oct 24, 2024
70d8021
fix: update test-vvv
TamaraRingas Oct 24, 2024
7fcba9f
refactor: update tolerance error in redeemShare()
TamaraRingas Oct 24, 2024
8378e43
fix: update mock call in test_deposit4626_toleranceExceeded()
TamaraRingas Oct 24, 2024
c226008
chore: add test_deposit4626_toleranceExceeded_noSlippage()
TamaraRingas Oct 24, 2024
87eb829
refactor: update tolerance check in redeemShare()
TamaraRingas Oct 24, 2024
1ab28aa
chore: comments
TamaraRingas Oct 24, 2024
0a7a58b
Merge pull request #645 from superform-xyz/tamara-low-info-fixes
0xTimepunk Oct 24, 2024
60dc92d
fix: update test_crossChainRebalance_updateSuperformData_DifferentRec…
TamaraRingas Oct 24, 2024
bde75d9
wip: update test_crossChainRebalance_updateSuperformData_DifferentRec…
TamaraRingas Oct 25, 2024
48e3015
test: fix
0xTimepunk Oct 25, 2024
3d85405
Merge pull request #639 from superform-xyz/tamara-sup-8873-guard-agai…
0xTimepunk Oct 25, 2024
9a4c463
chore: update test_rebalanceSinglePosition_multiDstMultiVaultDepositS…
TamaraRingas Oct 25, 2024
9f02765
chore: update test_rebalanceSinglePosition_multiDstMultiVaultDepositS…
TamaraRingas Oct 25, 2024
7d8ecad
add ZERO_LENGTH() error
TamaraRingas Oct 25, 2024
01a3d07
refactor: make deposit4626() param types arrays
TamaraRingas Oct 25, 2024
9959636
refactor: make deposit4626() internal
TamaraRingas Oct 25, 2024
4678150
refactor: update deposit4626() to handle array params
TamaraRingas Oct 25, 2024
9817472
fix: simplify test structure
0xTimepunk Oct 25, 2024
e276a54
fix: rm ZERO_LENGTH() error
TamaraRingas Oct 25, 2024
92f87b1
fix: update errors in deposit4626()
TamaraRingas Oct 25, 2024
8d17fde
fix: update deposit4626 tests to use arrays
TamaraRingas Oct 25, 2024
68b2747
chore: add test_deposit4626_multipleVaults()
TamaraRingas Oct 25, 2024
af6ed66
fix: update approvals in test_deposit4626_multipleVaults()
TamaraRingas Oct 25, 2024
9ede180
fix: update msg.value in _deposit4626()
TamaraRingas Oct 25, 2024
dc308cf
fix: store vaults length as var
TamaraRingas Oct 25, 2024
a1c4574
fix: update errors in deposit4626()
TamaraRingas Oct 26, 2024
69f524a
fix: rm unnecessary check in _deposit4626()
TamaraRingas Oct 26, 2024
671d0d4
chore: add test_deposit4626_multipleVaults_zeroInputValue()
TamaraRingas Oct 26, 2024
bb0867a
fix: rm tests relating to disputeRefund()
TamaraRingas Oct 26, 2024
260f2a1
fix: rm overrides
TamaraRingas Oct 26, 2024
e246f49
fix: update liqReqs for multidstmultivault rebalance
TamaraRingas Oct 26, 2024
c9f1be4
chore: add test_rebalanceSinglePosition_singleXChainMultiVaultDeposit()
TamaraRingas Oct 28, 2024
7885dfc
chore: add test_rebalanceSinglePosition_singleXChainSingleVaultDeposi…
TamaraRingas Oct 28, 2024
6a010e7
Merge pull request #647 from superform-xyz/tamara-sup-9062-add-loop-v…
TamaraRingas Oct 28, 2024
55422db
chore: add _buildRebalanceMultiMultiDstSingleVaultArgs()
TamaraRingas Oct 28, 2024
71b836a
fix: update superformIds in test_rebalanceSinglePosition_multiDstSing…
TamaraRingas Oct 28, 2024
751d71c
fix: update return storage location _buildRebalanceMultiMultiDstSingl…
TamaraRingas Oct 28, 2024
7be0cc8
fix: update _buildRebalanceMultiMultiDstSingleVaultArgs()
TamaraRingas Oct 28, 2024
e1f91fc
fix: update _buildRebalanceMultiMultiDstSingleVaultArgs()
TamaraRingas Oct 28, 2024
8d83ec7
fix: rm balanceDifference != assets check in _redeemShare()
TamaraRingas Oct 28, 2024
79fe34d
refactor: split _buildRebalanceMultiMultiDstSingleVaultArgs() into he…
TamaraRingas Oct 28, 2024
4c79081
add _buildRebalanceMultiMultiDstSingleVaultArgs()
TamaraRingas Oct 28, 2024
c8a3e8a
fix: update _buildRebalanceMultiMultiDstSingleVaultArgs()
TamaraRingas Oct 28, 2024
fa32bf5
fix: update _xChainDeposit() calls in test_rebalanceSinglePosition_mu…
TamaraRingas Oct 28, 2024
a775456
fix: update params in _buildSingleVaultSFData()
TamaraRingas Oct 28, 2024
ca0e563
update REBALANCE_TO chainId in test_rebalanceSinglePosition_multiDstS…
TamaraRingas Oct 28, 2024
8e2c0b7
fix: update REBALANCE_TO chainId in test_rebalanceSinglePosition_mult…
TamaraRingas Oct 28, 2024
2d7208a
fix: update fork in test_rebalanceSinglePosition_multiDstSingleVaultD…
TamaraRingas Oct 28, 2024
382eedb
Merge pull request #648 from superform-xyz/fix-audit-recommendations
TamaraRingas Oct 28, 2024
e06f60d
fix: update tolerance check in redemShare()
TamaraRingas Oct 28, 2024
9e60021
fix: rm unused helper functions
TamaraRingas Oct 28, 2024
53d46c0
fux: rm _buildRebalanceMultiMultiDstSingleVaultArgs()
TamaraRingas Oct 28, 2024
19cbbd1
Merge pull request #649 from superform-xyz/fix-update-tolerance-check…
0xTimepunk Oct 28, 2024
b613612
fix: update test_rebalanceMultiPositions_multiDstSingleVaultDepositSe…
TamaraRingas Oct 29, 2024
61a12ab
import MultiDstSingleVaultStateReq
TamaraRingas Oct 29, 2024
4fcfde5
test: fix rebalanceMultiPositions_multiDstSingleVaultDepositSelector
0xTimepunk Oct 29, 2024
bdb146f
test: fix test_rebalanceMultiPositions_multiDstMultiVaultDepositSelector
0xTimepunk Oct 29, 2024
572bc8b
fix: remaining issues
0xTimepunk Oct 29, 2024
1f74c88
Merge remote-tracking branch 'origin/v1.5' into tamara-sup-8878-fix-a…
0xTimepunk Oct 29, 2024
0d7ea69
fix: internalize approvals fix and add to deposit4626
0xTimepunk Oct 30, 2024
86e76c5
fix: slippage check in wrong order
0xTimepunk Oct 30, 2024
ccc551a
fix: balanceDiff
0xTimepunk Oct 30, 2024
15d5530
Merge pull request #643 from superform-xyz/tamara-sup-8878-fix-approv…
0xTimepunk Oct 30, 2024
32b5aef
fix: deploy router plus staging
0xTimepunk Oct 30, 2024
a4f65be
fix: remove euler vault
0xTimepunk Oct 31, 2024
8ddcdcb
Merge pull request #651 from superform-xyz/v1.5-removeEulerVault
0xTimepunk Nov 4, 2024
616c993
Merge pull request #650 from superform-xyz/deployRouterPlusStaging
0xTimepunk Nov 4, 2024
aa794c7
feat: V1.5 pre bera fix SUP-9039 (#646)
0xTimepunk Nov 22, 2024
f72ae2f
fix: prevent multiple calls to request refund [sup-9336] (#654)
TamaraRingas Nov 22, 2024
4d26c8d
fix: update event in requestRefund [sup 9338] (#655)
TamaraRingas Nov 22, 2024
3b6aa9c
fix: add sanity check for `intertimAsset == 0` in `approveRefund()` […
TamaraRingas Nov 22, 2024
1c71517
chore: Merge 1.5 with dev (#658)
0xTimepunk Nov 22, 2024
8c686c8
merge: fix
0xTimepunk Nov 22, 2024
60dd29e
fix: smoke tests
0xTimepunk Nov 22, 2024
1abc86d
fix: remedy rounding issue in `_deposit4626()` by adding remainder to…
TamaraRingas Nov 25, 2024
7855e98
refactor: optimize refund mappings in RouterPlusAsync [sup 9339] (#659)
TamaraRingas Nov 25, 2024
ae9af3a
fix: msgValue Calculation (#661)
0xTimepunk Dec 2, 2024
71dd291
feat: deploy router plus & restore payload helper + remove logging fr…
0xTimepunk Dec 3, 2024
68aef17
chore: fix coverage (#662)
0xTimepunk Dec 3, 2024
e367a5d
feat: router plus on mainnet eth (#663)
0xTimepunk Dec 9, 2024
e495b49
fix: routerPlusSmoke (#664)
0xTimepunk Dec 9, 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
17 changes: 14 additions & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ concurrency:

on:
push:
branches: [main, develop, v1]
branches: [main, develop, v1.5]
pull_request:
branches: [main, develop, v1]
branches: [main, develop]

env:
BSC_RPC_URL: ${{ secrets.BSC_RPC_URL }}
Expand All @@ -19,8 +19,11 @@ env:
AVALANCHE_RPC_URL: ${{ secrets.AVALANCHE_RPC_URL }}
BASE_RPC_URL: ${{ secrets.BASE_RPC_URL }}
FANTOM_RPC_URL: ${{ secrets.FANTOM_RPC_URL }}
SEPOLIA_RPC_URL: ${{ secrets.SEPOLIA_RPC_URL }}
BSC_TESTNET_RPC_URL: ${{ secrets.BSC_TESTNET_RPC_URL }}
LINEA_RPC_URL: ${{ secrets.LINEA_RPC_URL }}
BLAST_RPC_URL: ${{ secrets.BLAST_RPC_URL }}
BARTIO_RPC_URL: ${{ secrets.BARTIO_RPC_URL }}
BSC_RPC_URL_QN: ${{ secrets.BSC_RPC_URL }}
ARBITRUM_RPC_URL_QN: ${{ secrets.ARBITRUM_RPC_URL }}
OPTIMISM_RPC_URL_QN: ${{ secrets.OPTIMISM_RPC_URL }}
Expand All @@ -29,8 +32,11 @@ env:
AVALANCHE_RPC_URL_QN: ${{ secrets.AVALANCHE_RPC_URL }}
BASE_RPC_URL_QN: ${{ secrets.BASE_RPC_URL }}
FANTOM_RPC_URL_QN: ${{ secrets.FANTOM_RPC_URL }}
SEPOLIA_RPC_URL_QN: ${{ secrets.SEPOLIA_RPC_URL }}
BSC_TESTNET_RPC_URL_QN: ${{ secrets.BSC_TESTNET_RPC_URL }}
LINEA_RPC_URL_QN: ${{ secrets.LINEA_RPC_URL }}
BLAST_RPC_URL_QN: ${{ secrets.BLAST_RPC_URL }}
BARTIO_RPC_URL_QN: ${{ secrets.BARTIO_RPC_URL }}
TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }}
TENDERLY_PROJECT_SLUG: "v1" # your project slug
TENDERLY_ACCOUNT_ID: "superform" # your username or organization name
Expand All @@ -50,6 +56,11 @@ jobs:
- name: "Install Foundry"
uses: "foundry-rs/foundry-toolchain@v1"


- name: "Show the Foundry version"
run: "forge --version"


- name: "Show the Foundry config"
run: "forge config"

Expand Down Expand Up @@ -165,7 +176,7 @@ jobs:
run: "make coverage"

- name: "Upload coverage report to Codecov"
uses: "codecov/codecov-action@v4"
uses: "codecov/codecov-action@v5"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
173 changes: 152 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# (-include to ignore error if it does not exist)
-include .env


# only export these env vars if ENVIRONMENT = local
ifeq ($(ENVIRONMENT), local)
export ETHEREUM_RPC_URL = $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/ETHEREUM_RPC_URL/credential)
Expand All @@ -15,6 +14,7 @@ ifeq ($(ENVIRONMENT), local)
export FANTOM_RPC_URL := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/FANTOM_RPC_URL/credential)
export LINEA_RPC_URL := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/LINEA_RPC_URL/credential)
export BLAST_RPC_URL := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BLAST_RPC_URL/credential)
export BARTIO_RPC_URL := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BARTIO_RPC_URL/credential)
export ETHEREUM_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/ETHEREUM_RPC_URL/credential)
export BSC_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BSC_RPC_URL/credential)
export AVALANCHE_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/AVALANCHE_RPC_URL/credential)
Expand All @@ -23,27 +23,158 @@ ifeq ($(ENVIRONMENT), local)
export OPTIMISM_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/OPTIMISM_RPC_URL/credential)
export BASE_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BASE_RPC_URL/credential)
export FANTOM_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/FANTOM_RPC_URL/credential)
export SEPOLIA_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/SEPOLIA_RPC_URL/credential)
export BSC_TESTNET_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BSC_TESTNET_RPC_URL/credential)
export LINEA_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/LINEA_RPC_URL/credential)
export BLAST_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BLAST_RPC_URL/credential)
export BARTIO_RPC_URL_QN := $(shell op read op://5ylebqljbh3x6zomdxi3qd7tsa/BARTIO_RPC_URL/credential)
endif

# Check for required dependencies
CHECK_FORGE := $(shell command -v forge 2> /dev/null)
CHECK_SOLC := $(shell command -v solc 2> /dev/null)
CHECK_ABIGEN := $(shell command -v abigen 2> /dev/null)
CHECK_ITYFUZZ := $(shell ityfuzz -v forge 2> /dev/null)


check-forge:
ifndef CHECK_FORGE
$(error "Forge is not installed. Please install Forge and retry.")
endif

check-solc:
ifndef CHECK_SOLC
$(error "Solc is not installed. Please install solc and retry.")
endif

check-abigen:
ifndef CHECK_ABIGEN
$(error "Abigen is not installed. Please install Abigen and retry.")
endif

# deps
install:; forge install
update:; forge update

# Build & test
build :; FOUNDRY_PROFILE=production forge build
build-unoptimized :; FOUNDRY_PROFILE=localdev forge build
build-sizes :; FOUNDRY_PROFILE=production forge build --sizes
test-vvv :; forge test --match-test test_DstSwapIndex0DirectToCSRIndex1 --evm-version cancun -vvv
ftest :; forge test --evm-version cancun
test-ci :; forge test --no-match-path "test/invariant/**/*.sol" --evm-version cancun
coverage :; FOUNDRY_PROFILE=coverage forge coverage --no-match-path "test/invariant/**/*.sol" --no-match-contract SmokeTest --evm-version cancun --report lcov
coverage-t :; FOUNDRY_PROFILE=coverage forge coverage --match-contract 5115 --evm-version cancun --report lcov
smoke-test :; forge test --match-contract SmokeTest -vvv
invariant :; forge test --match-path "test/invariant/**/*.sol" --evm-version cancun -vvv
invariant-rewards :; forge test --match-test invariant_tokenBalances --evm-version cancun -vvv
clean :; forge clean
snapshot :; forge snapshot
fmt :; forge fmt && forge fmt test/
ityfuzz :; ityfuzz evm -m -- forge test
check-ityfuzz:
ifndef CHECK_ITYFUZZ
$(error "ityfuzz is not installed. Please install ityfuzz and retry.")
endif

# Targets that require the checks
generate: check-forge check-solc check-abigen
install: check-forge
update: check-forge
build: check-forge
build-unoptimized: check-forge
build-sizes: check-forge
test-vvv: check-forge
ftest: check-forge
test-ci: check-forge
coverage: check-forge
coverage-t: check-forge
smoke-test: check-forge
invariant: check-forge
invariant-rewards: check-forge
clean: check-forge
snapshot: check-forge
fmt: check-forge
ityfuzz: check-ityfuzz

.PHONY: generate
generate: build ## Generates go bindings for smart contracts
./script/utils/retrieve-abis.sh

# General
abigen --abi out/SuperformRouter.sol/SuperformRouter.abi --pkg contracts --type SFRouter --out contracts/SuperformRouter.go
abigen --abi out/SuperformFactory.sol/SuperformFactory.abi --pkg contracts --type SFFactory --out contracts/SuperformFactory.go
abigen --abi out/SuperPositions.sol/SuperPositions.abi --pkg contracts --type SuperPositions --out contracts/SuperPositions.go
abigen --abi out/VaultClaimer.sol/VaultClaimer.abi --pkg contracts --type VaultClaimer --out contracts/VaultClaimer.go
abigen --abi out/CoreStateRegistry.sol/CoreStateRegistry.abi --pkg contracts --type CoreStateRegistry --out contracts/CoreStateRegistry.go

# Payments
abigen --abi out/PaymentHelper.sol/PaymentHelper.abi --pkg contracts --type PaymentHelper --out contracts/PaymentHelper.go
abigen --abi out/PayMaster.sol/PayMaster.abi --pkg contracts --type PayMaster --out contracts/PayMaster.go

# Forms
abigen --abi out/ERC4626Form.sol/ERC4626Form.abi --pkg contracts --type ERC4626Form --out contracts/ERC4626Form.go

# Superform router plus
abigen --abi out/SuperformRouterPlus.sol/SuperformRouterPlus.abi --pkg contracts --type SuperformRouterPlus --out contracts/SuperformRouterPlus.go
abigen --abi out/SuperformRouterPlusAsync.sol/SuperformRouterPlusAsync.abi --pkg contracts --type SuperformRouterPlusAsync --out contracts/SuperformRouterPlusAsync.go

.PHONY: install
install: ## Installs the project
forge install

.PHONY: update
update: ## Updates the project
forge update

.PHONY: build
build: ## Builds the project
FOUNDRY_PROFILE=production forge build

.PHONY: build-unoptimized
build-unoptimized: ## Builds the project unoptimized
FOUNDRY_PROFILE=localdev forge build

.PHONY: build-sizes
build-sizes: ## Builds the project and shows sizes
FOUNDRY_PROFILE=production forge build --sizes

.PHONY: test-vvv
test-vvv: ## Runs tests with verbose output
forge test --match-test test_superRegistryAddresses --evm-version cancun -vv

.PHONY: ftest
ftest: ## Runs tests with cancun evm version
forge test --evm-version cancun

.PHONY: test-ci
test-ci: ## Runs tests in CI mode
forge test --no-match-path "test/invariant/**/*.sol" --evm-version cancun

.PHONY: coverage
coverage: ## Runs coverage
FOUNDRY_PROFILE=coverage forge coverage --no-match-path "test/invariant/**/*.sol" --evm-version cancun --report lcov

.PHONY: coverage-t
coverage-t: ## Runs coverage for a specific contract
FOUNDRY_PROFILE=coverage forge coverage --match-contract 7540 --evm-version cancun --report lcov

.PHONY: smoke-test
smoke-test: ## Runs smoke tests
forge test --match-contract SmokeTest -vvv

.PHONY: invariant
invariant: ## Runs invariant tests
forge test --match-path "test/invariant/**/*.sol" --evm-version cancun -vvv

.PHONY: invariant-rewards
invariant-rewards: ## Runs invariant tests for rewards
forge test --match-test invariant_tokenBalances --evm-version cancun -vvv

.PHONY: clean
clean: ## Cleans the project
forge clean

.PHONY: snapshot
snapshot: ## Creates a snapshot
forge snapshot

.PHONY: fmt
fmt: ## Formats the project
forge fmt && forge fmt test/

.PHONY: ityfuzz
ityfuzz: ## Runs ityfuzz
ityfuzz evm -m -- forge test

## Help display.
## Pulls comments from beside commands and prints a nicely formatted
## display with the commands and their usage information.
.DEFAULT_GOAL := help

.PHONY: help
help: ## Prints this help
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ OPTIMISM_RPC_URL=
ETHEREUM_RPC_URL=
BASE_RPC_URL=
FANTOM_RPC_URL=
SEPOLIA_RPC_URL=
```

3. Install submodule dependencies:
Expand Down
Loading
Loading