IUnlockV7
The Unlock Interface*
Methods
computeAvailableDiscountFor
function computeAvailableDiscountFor(address _purchaser, uint256 _keyPrice) external view returns (uint256 discount, uint256 tokens)
This function returns the discount available for a user, when purchasing a a key from a lock. This does not modify the state. It returns both the discount and the number of tokens consumed to grant that discount.
Parameters
Name | Type | Description |
---|---|---|
_purchaser | address | undefined |
_keyPrice | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
discount | uint256 | undefined |
tokens | uint256 | undefined |
configUnlock
function configUnlock(string _symbol, string _URI) external nonpayable
Function for the owner to update configuration variables. Should throw if called by other than owner.
Parameters
Name | Type | Description |
---|---|---|
_symbol | string | undefined |
_URI | string | undefined |
createLock
function createLock(uint256 _expirationDuration, address _tokenAddress, uint256 _keyPrice, uint256 _maxNumberOfKeys, string _lockName, bytes12 _salt) external nonpayable
Create lock This deploys a lock for a creator. It also keeps track of the deployed lock.