5/5
## Getting the Deposit Delay The protocol setting for deposit delay is stored inside a Rocket storage contract, which is called the RStorage contract. To retrieve the information, we'll need to call the storage contract, and pass in the key. ```solidity return rStorage.getUint(); ``` The key we need to pass can be found in the RocketTokenrETH contract, in the function beforeTokenTransfer. The key is in this line of code: ```solidity getUint(keccak256(abi.encodePacked(keccak256("dao.protocol.setting.network"),"network.reth.deposit.delay") ``` We can test our code against the test using the command: ```bash forge test --fork-url $FORK_URL --match-path test/exercise-swap-rocket-pool.sol --match-test test_getDepositDelay -vvv ``` The test file is located under exercise-swap-rocket-pool, and the function that we're going to execute to test the function getDepositDelay is called test_getDepositDelay. Our test passed.
A beginner's guide to building a Rocket Pool Swap Contract. This lesson covers how to set up a deposit delay for ETH deposits in a Rocket Pool swap contract and how to retrieve that deposit delay using a solidity function.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Rocket Pool rETH staking, yield mechanisms, trading options, and contract architecture
How to distribute rewards and calculate rETH/ETH exchange rate
How to acquire and redeem rETH
Integrating rETH into DeFi protocols like AAVE V3
How to how to create leveraged ETH positions using rETH
How to provide rETH as liquidity to Balancer and Aura
Getting the USD price of rETH using Rocket Pool NAV oracle
Re-staking with EigenLayer
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 28, 2025
Stay in the loop with the latest Rocket Pool updates and connect with over 5,000 developers in the community.
Duration: 4min
Duration: 48min
Duration: 57min
Duration: 30min
Duration: 7min
Duration: 23min
Duration: 6min
Course Overview
About the course
Rocket Pool rETH staking, yield mechanisms, trading options, and contract architecture
How to distribute rewards and calculate rETH/ETH exchange rate
How to acquire and redeem rETH
Integrating rETH into DeFi protocols like AAVE V3
How to how to create leveraged ETH positions using rETH
How to provide rETH as liquidity to Balancer and Aura
Getting the USD price of rETH using Rocket Pool NAV oracle
Re-staking with EigenLayer
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Blockchain Financial Analyst
$100,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on May 28, 2025