Skip to content

Commit c26ff15

Browse files
committed
refactor: MetaSwap adapter v2, Safe delegation signing, Linea deploys
- Rework DelegationMetaSwapAdapter for direct vault→adapter delegations, IDeleGatorModule.safe() recipient resolution, and pair policy checks - Add SafeDelegationSigner plus scripts: SignDelegationWithSafe, SignPeriodDelegationsWithSafe, SignMetaSwapAdapterDelegationWithSafe (RedeemerEnforcer-only path for adapter use on Linea) - Update adapter tests, deploy script, verification helpers, changelog; refresh .env.example and Linea broadcast artifacts
1 parent 15a8a6a commit c26ff15

17 files changed

Lines changed: 3182 additions & 599 deletions

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ META_SWAP_ADAPTER_OWNER_ADDRESS=
88
METASWAP_ADDRESS=
99
SWAPS_API_SIGNER_ADDRESS=
1010

11+
# DelegationMetaSwapAdapter post-deploy configuration
12+
# Most configuration (allowed tokensTo, slippage/priceImpact caps) is HARDCODED in
13+
# script/DeployDelegationMetaSwapAdapter.s.sol -- edit there before deploying.
14+
# The script auto-configures only when the broadcaster is also META_SWAP_ADAPTER_OWNER_ADDRESS.
15+
#
16+
# Addresses authorized to invoke swapByDelegation (typically backend operators / relayers).
17+
# Comma-separated. May be empty.
18+
ALLOWED_CALLERS=0x8bfeb19507eec4c597538e0444253501166081de
19+
1120

1221
# Required for verifying contracts
1322
ETHERSCAN_API_KEY=

broadcast/DeployDelegationMetaSwapAdapter.s.sol/59144/run-1776907769831.json

Lines changed: 336 additions & 0 deletions
Large diffs are not rendered by default.

broadcast/DeployDelegationMetaSwapAdapter.s.sol/59144/run-latest.json

