Skip to content

Commit

Permalink
feat: add obol claiming to allowlist
Browse files Browse the repository at this point in the history
  • Loading branch information
jparklev committed Mar 7, 2025
1 parent 350e1ac commit e9ef69d
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
25 changes: 25 additions & 0 deletions safe-batches/obol-claiming.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version": "1.0",
"chainId": "1",
"createdAt": 1741379312894,
"meta": {
"name": "Transactions Batch",
"description": "obol-claiming",
"txBuilderVersion": "1.10.0",
"createdFromSafeAddress": "0x9D89745fD63Af482ce93a9AdB8B0BbDbb98D3e06",
"createdFromOwnerAddress": "",
"checksum": "0x22a34fbc8fbe2add329e8574ae9c67de1f492ffd9e6c172ad8257af5733365a2"
},
"transactions": [
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c000000000000000000000000efd2247fcc3c7aa1fcbe1d2b81e6d0164583eea34a3067b9000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
},
{
"to": "0x9000fef2846a5253fd2c6ed5241de0fddb404302",
"value": "0x0",
"data": "0x5534fa0c0000000000000000000000000b010000b7624eb9b3dfbc279673c76e9d29d5f7a9059cbb000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001"
}
]
}
50 changes: 50 additions & 0 deletions script/RumpelConfig.sol
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ library RumpelConfig {

// Additional Reward Assets
address public constant MAINNET_LRT2 = 0x8F08B70456eb22f6109F57b8fafE862ED28E6040;
address public constant MAINNET_OBOL_CLAIM = 0xEfd2247fcC3C7aA1FCbE1d2b81e6d0164583eeA3;
address public constant MAINNET_OBOL = 0x0B010000b7624eb9B3DfBC279673C76E9D29D5F7;

function updateGuardAllowlist(RumpelGuard rumpelGuard, string memory tag) internal {
setupGuardProtocols(rumpelGuard, tag);
Expand Down Expand Up @@ -360,6 +362,8 @@ library RumpelConfig {
return getAdditionalMellowVaultsGuardProtocolConfigs();
} else if (tagHash == keccak256(bytes("fluid-loop-usde-smart-vaults"))) {
return getFluidLoopUSDeSmartVaultsConfigs();
} else if (tagHash == keccak256(bytes("obol-claiming"))) {
return getOBOLProtocolConfigs();
}

revert("Unsupported tag");
Expand Down Expand Up @@ -432,6 +436,8 @@ library RumpelConfig {
return getAdditionalMellowVaultsGuardTokenConfigs();
} else if (tagHash == keccak256(bytes("fluid-loop-usde-smart-vaults"))) {
return getFluidLoopUSDeSmartVaultsTokenConfigs();
} else if (tagHash == keccak256(bytes("obol-claiming"))) {
return getOBOLTokenConfigs();
}

revert("Unsupported tag");
Expand Down Expand Up @@ -501,6 +507,8 @@ library RumpelConfig {
return new TokenModuleConfig[](0);
} else if (tagHash == keccak256(bytes("fluid-loop-usde-smart-vaults"))) {
return new TokenModuleConfig[](0);
} else if (tagHash == keccak256(bytes("obol-claiming"))) {
return new TokenModuleConfig[](0);
}

revert("Unsupported tag");
Expand Down Expand Up @@ -567,6 +575,8 @@ library RumpelConfig {
return new ProtocolModuleConfig[](0);
} else if (tagHash == keccak256(bytes("fluid-loop-usde-smart-vaults"))) {
return new ProtocolModuleConfig[](0);
} else if (tagHash == keccak256(bytes("obol-claiming"))) {
return new ProtocolModuleConfig[](0);
}

revert("Unsupported tag");
Expand Down Expand Up @@ -2219,6 +2229,28 @@ library RumpelConfig {

return configs;
}

function getOBOLTokenConfigs() internal pure returns (TokenGuardConfig[] memory) {
TokenGuardConfig[] memory configs = new TokenGuardConfig[](1);

configs[0] = TokenGuardConfig({
token: MAINNET_OBOL,
transferAllowState: RumpelGuard.AllowListState.ON,
approveAllowState: RumpelGuard.AllowListState.OFF
});

return configs;
}

function getOBOLProtocolConfigs() internal pure returns (ProtocolGuardConfig[] memory) {
ProtocolGuardConfig[] memory configs = new ProtocolGuardConfig[](1);

configs[0] = ProtocolGuardConfig({target: MAINNET_OBOL_CLAIM, selectorStates: new SelectorState[](1)});
configs[0].selectorStates[0] =
SelectorState({selector: IOBOLClaim.claimAndDelegate.selector, state: RumpelGuard.AllowListState.ON});

return configs;
}
}

interface IMorphoBundler {
Expand Down Expand Up @@ -2342,6 +2374,24 @@ interface IFluidVaultFactory_ {
function safeTransferFrom(address from_, address to_, uint256 id_) external;
}

interface IOBOLClaim {
struct SignatureParams {
uint256 nonce;
uint256 expiry;
uint8 v;
bytes32 r;
bytes32 s;
}

function claimAndDelegate(
bytes16 campaignId,
bytes32[] memory proof,
uint256 claimAmount,
address delegatee,
SignatureParams memory delegationSignature
) external payable;
}

// @dev actually a function in ActionMiscV3 called through the RouterProxy
contract IPendleRouterV4 {
struct RedeemYtIncomeToTokenStruct {
Expand Down

0 comments on commit e9ef69d

Please sign in to comment.