Skip to content

script for transferring swap facility ownership to timelock - #71

Merged
ith-harvey merged 6 commits into
mainfrom
swap-facility-upgrade
Nov 17, 2025
Merged

script for transferring swap facility ownership to timelock#71
ith-harvey merged 6 commits into
mainfrom
swap-facility-upgrade

Conversation

@ith-harvey

@ith-harvey ith-harvey commented Nov 15, 2025

Copy link
Copy Markdown
Contributor

Summary
This PR adds the scripting and Makefile tasks required to propose a transfer of the SwapFacility ownership to the appropriate timelock controller. These changes follow the same batching and multisig execution pattern used previously in m-portal-lite, allowing us to coordinate the upgrade alongside the broader timelock execution work.

Motivation:
The SwapFacility needs to transfer its ProxyAdmin ownership and DEFAULT_ADMIN_ROLE
to the chain-specific timelock as part of the upcoming upgrade. No script
existed in evm-m-extensions to generate the required batched multisig proposal,
so this PR introduces that logic using the batch utilities from common.

Changes:

  • Added ProposeTransferSwapFacilityOwner.s.sol, which builds a batched call
    sequence for:
    • transferring ProxyAdmin ownership
    • granting the admin role to the timelock
    • renouncing current multisig admin authority
  • Added Makefile tasks (chain-specific and generic) to prepare a proposal
    for the owner transfer
  • Updated the common submodule pointer to main to include the new batch
    utilities required by the script

Note on common submodule update:
I updated the common submodule to the latest main commit in order to bring in
the MultiSigBatchBase utilities. This was not done through a versioned release.
If the team prefers that we follow the release/tag pattern for common, I am
happy to cut a new release there and update the submodule reference to point
to that release instead. Once a new tagged release exists, I can update this PR
(or a follow-up PR) to reference it.

@ith-harvey
ith-harvey marked this pull request as draft November 15, 2025 23:32
@github-actions

github-actions Bot commented Nov 15, 2025

Copy link
Copy Markdown

Changes to gas cost

Generated at commit: 6de6dd8b579f891be2b593582765fec7c79addec, compared to commit: fda2152a1e6872d2e69db68731bd55a1c2839546

🧾 Summary (20% most significant diffs)

Contract Method Avg (+/-) %
TransparentUpgradeableProxy accruedYieldAndFeeOf
accruedYieldOf
claimYield
disableEarning
yield
-10,307 ✅
+2,657 ❌
+22,875 ❌
+9,562 ❌
+2,261 ❌
-58.38%
+45.77%
+57.78%
+27.42%
+21.10%

