Releases: animocabrands/ethereum-contracts-nft_staking
Releases · animocabrands/ethereum-contracts-nft_staking
v4.0.0: Version 4.0.0 (#13)
New features
NftStakingV2.sol
:- added
batchUnstakeNfts()
function - internal hook functions
_onStake
and_onUnstake
. - added
withdrawLostCycleRewards
for an admin to withdraw the rewards for a past cycle where there was no stake. - new events
NftsBatchStaked
andNftsBatchUnstaked
emitted during batch operations instead of the single versions. - Batch functions throw on an empty tokens list.
- Optimised implementation of batch staking.
- GSN compatibility.
- added
Improvements
- Dependencies updated to
@animoca/[email protected]
and@animoca/[email protected]
.
v3.0.4: Version 3.0.4 (#12)
Improvements
- Optimised the assignment of
tokenInfos
in_stakeNFT
.
v3.0.3: Version 3.0.3 (#11)
Improvements
- Calibrated the re-stake exploit fix to only apply during the same cycle after unstaking.
- Improved the comments.
v3.0.2: Version 3.0.2 (#10)
Bugfixes
- Fixed an exploit that allowed the claiming of rewards for the cycle in which a token was unstaked.
v3.0.1: Merge pull request #9 from animocabrands/version-3.0.1
Improvements
- Gas optimisations, minor comments improvements.
- Linting configuration.
- Migrated to
yarn
.
v3.0.0: Certik recommendations round 3 (#8)
New features
- Added
addRewardsForPeriods()
function, which initializes or adds reward amounts for the specified period range. This will perform a transfer operation to fund the contract with the added rewards amount when called. - Added contract interface
IWhitelistedNftContract
to define the API for the whitelisted contract used for NFT transfer operations when unstaking.
Breaking changes
- Removed
setRewardsForPeriods()
function. - Funding the contract rewards no longer occurs when calling the
start()
function. Instead, this happens wheneveraddRewardsForPeriods()
is called. - Removed
disabled
state variable, for representing the contract enabled state, and replaced withenabled
. - Renamed
RewardsScheduled
event toRewardsAdded
. - Renamed
totalPrizePool
state variable tototalRewardsPool
.
v2.0.1: Version 2.0.1 (#7)
New features
- The module now exports a
constants
and autils
object. - Added a function to calculate a total rewards based on a rewards schedule.
Bugfixes
- Fixed a wrong import in the migration and restructured the script
v2.0.0: Version 2.0.0 (#5)
Breaking changes
- Updated
@animoca/ethereum-contracts-core_library
to version 3 and downgraded it to be a dev dependency. - Updated
@animoca/ethereum-contracts-erc20_base
to version 3 and downgraded it to be a dev dependency. - Updated
@animoca/ethereum-contracts-assets_inventory
to version 3 and downgraded it to be a dev dependency. - Migrated compiler to
solc:0.6.8
. - Design change to record staker histories with modification to public interfaces.
- Removed testable version of the contract.
Improvements
- Removed dependency on
@animoca/f1dt-core_metadata
.
v1.0.2: V1.0.2 (#3)
1.0.2 (04/05/2020)
Improvements
- Updated dependency on
@animoca/ethereum-contracts-assets_inventory
to2.0.1
. - Change variables names in multiple files to be more generic.
v1.0.1
Improvements
- Added 1_NftStaking.js migration script