faet: added erc20 and erc721 contracts and tests#11
Open
francoperez03 wants to merge 1 commit intomainfrom
Open
faet: added erc20 and erc721 contracts and tests#11francoperez03 wants to merge 1 commit intomainfrom
francoperez03 wants to merge 1 commit intomainfrom
Conversation
chescalante
suggested changes
Apr 8, 2025
Comment on lines
-19
to
+24
| # web3 | ||
| packages/web3/.dist | ||
| packages/web3/node_modules | ||
| packages/web3/.env | ||
| packages/web3/cache | ||
| packages/web3/artifacts | ||
| # contracts | ||
| packages/contracts/.dist | ||
| packages/contracts/node_modules | ||
| packages/contracts/.env | ||
| packages/contracts/cache | ||
| packages/contracts/artifacts |
There was a problem hiding this comment.
could we call the folder hardhat? because it's a bit confusing having contracts/contracts/**
There was a problem hiding this comment.
@chescalante @francoperez03 why we're renaming from web3 --> contracts in the first place ?
| import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; | ||
|
|
||
| contract MyToken is ERC20, ERC20Burnable, Ownable { | ||
| constructor(uint256 initialSupply) ERC20("MyToken", "MTK") Ownable(msg.sender) { |
There was a problem hiding this comment.
Suggested change
| constructor(uint256 initialSupply) ERC20("MyToken", "MTK") Ownable(msg.sender) { | |
| constructor(uint256 initialSupply, tokenName, tokenSymbol) ERC20(tokenName, tokenSymbol) Ownable(msg.sender) { |
could we make it a generic erc20?
| contract MyNFT is ERC721, Ownable { | ||
| uint256 private _nextTokenId; | ||
|
|
||
| constructor() ERC721("MyNFT", "MNFT") Ownable(msg.sender) {} |
There was a problem hiding this comment.
Suggested change
| constructor() ERC721("MyNFT", "MNFT") Ownable(msg.sender) {} | |
| constructor(tokenName, tokenSymbol) ERC721(tokenName, tokenSymbol) Ownable(msg.sender) {} |
could we make it a generic too?
| .object({ | ||
| NETWORK_TESTNET: z.string().transform((x) => x as Address), | ||
| NETWORK_MAINNET: z.string().transform((x) => x as Address), | ||
| NETWORK_MAINNET: z.string().transform((x) => x as Address).optional(), |
There was a problem hiding this comment.
Suggested change
| NETWORK_MAINNET: z.string().transform((x) => x as Address).optional(), | |
| NETWORK_MAINNET: z.string().transform((x) => x as Address).optional(), |
this should be required, also we can add a default value pointing to OPTIMISM or BASE. Same for testnet env variables.
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.
The following components have been completed:
erc20.sol)erc721.sol)MyTokenModule.tsMyNFTModule.ts