Full diff report 👇
Contract Deployment Cost (+/-) Method Min (+/-) % Avg (+/-) % Median (+/-) % Max (+/-) % # Calls (+/-)
TransparentUpgradeableProxy 1,066,691 (+12) accruedFeeOf
accruedYieldAndFeeOf
accruedYieldOf
claimFor(address)
claimYield
currentIndex
disableEarning
enableEarning
fallback
feeRecipient
grantRole
hasRole
isEarningEnabled
msgSender
revokeRole
setAccountInfo(address,bool,uint16)
setFeeRate
setFeeRecipient
setPermissionedExtension
setPermissionedMSwapper
setYieldRecipient
swap
swapInM
swapOutM
updateIndex
yield
17,559 (0)
3,238 (-14,400)
2,448 (0)
26,548 (0)
33,965 (+3,523)
7,457 (0)
28,472 (0)
28,369 (0)
1,012 (+1,012)
7,301 (0)
31,846 (0)
7,604 (-22)
7,540 (0)
0 (-781)
33,977 (0)
29,331 (0)
28,942 (0)
28,933 (0)
29,059 (-2,202)
29,294 (-2,933)
29,128 (0)
38,680 (-7,361)
38,211 (-68,820)
38,191 (-5,285)
42,429 (+11,876)
12,831 (+9,885)
0.00%
-81.64%
0.00%
0.00%
+11.57%
0.00%
0.00%
0.00%
+∞%
0.00%
0.00%
-0.29%
0.00%
-100.00%
0.00%
0.00%
0.00%
0.00%
-7.04%
-9.10%
0.00%
-15.99%
-64.30%
-12.16%
+38.87%
+335.54%
17,899 (+325)
7,348 (-10,307)
8,462 (+2,657)
54,043 (-14,270)
62,467 (+22,875)
11,294 (+1,270)
44,431 (+9,562)
77,444 (+935)
23,814 (+186)
7,304 (+2)
54,960 (+240)
7,628 (-1)
9,112 (+1,572)
2,135 (-744)
34,205 (+4)
63,159 (+2,847)
39,299 (-2,563)
65,822 (+2,987)
43,271 (-519)
43,171 (-6,583)
47,275 (+2,734)
151,703 (-752)
163,602 (-4,740)
117,968 (-5,187)
43,410 (-1,875)
12,979 (+2,261)
+1.85%
-58.38%
+45.77%
-20.89%
+57.78%
+12.67%
+27.42%
+1.22%
+0.79%
+0.03%
+0.44%
-0.01%
+20.85%
-25.84%
+0.01%
+4.72%
-6.12%
+4.75%
-1.19%
-13.23%
+6.14%
-0.49%
-2.82%
-4.21%
-4.14%
+21.10%
18,171 (+599)
3,238 (-14,423)
2,448 (0)
42,707 (-24,956)
65,748 (+35,306)
10,230 (0)
39,093 (0)
77,672 (0)
15,166 (+218)
7,301 (0)
56,300 (0)
7,630 (+4)
9,109 (+1,569)
781 (0)
34,233 (0)
64,715 (+32,639)
39,299 (+1,960)
70,108 (0)
52,969 (-204)
53,707 (-432)
38,981 (0)
140,178 (0)
157,810 (0)
108,668 (-966)
42,572 (-2,657)
12,831 (0)
+3.41%
-81.67%
0.00%
-36.88%
+115.98%
0.00%
0.00%
0.00%
+1.46%
0.00%
0.00%
+0.05%
+20.81%
0.00%
0.00%
+101.76%
+5.25%
0.00%
-0.38%
-0.80%
0.00%
0.00%
0.00%
-0.88%
-5.87%
0.00%
18,181 (+599)
18,238 (+577)
18,181 (+599)
105,485 (0)
84,406 (0)
13,201 (+511)
87,802 (+48,709)
92,477 (+14,805)
135,964 (-62,548)
7,323 (+11)
56,301 (0)
7,657 (+22)
10,689 (+3,149)
5,281 (0)
34,405 (+44)
110,800 (0)
49,656 (-5,827)
105,123 (0)
53,185 (0)
54,139 (0)
88,492 (0)
263,207 (0)
211,479 (0)
194,040 (0)
45,229 (-5,970)
15,949 (0)
+3.41%
+3.27%
+3.41%
0.00%
0.00%
+4.03%
+124.60%
+19.06%
-31.51%
+0.15%
0.00%
+0.29%
+41.76%
0.00%
+0.13%
0.00%
-10.50%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
0.00%
-11.66%
0.00%
26 (+14)
94 (+88)
107 (+23)
25 (+20)
4 (-10)
25 (+10)
9 (+4)
97 (+30)
48,368 (+1,820)
9 (+3)
469 (+87)
12 (+7)
6 (+4)
1,519 (+404)
6 (+2)
66 (+55)
2 (-512)
9 (+2)
16 (+9)
13 (+8)
5 (-2)
236 (+3)
100 (+6)
48 (+4)
3 (-6)
275 (-72)
MYieldFeeHarness 5,059,767 (-12)

@github-actions

github-actions Bot commented Nov 16, 2025

Copy link
Copy Markdown

LCOV of commit 6543760 during Forge Coverage #324

Summary coverage rate:
  lines......: 99.0% (682 of 689 lines)
  functions..: 97.8% (174 of 178 functions)
  branches...: no data found

Files changed coverage rate: n/a

@ith-harvey
ith-harvey marked this pull request as ready for review November 17, 2025 00:25
Comment thread script/ProposeTransferSwapFacilityOwner.s.sol Outdated
Comment thread script/ProposeTransferSwapFacilityOwner.s.sol Outdated
@toninorair
toninorair self-requested a review November 17, 2025 21:29
@ith-harvey
ith-harvey merged commit 657b84c into main Nov 17, 2025
3 checks passed
@ith-harvey
ith-harvey deleted the swap-facility-upgrade branch November 17, 2025 21:32
PierrickGT pushed a commit that referenced this pull request Dec 10, 2025
* added script for transfering swap facility timelock

* updated script after test run and included common off of main branch

* removed unused swap facility import

* updated script to hardcoded mainnet timelock

* fixed make file, removing run arg

* updated DEFAULT_ADMIN to match eng multisig per Toni's request
PierrickGT pushed a commit that referenced this pull request Dec 10, 2025
* added script for transfering swap facility timelock

* updated script after test run and included common off of main branch

* removed unused swap facility import

* updated script to hardcoded mainnet timelock

* fixed make file, removing run arg

* updated DEFAULT_ADMIN to match eng multisig per Toni's request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants