-
High - 100xp
-
Medium - 20xp
-
Low - 2xp
-
Starts: March 28, 2024 Noon UTC
-
Ends: April 04, 2024 Noon UTC
- nSLOC: 235
- Complexity Score: 193
This project allows users to buy a cute cat from our branches and mint NFT for buying a cat. The NFT will be used to track the cat info and all related data for a particular cat corresponding to their token ids.
Kitty Owner can also Bridge their NFT from one chain to another chain via Chainlink CCIP
.
The codebase is broken up into 2 contracts (In Scope):
KittyConnect.sol
KittyBridge.sol
This contract allows users to buy a cute cat from our branches and mint NFT for buying a cat. The NFT will be used to track the cat info and all related data for a particular cat corresponding to their token ids.
This contract allows users to bridge their Kitty NFT from one chain to another chain via Chainlink CCIP
.
- Cat Owner
- User who buy the cat from our branches and mint NFT for buying a cat.
- Shop Partner
- Shop partner provide services to the cat owner to buy cat.
- KittyConnect Owner
- Owner of the contract who can transfer the ownership of the contract to another address.
- git
- You'll know you did it right if you can run
git --version
and you see a response likegit version x.x.x
- You'll know you did it right if you can run
- foundry
- You'll know you did it right if you can run
forge --version
and you see a response likeforge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
- You'll know you did it right if you can run
git clone https://github.com/Cyfrin/2024-03-kitty-connect
cd 2024-03-kitty-connect
make
or
forge build
forge test
forge coverage
forge compile
A user is required to visit our shop partner to buy a cat. The shop partner will call the function from KittyConnect contract to mint NFT for buying a cat. (This NFT will track all the data related to the cat)
User can bridge Kitty NFT from one chain to another chain by calling this function from KittyConnect contract. This involves burning of the kitty NFT on the source chain and minting on the destination chain. Bridging is powered by chainlink CCIP.
Sometimes a user wants to transfer their cat to a new owner, this can be easily done by transferring the Kitty NFT to that desired owner. A user is first required to approve the kitty NFT to the new owner, and is then required to visit our shop partner to finally facilitate transfer the ownership of the cat to the new owner.
- there is one known bug while bridging the NFT to other chain, the previousOwners of the cat are not passed because they may cost a large amount of gas.