1/5
## Finishing the Pool Contract We now have a rebase token pool created, so let's build it. We can run the following terminal command: ```bash forge build ``` We can see that we have an error. This is the problem with relying on Copilot too heavily! The first thing to look at is the path in the rebase token. Let's change the path to: ```javascript import { IRebaseToken } from "./interfaces/IRebaseToken.sol"; ``` We can now build again: ```bash forge build ``` And we see that we have the wrong number of arguments to the function call. Let's modify this function call to pass through the interest rate: ```javascript vm.expectPartialRevert(bytes4(IRebaseToken.getInterestRate.selector), rebaseToken.burn(user, 100, rebaseToken.getInterestRate())); ``` Let's build it again: ```bash forge build ``` We now have another error: `abi.decode` must be implicitly convertible to bytes memory or bytes calldata. We don't need to do any of that! We can literally just pass through the original sender from this struct: ```javascript uint256 userInterestRate = IRebaseToken(address(this)).token.getUserInterestRate(lockBurnInput.originalSender); ``` We can build again: ```bash forge build ``` And we see that we have a warning about an unused local variable. We are ready to go and build some tests!
A technical guide to finishing the pool contract in a Solidity smart contract project. The lesson covers how to finish building a smart contract pool, including how to use the proper file paths in the import statements, and how to properly pass arguments to the function when setting interest rates.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on March 11, 2025
Solidity Developer
Advanced FoundryDuration: 36min
Duration: 3h 06min
Duration: 5h 02min
Duration: 6h 02min
Duration: 2h 47min
Duration: 1h 23min
Duration: 4h 28min
Duration: 1h 19min
Duration: 1h 10min
Course Overview
About the course
Advanced smart contract development
How to develop a stablecoin
How to develop a DeFi protocol
How to develop a DAO
Advanced smart contracts testing
Fuzz testing
Manual verification
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
Security researcher
$49,999 - $120,000 (avg. salary)
Guest lecturers:
Juliette Chevalier
Lead Developer relations at Aragon
Nader Dabit
Director of developer relations at Avara
Ally Haire
Developer relations at Protocol Labs
Harrison
Founder at GasliteGG
Last updated on March 11, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar