Lootbox admin functions
These are function that only the lootbox owner can call. One of the function (update whitelist) is already described above.
Initialize the class before calling any of these functions
NOTE -
These functions if called with a signer that is not the owner of the lootbox will throw
LBErrorCodes.VALIDATION_ERROR
with the message"Signer is not the lootbox owner."
1. activate
activate
This function activates a lootbox which might be deactivated by the owner earlier or might be deactivated while creating the lootbox using the activateLootbox
option.
2. deactivate
deactivate
This function deactivates the lootbox which stops any new users from opening the lootbox. This will temporarily stop the lootbox and will not remove any items from the lootbox.
NOTE: Users with any pending claims can still claim their rewards.
3. removeItem
removeItem
This will remove one item from the lootbox. It will withdraw the item if it is present in the lootbox and send it to the owner of the lootbox.
4. permanentlyStop
permanentlyStop
This will permanently disable the lootbox and withdraw all the items from the lootbox and send it to lootbox owner. This action will permanently disable all functions of the lootbox except for the claimRewards
function. Users who have pending rewards from previous openings will still be able to claim them. This will also stop the lootbox from receiving any new RNGs from supra.
5. updateRemainingOpensForAddresses
updateRemainingOpensForAddresses
Since, there could be multiple opens per wallet. This function can be used to set the number of opens for some addresses other then the default passed during creation.
6. changeTrustedForwarder
changeTrustedForwarder
Change the trusted forwarder for meta transactions. Can be useful when you switch meta transaction providers.
7. transferOwnership
transferOwnership
Change the lootbox owner.
NOTE -
If you change the ownership of the lootbox and then withdraw any item or permanently stop the lootbox all the contents of the lootbox will be sent to the new owner.
Last updated