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

  1. Call approve method with the amount you want to deposit into strategy.

  2. 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

  1. Manually queue withdrawals with queueWithdrawal or undelegate

Methods

Approve

Write method approve can be found on token smart contracts.

Address: Token address.

Arguments:

  1. spender β€” Address of the strategy you want to use

  2. 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:

  1. strategy β€” Address of the strategy you want to use

  2. token β€” Token address.

  3. 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:

  1. operator β€” Operator address

  2. approverSignatureAndExpiry β€” Leave it empty. Type info.

  3. 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:

  1. 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:

  1. 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:

  1. withdrawal β€” structure from WithdrawalQueuedEvent

  2. tokens β€” array of tokens (optional)

  3. middlewareTimesIndex β€” empty

  4. 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:

  1. withdrawal β€” array of structures from WithdrawalQueuedEvent

  2. tokens β€” array of tokens (optional)

  3. middlewareTimesIndex β€” empty

  4. 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