Restaking smart contracts reference
Instructions for manual restaking in Ditto AVS.
Getting strategy tokens
Acquire strategy tokens via swap in your wallet UI or in third-party service (e.g. Uniswap, Lido).
Swapping via wallet UI is not available for holesky testnet.
You need to use other means of obtaining tokens - manually wraping via smart contract or via provider side (e.g. https://stake.lido.fi/wrap)
Depositing into strategy
Call
approve
method with the amount you want to deposit into strategy.After successful approval call
depositIntoStrategy
method with the same amount to deposit tokens into strategy.
Delegate
Call the delegateTo
method providing desired operator.
You can only delegate to a single operator.
Undelegate
Call undelegate
method providing address of you wallet.
When undelegating all delegates assets will be queued to withdrawal.
Withdraw
Manually queue withdrawals with
queueWithdrawal
orundelegate
Get data from
WithdrawalQueued
events and pass it tocompleteQueuedWithdrawal
orcompleteQueuedWithdrawals
Methods
Approve
Write method approve
can be found on token smart contracts.
Address: Token address.
Arguments:
spender — Address of the strategy you want to use
amount — Amount of tokens to approve
Token address and strategy address to provide in input parameters can be found here.
Output: Success/failure of the call
Deposit into strategy
Write method depositIntoStrategy
can be found on Eigenlayer Strategy Manager smart contract.
Address: Strategy manager address. Select from here depending on the network you're using.
Arguments:
strategy — Address of the strategy you want to use
token — Token address.
amount — Amount of tokens you want to approve.
Token address and strategy address to provide in input parameters can be found here.
Output: Amount of tokens deposited into strategy.
Delegate
Write method delegateTo
can be found on Eigenlayer Delegation Manager smart contact.
Address: Delegation manager address. Select from here depending on the network you're using.
Arguments:
operator — Operator address
approverSignatureAndExpiry — Leave it empty. Type info.
approverSalt — Pass zero bytes
Output: Delegation status
Undelegate
Write method undelegate
can be found on Eigenlayer Delegation Manager smart contact.
Address: Delegation manager address. Select from here depending on the network you're using.
Arguments:
staker — Address of your wallet
Output: withdrawalRoots
array
Emits events: StakerUndelegated
, WithdrawalQueued
Queue withdrawal
Write method queueWithdrawals
can be found on on Eigenlayer Delegation Manager smart contact.
Address: Delegation manager address. Select from here depending on the network you're using.
Arguments:
withdrawals — array of
QueuedWithdrawalParams
structures
Output: withdrawalRoots
array
Emits events: WithdrawalQueued
Complete queued withdrawal
Write method completeQueuedWithdrawal
can be found on Eigenlayer Delegation manager smart contact.
Address: Delegation manager address. Select from here depending on the network you're using.
Arguments:
withdrawal — structure from
WithdrawalQueuedEvent
tokens — array of tokens (optional)
middlewareTimesIndex — empty
receiveAsTokens — boolean
Output: confirmation of withdrawal
Emits events: WithdrawalCompleted
Complete queued withdrawals
Write method completeQueuedWithdrawals
can be found on Eigenlayer Delegation manager smart contact.
Address: Delegation manager address. Select from here depending on the network you're using.
Arguments:
withdrawal — array of structures from
WithdrawalQueuedEvent
tokens — array of tokens (optional)
middlewareTimesIndex — empty
receiveAsTokens — boolean
Output: confirmation of multiple withdrawals
Emits events: WithdrawalCompleted
Eigenlater Emited Events
StakerUndelegated
WithdrawalQueued
WithdrawalCompleted
Eigenlayer Data Formats
SignatureWithExpiry
QueuedWithdrawalParams
Withdrawal
Eigenlayer Contracts
Mainnet
Strategy Manager —
0x858646372CC42E1A627fcE94aa7A7033e7CF075A
Delegation Manager —
0x39053D51B77DC0d36036Fc1fCc8Cb819df8Ef37A
Holesky
Strategy Manager —
0xdfb5f6ce42aaa7830e94ecfccad411bef4d4d5b6
Delegation Manager —
0xA44151489861Fe9e3055d95adC98FbD462B948e7
Strategies
Lido (stETH) strategy
Mainnet
Token address —
0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84
Strategy address —
0x93c4b944D05dfe6df7645A86cd2206016c51564D
Holesky
Token address —
0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034
Strategy address —
0x7D704507b76571a51d9caE8AdDAbBFd0ba0e63d3
wETH strategy
Mainnet
Token address —
0x94373a4919B3240D86eA41593D5eBa789FEF3848
Strategy address —
0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9
Holesky
Token address —
0x94373a4919B3240D86eA41593D5eBa789FEF3848
Strategy address —
0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9
Stader (ETHx) strategy
Mainnet
Token address —
0xA35b1B31Ce002FBF2058D22F30f95D405200A15b
Strategy address —
0x9d7eD45EE2E8FC5482fa2428f15C971e6369011d
Holesky
Token address —
0xB4F5fc289a778B80392b86fa70A7111E5bE0F859
Strategy address —
0x31B6F59e1627cEfC9fA174aD03859fC337666af7
Last updated