[DEPRECATED] Call to this function has been removed from PublicLock > v9.
[DEPRECATED] Kept for backwards compatibility 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.
the duration of the lock (pass 0 for unlimited duration)
_tokenAddress
address
set to the ERC20 token address, or 0 for ETH.
_keyPrice
uint256
the price of each key
_maxNumberOfKeys
uint256
the maximum nimbers of keys to be edited
_lockName
string
the name of the lock param _salt [deprec] -- kept only for backwards copatibility This may be implemented as a sequence ID or with RNG. It's used with create2 to know the lock's address before the transaction is mined.
function createUpgradeableLock(bytes data) external nonpayable returns (address)
Create lock (default) This deploys a lock for a creator. It also keeps track of the deployed lock.
this call is passed as encoded function - for instance: bytes memory data = abi.encodeWithSignature( 'initialize(address,uint256,address,uint256,uint256,string)', msg.sender, _expirationDuration, _tokenAddress, _keyPrice, _maxNumberOfKeys, _lockName );
function recordConsumedDiscount(uint256 _discount, uint256 _tokens) external nonpayable
[DEPRECATED] Call to this function has been removed from PublicLock > v9.
[DEPRECATED] Kept for backwards compatibility This function will keep track of consumed discounts by a given user. It will also grant discount tokens to the creator who is granting the discount based on the amount of discount and compensation rate. This function is invoked by a previously deployed lock only.
function recordKeyPurchase(uint256 _value, address _referrer) external nonpayable
This function keeps track of the added GDP, as well as grants of discount tokens to the referrer, if applicable. The number of discount tokens granted is based on the value of the referal, the current growth rate and the lock's discount token distribution rate This function is invoked by a previously deployed lock only.
Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.