---
# System prepended metadata

title: Preliminary Checks

---

## Day 1

### Preliminary Checks

- Using very old frameworks. Migrate to using new ones like Foundry or Hardhat. [Recommendation: Foundry]
- Checks, effects and interaction isn't followed. [Understand Reentrancy attacks](https://owasp.org/www-project-smart-contract-top-10/2023/en/src/SC01-reentrancy-attacks.html#:~:text=A%20reentrancy%20attack%20happens%20when,before%20it%20resolves%20its%20state.) [How does it work](https://hackernoon.com/hack-solidity-reentrancy-attack)
- No tests for smart contracts
- Need to understand data types and how they work. Why mapping `userNFTs` when user is only allowed to mint one NFT. [here](https://github.com/soderlinds/DSP/blob/main/contracts/contracts/NFTMembershipToken.sol#L15)
- Need to understand logs and events. How they work and why they are needed.

Challenge: 
- Optimization: [Find alternative to this state and remove `hasMinted` mapping somehow](https://github.com/soderlinds/DSP/blob/main/contracts/contracts/NFTMembershipToken.sol#L20)
- https://docs.soliditylang.org/en/v0.8.24/contracts.html#events
- https://cryptozombies.io/

## Day 2

- Implemented events very well.
- Tests are missing. (To be taken care of after few days)


Challenge:
- Learn from cryptozombies, as well as apply them. If already applied, document them explaining why you have used them and how they work.
- Start using Remix for till next few calls.
- Find out why you need to follow `checks-effects-interactions`. >$1 Billion
- Add new features to NFTMembershipToken
- Deploy the contracts on testnet
- Deploy the contract on Polygon/Optimism/Arbitrum mainnet.


## Day 3

- Added good comments, can be improved by using [NatSpec](https://docs.soliditylang.org/en/latest/natspec-format.html)
- Tried Remix, but gave up too early.
- Understood basic `checks-effects-interactions`, need to understand more.
- Focus on using Remix this whole week.

Challenge:
- Deploy more and more contract to testnet
- Deploy a contract on mainnet Polygon/Optimism/Arbitrum.
- Only use Remix
- Learn from cryptozombies, as well as apply them. If already applied, document them explaining why you have used them and how they work.

## Day 5

Challenge:
- Create a basic NFT contract, use ERC721A
- Public mint of NFTs at 0.01 ETH based on a boolean value, `isMintingActive`. If false, no mint allowed.
- Owner can set isMintingActive
- Owner can mint any arbitrary token ID (between 1 - 1000)
- Maximum tokens the contract can have is 1000.
- Start token ID should not be a default but 1

## Day 6

Challenge:
- Understand Signatures, and how other dApps leverages signatures.
- Explore 10 dApps (Safe, GMX, 1inch, Uniswap (USDC->ETH)) and compile your research (Fluid, focus on how frontend is implemented and how the interaction is happening).
- Casually read about RPC (non-web3).
- Casually read about RPC methods (https://docs.metamask.io/wallet/reference/json-rpc-api/)

## Day 7

Challenge:
- Study Safe Web repository: https://github.com/safe-global/safe-wallet-web/
- Study Uniswap Web Interface repository: https://github.com/Uniswap/interface/tree/main/apps/web
- Create a demo app that does EIP712 signature