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

feat: symbiotic batch 3 #42

Merged
merged 5 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
85 changes: 85 additions & 0 deletions safe-batches/symbiotic-expansion-batch-3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"version": "1.0",
"chainId": "1",
"createdAt": 1739460440229,
"meta": {
"name": "Transactions Batch",
"description": "symbiotic-expansion-batch-3",
"txBuilderVersion": "1.10.0",
"createdFromSafeAddress": "0x9D89745fD63Af482ce93a9AdB8B0BbDbb98D3e06",
"createdFromOwnerAddress": "",
"checksum": "0x93f6cf398b44d20d25eccae61496887adcf8ec1f1fcc9b84fc2e909fa7a71d73"
},
"transactions": [
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000004e0554959a631b3d3938ffc158e0a7b2124af9c547e7ef24000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000004e0554959a631b3d3938ffc158e0a7b2124af9c5f3fef3a3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000005198cb44d7b2e993ebdda9cad3b9a0eaa32769d247e7ef24000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000005198cb44d7b2e993ebdda9cad3b9a0eaa32769d2f3fef3a3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c00000000000000000000000065b560d887c010c4993c8f8b36e595c171d69d6347e7ef24000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c00000000000000000000000065b560d887c010c4993c8f8b36e595c171d69d63f3fef3a3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c000000000000000000000000ac3e018457b222d93114458476f3e3416abbe38fa9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c000000000000000000000000ac3e018457b222d93114458476f3e3416abbe38f095ea7b3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000005198cb44d7b2e993ebdda9cad3b9a0eaa32769d2a9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000005198cb44d7b2e993ebdda9cad3b9a0eaa32769d2095ea7b3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c00000000000000000000000065b560d887c010c4993c8f8b36e595c171d69d63a9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c00000000000000000000000065b560d887c010c4993c8f8b36e595c171d69d63095ea7b3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c00000000000000000000000021dbba985eea6ba7f27534a72ccb292eba1d2c7ca9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c00000000000000000000000021dbba985eea6ba7f27534a72ccb292eba1d2c7c095ea7b3000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
}
]
}
93 changes: 92 additions & 1 deletion script/RumpelConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ library RumpelConfig {
address public constant MAINNET_SYMBIOTIC_SWETH_COLLATERAL = 0x38B86004842D3FA4596f0b7A0b53DE90745Ab654;
address public constant MAINNET_SYMBIOTIC_LSETH_COLLATERAL = 0xB09A50AcFFF7D12B7d18adeF3D1027bC149Bad1c;
address public constant MAINNET_SYMBIOTIC_OSETH_COLLATERAL = 0x52cB8A621610Cc3cCf498A1981A8ae7AD6B8AB2a;
address public constant MAINNET_SYMBIOTIC_MEV_CAPITAL_WSTETH_COLLATERAL = 0x4e0554959A631B3D3938ffC158e0a7b2124aF9c5;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to https://github.com/sense-finance/rumpel-wallet/pull/41/files#r1953753194, this contract doesn't seem to have a transfer function. are you seeing the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - will review and update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

address public constant MAINNET_SYMBIOTIC_SFRXETH_COLLATERAL = 0x5198CB44D7B2E993ebDDa9cAd3b9a0eAa32769D2;
address public constant MAINNET_SYMBIOTIC_GUANTLET_RESTAKED_SWETH_COLLATERAL =
0x65B560d887c010c4993C8F8B36E595C171d69D63;
address public constant MAINNET_SYMBIOTIC_ETHFI_COLLATERAL = 0x21DbBA985eEA6ba7F27534a72CCB292eBA1D2c7c;
address public constant MAINNET_SYMBIOTIC_COLLATERAL_MIGRATOR = 0x8F152FEAA99eb6656F902E94BD4E7bCf563D4A43;
address public constant MAINNET_KARAK_VAULT_SUPERVISOR = 0x54e44DbB92dBA848ACe27F44c0CB4268981eF1CC;
address public constant MAINNET_KARAK_DELEGATION_SUPERVISOR = 0xAfa904152E04aBFf56701223118Be2832A4449E0;
Expand Down Expand Up @@ -86,6 +91,7 @@ library RumpelConfig {
address public constant MAINNET_SWETH = 0xf951E335afb289353dc249e82926178EaC7DEd78;
address public constant MAINNET_LSETH = 0x8c1BEd5b9a0928467c9B1341Da1D7BD5e10b6549;
address public constant MAINNET_OSETH = 0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38;
address public constant MAINNET_SFRX = 0xac3E018457B222d93114458476f3E3416Abbe38F;

address public constant MAINNET_RE7LRT = 0x84631c0d0081FDe56DeB72F6DE77abBbF6A9f93a;
address public constant MAINNET_RE7RWBTC = 0x7F43fDe12A40dE708d908Fb3b9BFB8540d9Ce444;
Expand Down Expand Up @@ -311,6 +317,8 @@ library RumpelConfig {
return getSymbioticExpansionBatch1ProtocolGuardConfigs();
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-2"))) {
return getSymbioticExpansionBatch2ProtocolGuardConfigs();
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-3"))) {
return getSymbioticExpansionBatch3ProtocolGuardConfigs();
} else if (tagHash == keccak256(bytes("add-mellow-vaults"))) {
return getMellowVaultsGuardProtocolConfigs();
}
Expand Down Expand Up @@ -375,6 +383,8 @@ library RumpelConfig {
return getSymbioticExpansionBatch1TokenGuardConfigs();
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-2"))) {
return getSymbioticExpansionBatch2TokenGuardConfigs();
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-3"))) {
return getSymbioticExpansionBatch3TokenGuardConfigs();
} else if (tagHash == keccak256(bytes("add-mellow-vaults"))) {
return getMellowVaultsGuardTokenConfigs();
}
Expand Down Expand Up @@ -436,10 +446,11 @@ library RumpelConfig {
return new TokenModuleConfig[](0);
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-2"))) {
return new TokenModuleConfig[](0);
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-3"))) {
return new TokenModuleConfig[](0);
} else if (tagHash == keccak256(bytes("add-mellow-vaults"))) {
return new TokenModuleConfig[](0);
}

revert("Unsupported tag");
}

Expand Down Expand Up @@ -494,6 +505,8 @@ library RumpelConfig {
return new ProtocolModuleConfig[](0);
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-2"))) {
return new ProtocolModuleConfig[](0);
} else if (tagHash == keccak256(bytes("symbiotic-expansion-batch-3"))) {
return new ProtocolModuleConfig[](0);
} else if (tagHash == keccak256(bytes("add-mellow-vaults"))) {
return new ProtocolModuleConfig[](0);
}
Expand Down Expand Up @@ -1826,6 +1839,84 @@ library RumpelConfig {

return configs;
}

function getSymbioticExpansionBatch3ProtocolGuardConfigs() internal pure returns (ProtocolGuardConfig[] memory) {
ProtocolGuardConfig[] memory configs = new ProtocolGuardConfig[](3);

// ETHFI skipped as reward token - only transfer enabled

configs[0] = ProtocolGuardConfig({
target: MAINNET_SYMBIOTIC_MEV_CAPITAL_WSTETH_COLLATERAL,
selectorStates: new SelectorState[](2)
});
configs[0].selectorStates[0] = SelectorState({
selector: ISymbioticDefaultCollateral.deposit.selector,
state: RumpelGuard.AllowListState.ON
});
configs[0].selectorStates[1] = SelectorState({
selector: ISymbioticDefaultCollateral.withdraw.selector,
state: RumpelGuard.AllowListState.ON
});

configs[1] =
ProtocolGuardConfig({target: MAINNET_SYMBIOTIC_SFRXETH_COLLATERAL, selectorStates: new SelectorState[](2)});
configs[1].selectorStates[0] = SelectorState({
selector: ISymbioticDefaultCollateral.deposit.selector,
state: RumpelGuard.AllowListState.ON
});
configs[1].selectorStates[1] = SelectorState({
selector: ISymbioticDefaultCollateral.withdraw.selector,
state: RumpelGuard.AllowListState.ON
});

configs[2] = ProtocolGuardConfig({
target: MAINNET_SYMBIOTIC_GUANTLET_RESTAKED_SWETH_COLLATERAL,
selectorStates: new SelectorState[](2)
});
configs[2].selectorStates[0] = SelectorState({
selector: ISymbioticDefaultCollateral.deposit.selector,
state: RumpelGuard.AllowListState.ON
});
configs[2].selectorStates[1] = SelectorState({
selector: ISymbioticDefaultCollateral.withdraw.selector,
state: RumpelGuard.AllowListState.ON
});

return configs;
}

function getSymbioticExpansionBatch3TokenGuardConfigs() internal pure returns (TokenGuardConfig[] memory) {
TokenGuardConfig[] memory configs = new TokenGuardConfig[](4);

// underlying
// wstETH already added
// swETH added in symbiotic-batch-2
// ETHFI skipped as reward token
configs[0] = TokenGuardConfig({
token: MAINNET_SFRX,
transferAllowState: RumpelGuard.AllowListState.ON,
approveAllowState: RumpelGuard.AllowListState.ON
});

// collateral tokens
configs[1] = TokenGuardConfig({
token: MAINNET_SYMBIOTIC_SFRXETH_COLLATERAL,
transferAllowState: RumpelGuard.AllowListState.ON,
approveAllowState: RumpelGuard.AllowListState.ON
});
configs[2] = TokenGuardConfig({
token: MAINNET_SYMBIOTIC_GUANTLET_RESTAKED_SWETH_COLLATERAL,
transferAllowState: RumpelGuard.AllowListState.ON,
approveAllowState: RumpelGuard.AllowListState.ON
});
configs[3] = TokenGuardConfig({
token: MAINNET_SYMBIOTIC_ETHFI_COLLATERAL,
transferAllowState: RumpelGuard.AllowListState.ON,
approveAllowState: RumpelGuard.AllowListState.ON
});

return configs;
}
}

interface IMorphoBundler {
Expand Down