original code: https://github.com/DimensionDev/RedPacket/
anchor build
anchor test
** right now, withdraw test pass will fail, because time check. Maybe need to use bank rewrite withdraw test.
feature:
- red packet ID design (seeds = [red_packet.creator.key().as_ref(), red_packet.create_time.to_le_bytes().as_ref()])
- claim red packet with signature issued by frontend
- split red packet with random amount
- claim details record
- upgrade program
- add more test cases (in progress)
- bank run test (with time travel)
- cost report
- claimer can specify a recipient account instead of the claimer's account itself
- NFT red packet
https://github.com/solana-developers/developer-bootcamp-2024