Commit 93c8815
Pack Contract (#175)
* new pack content struct
* update pack interface
* mock pack implementation
* update pack interface with amountToDistributePerOpen
* foundry
* update Pack interface comments
* implementation up till openPack
* transfer pack contents into the contract on createPack
* handle native token transfer case
* up till compile
* costly implementation, but works
* cleanup
* move pack to a directory
* Add design doc
* feature imports
* update CurrencyTransferLib usage
* format table in doc
* created TempPack and ITempPack
* refactor TempPack and ITempPack
* PackInfo struct update
* createPack test for TempPack
* tests for TempPack
* fix issues in Pack; tests for Pack and TempPack
* benchmark test
* remove twFee from Pack
* remove unused imports from Pack
* cleanup Pack
* compile and run prettier
* remove twFee
* rename to nextTokenIdToMint
* cleanup TempPack
* avoid stack too deep error
* update TempPack in tests
* fix issue: getRewardUnits returning zero amount
* forge updates
* make createPack payable, to allow native tokens
* add asset role
* unit tests for TempPack
* fuzz tests for TempPack
* return rewardUnits from openPack in TempPack
* fuzz test for openPack
* separate function for random value generation
* Fix bug: calculate pack total supply correctly
* logs for tests
* handling native tokens for pack
* receive and withdraw functions for native token transfers
* fuzz tests, and test logs
* update currentTotalSupply in openPack
* comment-out Pack -- not deleting yet
* update tests
* run prettier
* update tests
* scenario test -- reentrancy
* perUnitAmounts -> numOfRewardUnits
* run prettier
* restrict receive() to native token wrapper
* rename TempPack to Pack; delete older Pack
* update tests
* pull from main and update initialze fn
* pkg update
* deployment script for Pack
* remove unused caller
* fix import path
Co-authored-by: Krishang Nadgauda <[email protected]>
Co-authored-by: Krishang Nadgauda <[email protected]>1 parent 2abaa42 commit 93c8815
File tree
22 files changed
+2264
-1520
lines changed- assets
- contracts
- feature
- interfaces
- pack
- docs
- scripts/deploy
- src/test
- utils
22 files changed
+2264
-1520
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
Loading
Loading
Loading
0 commit comments