Lines changed: 257 additions & 46 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": null,
5+
"transactionType": "CREATE2",
6+
"contractName": "SigningUtilsLib",
7+
"contractAddress": "0x61ebf98870af20fe8ba07ae720ab82e09a208608",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"from": "0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38",
12+
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
13+
"gas": "0x98ace",
14+
"input": "0x000000000000000000000000000000000000000000000000000000000000000061073661003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c80639bc2f98114610050578063a985bdde14610079578063afb8a5c41461008c575b600080fd5b61006361005e366004610446565b61009f565b6040516100709190610510565b60405180910390f35b610063610087366004610543565b61025e565b61006361009a366004610565565b610327565b60606000807f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d60001c6001600160a01b03166383211b40866002876040516020016100ec91815260200190565b60408051601f198184030181529082905261010691610611565b602060405180830381855afa158015610123573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610146919061062d565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016040805180830381865afa158015610186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101aa9190610646565b90925090506101d760027bffffffff00000000000000004319055258e8617b0c46353d039cdaae1961066a565b81111561020857610205817bffffffff00000000000000004319055258e8617b0c46353d039cdaae1961068c565b90505b856040516020016102199190610611565b60408051601f19818403018152828252805160209182012090830152810183905260608101829052608001604051602081830303815290604052925050509392505050565b6040516338d07aa960e21b8152600481018390526024810182905260609060009081908190737109709ecfa91a80626ff3989d68f67f5b1dd12d9063e341eaa490604401606060405180830381865afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e391906106ad565b6040805160208101939093528281019190915260f89290921b6001600160f81b03191660608201528151604181830301815260619091019091529695505050505050565b606060005b835181101561037a576000848281518110610349576103496106ea565b60200260200101519050600061035f828661025e565b905061036b8482610381565b9350505080600101905061032c565b5092915050565b6060806040519050835180825260208201818101602087015b818310156103b257805183526020928301920161039a565b50855184518101855292509050808201602086015b818310156103df5780518352602092830192016103c7565b508651929092011591909101601f01601f19166040525090505b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561043e5761043e6103ff565b604052919050565b60008060006060848603121561045b57600080fd5b833567ffffffffffffffff8082111561047357600080fd5b818601915086601f83011261048757600080fd5b813560208282111561049b5761049b6103ff565b6104ad601f8301601f19168201610415565b925081835288818386010111156104c357600080fd5b818185018285013760009183018101919091529097908601359650604090950135949350505050565b60005b838110156105075781810151838201526020016104ef565b50506000910152565b602081526000825180602084015261052f8160408501602087016104ec565b601f01601f19169190910160400192915050565b6000806040838503121561055657600080fd5b50508035926020909101359150565b6000806040838503121561057857600080fd5b823567ffffffffffffffff8082111561059057600080fd5b818501915085601f8301126105a457600080fd5b81356020828211156105b8576105b86103ff565b8160051b92506105c9818401610415565b82815292840181019281810190898511156105e357600080fd5b948201945b84861015610601578535825294820194908201906105e8565b9997909101359750505050505050565b600082516106238184602087016104ec565b9190910192915050565b60006020828403121561063f57600080fd5b5051919050565b6000806040838503121561065957600080fd5b505080516020909101519092909150565b60008261068757634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103f957634e487b7160e01b600052601160045260246000fd5b6000806000606084860312156106c257600080fd5b835160ff811681146106d357600080fd5b602085015160409095015190969495509392505050565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220abf611e4a4cdc4d31e13fd25fcac3137a5d217dedcc37a1882ac939b2b3cef2364736f6c63430008170033",
15+
"nonce": "0x0",
16+
"chainId": "0xe708"
17+
},
18+
"additionalContracts": [],
19+
"isFixedGasLimit": false
20+
}
21+
],
22+
"receipts": [],
23+
"libraries": [
24+
"test/utils/SigningUtilsLib.t.sol:SigningUtilsLib:0x61EBf98870af20fE8BA07AE720aB82e09A208608"
25+
],
26+
"pending": [],
27+
"returns": {},
28+
"timestamp": 1776981261954,
29+
"chain": 59144,
30+
"commit": "15a8a6a"
31+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"transactions": [
3+
{
4+
"hash": null,
5+
"transactionType": "CREATE2",
6+
"contractName": "SigningUtilsLib",
7+
"contractAddress": "0x61ebf98870af20fe8ba07ae720ab82e09a208608",
8+
"function": null,
9+
"arguments": null,
10+
"transaction": {
11+
"from": "0x1804c8ab1f12e6bbf3894d4083f33e07309d1f38",
12+
"to": "0x4e59b44847b379578588920ca78fbf26c0b4956c",
13+
"gas": "0x98ace",
14+
"input": "0x000000000000000000000000000000000000000000000000000000000000000061073661003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c80639bc2f98114610050578063a985bdde14610079578063afb8a5c41461008c575b600080fd5b61006361005e366004610446565b61009f565b6040516100709190610510565b60405180910390f35b610063610087366004610543565b61025e565b61006361009a366004610565565b610327565b60606000807f885cb69240a935d632d79c317109709ecfa91a80626ff3989d68f67f5b1dd12d60001c6001600160a01b03166383211b40866002876040516020016100ec91815260200190565b60408051601f198184030181529082905261010691610611565b602060405180830381855afa158015610123573d6000803e3d6000fd5b5050506040513d601f19601f82011682018060405250810190610146919061062d565b6040516001600160e01b031960e085901b168152600481019290925260248201526044016040805180830381865afa158015610186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101aa9190610646565b90925090506101d760027bffffffff00000000000000004319055258e8617b0c46353d039cdaae1961066a565b81111561020857610205817bffffffff00000000000000004319055258e8617b0c46353d039cdaae1961068c565b90505b856040516020016102199190610611565b60408051601f19818403018152828252805160209182012090830152810183905260608101829052608001604051602081830303815290604052925050509392505050565b6040516338d07aa960e21b8152600481018390526024810182905260609060009081908190737109709ecfa91a80626ff3989d68f67f5b1dd12d9063e341eaa490604401606060405180830381865afa1580156102bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e391906106ad565b6040805160208101939093528281019190915260f89290921b6001600160f81b03191660608201528151604181830301815260619091019091529695505050505050565b606060005b835181101561037a576000848281518110610349576103496106ea565b60200260200101519050600061035f828661025e565b905061036b8482610381565b9350505080600101905061032c565b5092915050565b6060806040519050835180825260208201818101602087015b818310156103b257805183526020928301920161039a565b50855184518101855292509050808201602086015b818310156103df5780518352602092830192016103c7565b508651929092011591909101601f01601f19166040525090505b92915050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561043e5761043e6103ff565b604052919050565b60008060006060848603121561045b57600080fd5b833567ffffffffffffffff8082111561047357600080fd5b818601915086601f83011261048757600080fd5b813560208282111561049b5761049b6103ff565b6104ad601f8301601f19168201610415565b925081835288818386010111156104c357600080fd5b818185018285013760009183018101919091529097908601359650604090950135949350505050565b60005b838110156105075781810151838201526020016104ef565b50506000910152565b602081526000825180602084015261052f8160408501602087016104ec565b601f01601f19169190910160400192915050565b6000806040838503121561055657600080fd5b50508035926020909101359150565b6000806040838503121561057857600080fd5b823567ffffffffffffffff8082111561059057600080fd5b818501915085601f8301126105a457600080fd5b81356020828211156105b8576105b86103ff565b8160051b92506105c9818401610415565b82815292840181019281810190898511156105e357600080fd5b948201945b84861015610601578535825294820194908201906105e8565b9997909101359750505050505050565b600082516106238184602087016104ec565b9190910192915050565b60006020828403121561063f57600080fd5b5051919050565b6000806040838503121561065957600080fd5b505080516020909101519092909150565b60008261068757634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156103f957634e487b7160e01b600052601160045260246000fd5b6000806000606084860312156106c257600080fd5b835160ff811681146106d357600080fd5b602085015160409095015190969495509392505050565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220abf611e4a4cdc4d31e13fd25fcac3137a5d217dedcc37a1882ac939b2b3cef2364736f6c63430008170033",
15+
"nonce": "0x0",
16+
"chainId": "0xe708"
17+
},
18+
"additionalContracts": [],
19+
"isFixedGasLimit": false
20+
}
21+
],
22+
"receipts": [],
23+
"libraries": [
24+
"test/utils/SigningUtilsLib.t.sol:SigningUtilsLib:0x61EBf98870af20fE8BA07AE720aB82e09A208608"
25+
],
26+
"pending": [],
27+
"returns": {},
28+
"timestamp": 1776981261954,
29+
"chain": 59144,
30+
"commit": "15a8a6a"
31+
}

0 commit comments

Comments
 (0)