Add ERC-20 token + escrow assignment (wk4)#6
Open
Jay989810 wants to merge 1 commit into
Open
Conversation
Implement JayToken (standard ERC-20 with custom errors) and JayEscrow (single-use buyer/seller escrow via approve + transferFrom) with their deploy scripts. Remove the unused Counter.s.sol scaffold so the folder builds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jay989810
marked this pull request as draft
July 16, 2026 07:27
Jay989810
marked this pull request as ready for review
July 16, 2026 07:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the week-4 assignment in
Tokens-wk4/Erc20-token/Assignments:src/JayToken.sol— a standard ERC-20 (name, symbol, decimals, transfer, approve, transferFrom) with custom errors and zero-address checks. Mints the initial supply to the deployer.src/JayEscrow.sol— a buyer locks tokens for a seller until a deadline. The buyer can release the funds to the seller, or refund themselves once the deadline passes. Each escrow has its own ID, so multiple users can use the same contract.Deployment scripts for both contracts.
Also removed the leftover
Counter.s.sol, which imported aCounter.solthat doesn’t exist and prevented the folder from building.Ran
forge fmtandforge build— both clean.