Releases: peeramid-labs/contracts
v0.10.2
v0.10.1
Patch Changes
- #96
c582421d2e4672f15e768d1a8293d42e72c5e0f9
Thanks @peersky! - improved create game playbooks
v0.10.0
Minor Changes
-
#82
c53987d3423287f11af3e41e5f83fe1a13fa9f48
Thanks @peersky! - # Changeset for branch 64-principal-game-cost-time-parametersSummary
This branch introduces significant changes to game cost and time parameters, payment handling, and rank token mechanics, along with several code improvements and bug fixes.
Changes
Core Game Mechanics
LibRankify.sol
:- Introduced principal game cost calculation based on game time
- Added minimum game time validation and constraints
- Implemented 90/10 payment split: 90% burned, 10% to DAO
- Removed payment refunds and game cancellation payments
- Simplified rank token rewards to only top player
- Added validation for turn count and game time parameters
Libraries
LibTBG.sol
:- Added
startedAt
timestamp for minimum game time tracking - Renamed
getGameSettings()
togetSettings(uint256 gameId)
for better clarity - Updated storage access patterns for overtime functionality
- Simplified tie detection logic to only consider top 2 players
- Fixed storage slot access patterns
- Added
Tokens
DistributableGovernanceERC20.sol
:- Updated Solidity version from 0.8.20 to 0.8.28
RankToken.sol
:- Updated Solidity version from ^0.8.20 to =0.8.28
- Added IERC165 import
- Implemented burn function with ERC7746C middleware
Vendor
- Renamed
DiamondCloneable.sol
toDiamondClonable.sol
:- Fixed typo in error name from 'fucntionDoesNotExist' to 'functionDoesNotExist'
DiamondLoupeFacet.sol
:- Updated Solidity version to ^0.8.28
LibDiamond.sol
:- Added DuplicateSignature error definition
Removed Files
- Deleted
test/DNSFacet.ts
- Removed multipass sources:
src/facets/DNSFacet.sol
src/initializers/MultipassInit.sol
src/libraries/LibMultipass.sol
src/interfaces/IMultipass.sol
Mocks
RankifyInstanceEventMock.sol
:- Fixed typo in parameter name from 'proposerIndicies' to 'proposerIndices'
Breaking Changes
- Storage layout changes in LibTBG require careful migration
- Payment handling completely reworked:
- Removed refunds functionality
- Implemented burn mechanism for 90% of payments
- Added DAO benefit for 10% of payments
- Rank token rewards simplified to only top player
- Solidity version updates may require dependency updates
- Renamed Diamond contract file requires build script updates
- Removed all multipass functionality
Migration Guide
- Update build scripts to reference new DiamondClonable filename
- Verify storage layout compatibility after LibTBG changes
- Update dependencies to support Solidity 0.8.28
- Remove any references to multipass functionality
- Update payment handling code to work with new burn mechanism
- Adjust rank token distribution logic for single winner
- Ensure game time parameters meet new constraints
-
#57
5360ba4fbc5029dc572b78fb330a69a6df903826
Thanks @peersky! - eslint major verison change -
#50
80e2198289cf6fafae910d5a4f1d3442afabbbfb
Thanks @peersky! - Migration to v5 -
#48
d449bb2174c3959447d717bb0d0d64f617467a45
Thanks @peersky! - changed documentation generation system to be more readable and per file separated -
#86
5a4493123798682b7cbd3eeddf277dc11cd023da
Thanks @peersky! - added playbooks for adding distribution and creating subject, removed old multipass playbook -
#61
db186f717e1babebf6c1653afb7862d2120e545e
Thanks @peersky! - Updated readme -
#53
999e9339e318723137ddc2f9d640c54f157e67b9
Thanks @peersky! - added playbook functionality to execute state emulation -
#66
40e4f88c1b27d2d1e3c4f915337779f8cfb0ed35
Thanks @peersky! - moved eds as dependency -
#50
80e2198289cf6fafae910d5a4f1d3442afabbbfb
Thanks @peersky! - Migrated to oz contracts v5 -
#55
73ea44f3e83cd3eab3d8f9db1a605606cfcfed21
Thanks @peersky! - generic diamond factory implementation via Ethereum Distribution System -
#62
0c4f23cca04fa78564877cbb971ade0a96603314
Thanks @peersky! - ## Addition of Ethereum Distribution System (EDS)- Feature: Integrated the Ethereum Distribution System (EDS) for distributing Rankify contracts.
- Description: Rankify contracts are now distributed via the Ethereum Distribution System, enhancing the efficiency and security of the distribution process.
Redesign of Contracts
- Feature: Redesigned contracts to work seamlessly as part of the Ethereum Distribution System.
- Description: The contracts have been restructured and optimized to ensure compatibility and smooth operation within the EDS framework. This redesign includes:
- Improved contract architecture for better integration with EDS.
- Enhanced security measures to protect against potential vulnerabilities.
- Optimized performance to handle the distribution process more efficiently.
Impact
- Users:
- Can create new subjects that are called Meritocratic Autonomous Organizations (MAOs).
- Will benefit from a more secure and efficient distribution process.
- Developers: Developers will need to familiarize themselves with the new contract architecture and EDS integration.
- Operations: The distribution process will be streamlined, reducing the potential for errors and improving overall system reliability.
Next Steps
- Documentation: Update the documentation to include details on the new EDS integration and contract redesign.
- Testing: Conduct thorough testing to ensure the new system operates as expected.
- Deployment: Plan and execute the deployment of the updated contracts and distribution system.
-
#84
26bcabd15ced84405dc20009b89edd572bbf0128
Thanks @peersky! - # Changeset SummaryOverview
Added ability to end turns if there are inactive players without waiting for their move.
Changes
ArguableVotingTournament.sol
- Increased the size of
RankifyInstanceMainFacetSelectors
from 27 to 28. - Added a new function selector
RankifyInstanceMainFacet.isActive.selector
.
RankifyInstanceMainFacet.sol
- Added a new function
isActive
which takes agameId
and aplayer
address and returns a boolean indicating if the game is active for the player.
LibQuadraticVoting.sol
- Changed the parameter name from
voterVoted
toisActive
in thecomputeScoresByVPIndex
function. - Moved the initialization of
notVotedGivesEveryone
to useq.maxQuadraticPoints
. - Updated the condition to check
!isActive[vi]
instead of!voterVoted[vi]
.
LibTurnBasedGame.sol
- Added a new
isActive
mapping to track active players. - Introduced
numActivePlayers
to count the number of active players. - Updated the
resetGame
function to initializeisActive
tofalse
for all players and resetnumActivePlayers
. - Modified
addPlayer
to initializeisActive
tofalse
for new participants. - Enhanced
canEndTurnEarly
to check if all active players have made their move before allowing an early turn end. - Removed out the
_clearCurrentMoves
function - Updated the
startGame
function to set all players as active initially. - Modified
recordMove
to mark a player as active when they make a move and incrementnumActivePlayers
.
Summary of Changes
- Functionality Enhancements: Added a new
isActive
...
- Increased the size of