diff --git a/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol b/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol index 93ec0792a..f7d29e86a 100644 --- a/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol +++ b/contracts/LSP7DigitalAsset/ILSP7DigitalAsset.sol @@ -20,7 +20,7 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y { * @param from The address which tokens were sent from (balance decreased by `-amount`). * @param to The address that received the tokens (balance increased by `+amount`). * @param amount The amount of tokens transferred. - * @param allowNonLSP1Recipient if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. + * @param force if the transferred enforced the `to` recipient address to be a contract that implements the LSP1 standard or not. * @param data Any additional data included by the caller during the transfer, and sent in the LSP1 hooks to the `from` and `to` addresses. */ event Transfer( @@ -28,7 +28,7 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y { address indexed from, address indexed to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes data ); @@ -173,7 +173,7 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y { * @param from The sender address. * @param to The recipient address. * @param amount The amount of tokens to transfer. - * @param allowNonLSP1Recipient When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. + * @param force When set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. * @param data Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. * * @custom:requirements @@ -188,19 +188,19 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y { * - if the transfer is triggered by an operator, either the {AuthorizedOperator} event will be emitted with the updated allowance or the {RevokedOperator} * event will be emitted if the operator has no more allowance left. * - * @custom:hint The `allowNonLSP1Recipient` parameter **MUST be set to `true`** to transfer tokens to Externally Owned Accounts (EOAs) + * @custom:hint The `force` parameter **MUST be set to `true`** to transfer tokens to Externally Owned Accounts (EOAs) * or contracts that do not implement the LSP1 Universal Receiver Standard. Otherwise the function will revert making the transfer fail. * - * @custom:info if the `to` address is a contract that implements LSP1, it will always be notified via its `universalReceiver(...)` function, regardless if `allowNonLSP1Recipient` is set to `true` or `false`. + * @custom:info if the `to` address is a contract that implements LSP1, it will always be notified via its `universalReceiver(...)` function, regardless if `force` is set to `true` or `false`. * * @custom:warning Be aware that when either the sender or the recipient can have logic that revert in their `universalReceiver(...)` function when being notified. - * This even if the `allowNonLSP1Recipient` was set to `true`. + * This even if the `force` was set to `true`. */ function transfer( address from, address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) external; @@ -212,7 +212,7 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y { * @param from An array of sending addresses. * @param to An array of receiving addresses. * @param amount An array of amount of tokens to transfer for each `from -> to` transfer. - * @param allowNonLSP1Recipient For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. + * @param force For each transfer, when set to `true`, the `to` address CAN be any address. When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. * @param data An array of additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. * * @custom:requirements @@ -228,7 +228,7 @@ interface ILSP7DigitalAsset is IERC165, IERC725Y { address[] memory from, address[] memory to, uint256[] memory amount, - bool[] memory allowNonLSP1Recipient, + bool[] memory force, bytes[] memory data ) external; } diff --git a/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol b/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol index c878ef51c..d61a1adc2 100644 --- a/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol +++ b/contracts/LSP7DigitalAsset/LSP7DigitalAssetCore.sol @@ -171,7 +171,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { address from, address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual { if (from == to) revert LSP7CannotSendToSelf(); @@ -191,7 +191,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { _updateOperator(from, operator, operatorAmount - amount, ""); } - _transfer(from, to, amount, allowNonLSP1Recipient, data); + _transfer(from, to, amount, force, data); } /** @@ -201,14 +201,14 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { address[] memory from, address[] memory to, uint256[] memory amount, - bool[] memory allowNonLSP1Recipient, + bool[] memory force, bytes[] memory data ) public virtual { uint256 fromLength = from.length; if ( fromLength != to.length || fromLength != amount.length || - fromLength != allowNonLSP1Recipient.length || + fromLength != force.length || fromLength != data.length ) { revert LSP7InvalidTransferBatch(); @@ -216,13 +216,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { for (uint256 i = 0; i < fromLength; ) { // using the public transfer function to handle updates to operator authorized amounts - transfer( - from[i], - to[i], - amount[i], - allowNonLSP1Recipient[i], - data[i] - ); + transfer(from[i], to[i], amount[i], force[i], data[i]); unchecked { ++i; @@ -374,9 +368,9 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { /** * @dev Mints `amount` of tokens and transfers it to `to`. * - * @param to the address to mint tokens for. - * @param amount the amount of tokens to mint. - * @param allowNonLSP1Recipient a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. + * @param to The address to mint tokens for. + * @param amount The amount of tokens to mint. + * @param force A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. * @param data Additional data the caller wants included in the emitted {Transfer} event, and sent in the LSP1 hook to the `to` address. * * @custom:requirements @@ -387,7 +381,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { function _mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual { if (to == address(0)) { @@ -403,17 +397,10 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { _tokenOwnerBalances[to] += amount; - emit Transfer( - operator, - address(0), - to, - amount, - allowNonLSP1Recipient, - data - ); + emit Transfer(operator, address(0), to, amount, force, data); bytes memory lsp1Data = abi.encode(address(0), to, amount, data); - _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); + _notifyTokenReceiver(to, force, lsp1Data); } /** @@ -425,8 +412,8 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { * * Any logic in the {_beforeTokenTransfer} function will run before updating the balances. * - * @param from the address to burn tokens from its balance. - * @param amount the amount of tokens to burn. + * @param from The address to burn tokens from its balance. + * @param amount The amount of tokens to burn. * @param data Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. * * @custom:hint In dApps, you can know which address is burning tokens by listening for the `Transfer` event and filter with the zero address as `to`. @@ -492,10 +479,10 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { * * Any logic in the {_beforeTokenTransfer} function will run before updating the balances. * - * @param from the address to decrease the balance. - * @param to the address to increase the balance. - * @param amount the amount of tokens to transfer from `from` to `to`. - * @param allowNonLSP1Recipient a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. + * @param from The address to decrease the balance. + * @param to The address to increase the balance. + * @param amount The amount of tokens to transfer from `from` to `to`. + * @param force A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. * @param data Additional data the caller wants included in the emitted event, and sent in the LSP1 hook to the `from` and `to` address. * * @custom:requirements @@ -509,7 +496,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { address from, address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual { if (from == address(0) || to == address(0)) { @@ -528,12 +515,12 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { _tokenOwnerBalances[from] -= amount; _tokenOwnerBalances[to] += amount; - emit Transfer(operator, from, to, amount, allowNonLSP1Recipient, data); + emit Transfer(operator, from, to, amount, force, data); bytes memory lsp1Data = abi.encode(from, to, amount, data); _notifyTokenSender(from, lsp1Data); - _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); + _notifyTokenReceiver(to, force, lsp1Data); } /** @@ -607,17 +594,17 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { * @dev Attempt to notify the token receiver `to` about the `amount` tokens being received. * This is done by calling its {universalReceiver} function with the `_TYPEID_LSP7_TOKENSRECIPIENT` as typeId, if `to` is a contract that supports the LSP1 interface. * - * If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `allowNonLSP1Recipient` boolean flag. - * - if `allowNonLSP1Recipient` is set to `true`, nothing will happen and no notification will be sent. - * - if `allowNonLSP1Recipient` is set to `false, the transaction will revert. + * If `to` is is an EOA or a contract that does not support the LSP1 interface, the behaviour will depend on the `force` boolean flag. + * - if `force` is set to `true`, nothing will happen and no notification will be sent. + * - if `force` is set to `false, the transaction will revert. * * @param to The address to call the {universalReceiver} function on. - * @param allowNonLSP1Recipient a boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. - * @param lsp1Data the data to be sent to the `to` address in the `universalReceiver(...)` call. + * @param force A boolean that describe if transfer to a `to` address that does not support LSP1 is allowed or not. + * @param lsp1Data The data to be sent to the `to` address in the `universalReceiver(...)` call. */ function _notifyTokenReceiver( address to, - bool allowNonLSP1Recipient, + bool force, bytes memory lsp1Data ) internal virtual { if ( @@ -630,7 +617,7 @@ abstract contract LSP7DigitalAssetCore is ILSP7DigitalAsset { _TYPEID_LSP7_TOKENSRECIPIENT, lsp1Data ); - } else if (!allowNonLSP1Recipient) { + } else if (!force) { if (to.code.length > 0) { revert LSP7NotifyTokenReceiverContractMissingLSP1Interface(to); } else { diff --git a/contracts/LSP7DigitalAsset/LSP7Errors.sol b/contracts/LSP7DigitalAsset/LSP7Errors.sol index b01947b81..02c1781ac 100644 --- a/contracts/LSP7DigitalAsset/LSP7Errors.sol +++ b/contracts/LSP7DigitalAsset/LSP7Errors.sol @@ -48,14 +48,14 @@ error LSP7InvalidTransferBatch(); /** * @dev reverts if the `tokenReceiver` does not implement LSP1 - * when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. + * when minting or transferring tokens with `bool force` set as `false`. */ error LSP7NotifyTokenReceiverContractMissingLSP1Interface( address tokenReceiver ); /** - * @dev reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. + * @dev reverts if the `tokenReceiver` is an EOA when minting or transferring tokens with `bool force` set as `false`. */ error LSP7NotifyTokenReceiverIsEOA(address tokenReceiver); diff --git a/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol b/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol index 1d4b06082..a7e92dedc 100644 --- a/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol +++ b/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupply.sol @@ -71,13 +71,13 @@ abstract contract LSP7CappedSupply is LSP7DigitalAsset { function _mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { if (totalSupply() + amount > tokenSupplyCap()) { revert LSP7CappedSupplyCannotMintOverCap(); } - super._mint(to, amount, allowNonLSP1Recipient, data); + super._mint(to, amount, force, data); } } diff --git a/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol b/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol index 66d0c8686..8e3eef30e 100644 --- a/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol +++ b/contracts/LSP7DigitalAsset/extensions/LSP7CappedSupplyInitAbstract.sol @@ -74,13 +74,13 @@ abstract contract LSP7CappedSupplyInitAbstract is LSP7DigitalAssetInitAbstract { function _mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { if (totalSupply() + amount > tokenSupplyCap()) { revert LSP7CappedSupplyCannotMintOverCap(); } - super._mint(to, amount, allowNonLSP1Recipient, data); + super._mint(to, amount, force, data); } } diff --git a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol index d63562b0e..c77a8527d 100644 --- a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol +++ b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20.sol @@ -76,7 +76,7 @@ abstract contract LSP7CompatibleERC20 is /** * @inheritdoc ILSP7CompatibleERC20 * - * @custom:info This function uses the `allowNonLSP1Recipient` parameter as `true` so that EOA and any contract can receive tokens. + * @custom:info This function uses the `force` parameter as `true` so that EOA and any contract can receive tokens. */ function transferFrom( address from, @@ -92,7 +92,7 @@ abstract contract LSP7CompatibleERC20 is /** * @inheritdoc ILSP7CompatibleERC20 * - * @custom:info This function uses the `allowNonLSP1Recipient` parameter as `true` so that EOA and any contract can receive tokens. + * @custom:info This function uses the `force` parameter as `true` so that EOA and any contract can receive tokens. */ function transfer( address to, @@ -126,11 +126,11 @@ abstract contract LSP7CompatibleERC20 is address from, address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { emit Transfer(from, to, amount); - super._transfer(from, to, amount, allowNonLSP1Recipient, data); + super._transfer(from, to, amount, force, data); } /** @@ -141,11 +141,11 @@ abstract contract LSP7CompatibleERC20 is function _mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { emit Transfer(address(0), to, amount); - super._mint(to, amount, allowNonLSP1Recipient, data); + super._mint(to, amount, force, data); } /** diff --git a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol index 2ab5adbe5..5c3665ada 100644 --- a/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol +++ b/contracts/LSP7DigitalAsset/extensions/LSP7CompatibleERC20InitAbstract.sol @@ -83,7 +83,7 @@ abstract contract LSP7CompatibleERC20InitAbstract is /** * @inheritdoc ILSP7CompatibleERC20 * - * @custom:info This function uses the `allowNonLSP1Recipient` parameter as `true` so that EOA and any contract can receive tokens. + * @custom:info This function uses the `force` parameter as `true` so that EOA and any contract can receive tokens. */ function transferFrom( address from, @@ -99,7 +99,7 @@ abstract contract LSP7CompatibleERC20InitAbstract is /** * @inheritdoc ILSP7CompatibleERC20 * - * @custom:info This function uses the `allowNonLSP1Recipient` parameter as `true` so that EOA and any contract can receive tokens. + * @custom:info This function uses the `force` parameter as `true` so that EOA and any contract can receive tokens. */ function transfer( address to, @@ -133,11 +133,11 @@ abstract contract LSP7CompatibleERC20InitAbstract is address from, address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { emit Transfer(from, to, amount); - super._transfer(from, to, amount, allowNonLSP1Recipient, data); + super._transfer(from, to, amount, force, data); } /** @@ -148,11 +148,11 @@ abstract contract LSP7CompatibleERC20InitAbstract is function _mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { emit Transfer(address(0), to, amount); - super._mint(to, amount, allowNonLSP1Recipient, data); + super._mint(to, amount, force, data); } /** diff --git a/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol b/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol index 7624bf8d6..08d7e267a 100644 --- a/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol +++ b/contracts/LSP7DigitalAsset/presets/ILSP7Mintable.sol @@ -12,7 +12,7 @@ interface ILSP7Mintable is ILSP7DigitalAsset { /** * @param to The address to mint tokens * @param amount The amount to mint - * @param allowNonLSP1Recipient When set to TRUE, to may be any address but + * @param force When set to TRUE, to may be any address but * when set to FALSE to must be a contract that supports LSP1 UniversalReceiver * @param data Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. * @dev Mints `amount` tokens and transfers it to `to`. @@ -26,7 +26,7 @@ interface ILSP7Mintable is ILSP7DigitalAsset { function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) external; } diff --git a/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol b/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol index dc25a81c3..cf8d2ab7b 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20Mintable.sol @@ -27,9 +27,9 @@ contract LSP7CompatibleERC20Mintable is LSP7CompatibleERC20 { function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, amount, allowNonLSP1Recipient, data); + _mint(to, amount, force, data); } } diff --git a/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol b/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol index fe5b69b88..b0c77d31c 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7CompatibleERC20MintableInitAbstract.sol @@ -29,9 +29,9 @@ abstract contract LSP7CompatibleERC20MintableInitAbstract is function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, amount, allowNonLSP1Recipient, data); + _mint(to, amount, force, data); } } diff --git a/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol b/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol index a11d44804..d2c69149e 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7Mintable.sol @@ -34,9 +34,9 @@ contract LSP7Mintable is LSP7DigitalAsset, ILSP7Mintable { function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, amount, allowNonLSP1Recipient, data); + _mint(to, amount, force, data); } } diff --git a/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol b/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol index 234577d4d..8b7a2cd5f 100644 --- a/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol +++ b/contracts/LSP7DigitalAsset/presets/LSP7MintableInitAbstract.sol @@ -45,9 +45,9 @@ abstract contract LSP7MintableInitAbstract is function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, amount, allowNonLSP1Recipient, data); + _mint(to, amount, force, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol b/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol index 82c401837..babc53e27 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/ILSP8IdentifiableDigitalAsset.sol @@ -20,7 +20,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y { * @param from The previous owner of the `tokenId` * @param to The new owner of `tokenId` * @param tokenId The tokenId that was transferred - * @param allowNonLSP1Recipient If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. + * @param force If the token transfer enforces the `to` recipient address to be a contract that implements the LSP1 standard or not. * @param data Any additional data the caller included by the caller during the transfer, and sent in the hooks to the `from` and `to` addresses. */ event Transfer( @@ -28,7 +28,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y { address indexed from, address indexed to, bytes32 indexed tokenId, - bool allowNonLSP1Recipient, + bool force, bytes data ); @@ -182,13 +182,13 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y { * * If operators are set for a specific `tokenId`, all the operators are revoked after the tokenId have been transferred. * - * The `allowNonLSP1Recipient` parameter MUST be set to `true` when transferring tokens to Externally Owned Accounts (EOAs) + * The `force` parameter MUST be set to `true` when transferring tokens to Externally Owned Accounts (EOAs) * or contracts that do not implement the LSP1 standard. * * @param from The address that owns the given `tokenId`. * @param to The address that will receive the `tokenId`. * @param tokenId The token ID to transfer. - * @param allowNonLSP1Recipient When set to `true`, the `to` address CAN be any addres. + * @param force When set to `true`, the `to` address CAN be any addres. * When set to `false`, the `to` address MUST be a contract that supports the LSP1 UniversalReceiver standard. * @param data Any additional data the caller wants included in the emitted event, and sent in the hooks of the `from` and `to` addresses. * @@ -202,19 +202,19 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y { * @custom:events * - {Transfer} event when the `tokenId` is successfully transferred. * - * @custom:hint The `allowNonLSP1Recipient` parameter **MUST be set to `true`** to transfer tokens to Externally Owned Accounts (EOAs) + * @custom:hint The `force` parameter **MUST be set to `true`** to transfer tokens to Externally Owned Accounts (EOAs) * or contracts that do not implement the LSP1 Universal Receiver Standard. Otherwise the function will revert making the transfer fail. * - * @custom:info if the `to` address is a contract that implements LSP1, it will always be notified via its `universalReceiver(...)` function, regardless if `allowNonLSP1Recipient` is set to `true` or `false`. + * @custom:info if the `to` address is a contract that implements LSP1, it will always be notified via its `universalReceiver(...)` function, regardless if `force` is set to `true` or `false`. * * @custom:warning Be aware that when either the sender or the recipient can have logic that revert in their `universalReceiver(...)` function when being notified. - * This even if the `allowNonLSP1Recipient` was set to `true`. + * This even if the `force` was set to `true`. */ function transfer( address from, address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) external; @@ -225,7 +225,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y { * @param from An array of sending addresses. * @param to An array of recipient addresses. * @param tokenId An array of token IDs to transfer. - * @param allowNonLSP1Recipient When set to `true`, `to` may be any address. + * @param force When set to `true`, `to` may be any address. * When set to `false`, `to` must be a contract that supports the LSP1 standard and not revert. * @param data Any additional data the caller wants included in the emitted event, and sent in the hooks to the `from` and `to` addresses. * @@ -245,7 +245,7 @@ interface ILSP8IdentifiableDigitalAsset is IERC165, IERC725Y { address[] memory from, address[] memory to, bytes32[] memory tokenId, - bool[] memory allowNonLSP1Recipient, + bool[] memory force, bytes[] memory data ) external; } diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol index c69ce9198..c5d6fe4e9 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8Errors.sol @@ -55,7 +55,7 @@ error LSP8InvalidTransferBatch(); /** * @dev reverts if the `tokenReceiver` does not implement LSP1 - * when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. + * when minting or transferring tokens with `bool force` set as `false`. */ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( address tokenReceiver @@ -63,7 +63,7 @@ error LSP8NotifyTokenReceiverContractMissingLSP1Interface( /** * @dev reverts if the `tokenReceiver` is an EOA - * when minting or transferring tokens with `bool allowNonLSP1Recipient` set as `false`. + * when minting or transferring tokens with `bool force` set as `false`. */ error LSP8NotifyTokenReceiverIsEOA(address tokenReceiver); diff --git a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol index 09b940984..81bb7b8b4 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAssetCore.sol @@ -236,7 +236,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is address from, address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual { address operator = msg.sender; @@ -245,7 +245,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is revert LSP8NotTokenOperator(tokenId, operator); } - _transfer(from, to, tokenId, allowNonLSP1Recipient, data); + _transfer(from, to, tokenId, force, data); } /** @@ -255,27 +255,21 @@ abstract contract LSP8IdentifiableDigitalAssetCore is address[] memory from, address[] memory to, bytes32[] memory tokenId, - bool[] memory allowNonLSP1Recipient, + bool[] memory force, bytes[] memory data ) public virtual { uint256 fromLength = from.length; if ( fromLength != to.length || fromLength != tokenId.length || - fromLength != allowNonLSP1Recipient.length || + fromLength != force.length || fromLength != data.length ) { revert LSP8InvalidTransferBatch(); } for (uint256 i = 0; i < fromLength; ) { - transfer( - from[i], - to[i], - tokenId[i], - allowNonLSP1Recipient[i], - data[i] - ); + transfer(from[i], to[i], tokenId[i], force[i], data[i]); unchecked { ++i; @@ -361,7 +355,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is * * @param to The address that will receive the minted `tokenId`. * @param tokenId The token ID to create (= mint). - * @param allowNonLSP1Recipient When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. + * @param force When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. * @param data Any additional data the caller wants included in the emitted event, and sent in the hook of the `to` address. * * @custom:events {Transfer} event with `address(0)` as `from` address. @@ -369,7 +363,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is function _mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual { if (to == address(0)) { @@ -390,17 +384,10 @@ abstract contract LSP8IdentifiableDigitalAssetCore is _ownedTokens[to].add(tokenId); _tokenOwners[tokenId] = to; - emit Transfer( - operator, - address(0), - to, - tokenId, - allowNonLSP1Recipient, - data - ); + emit Transfer(operator, address(0), to, tokenId, force, data); bytes memory lsp1Data = abi.encode(address(0), to, tokenId, data); - _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); + _notifyTokenReceiver(to, force, lsp1Data); } /** @@ -460,7 +447,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is * @param from The sender address. * @param to The recipient address. * @param tokenId The token to transfer. - * @param allowNonLSP1Recipient When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. + * @param force When set to `true`, `to` may be any address. When set to `false`, `to` must be a contract that supports the LSP1 standard. * @param data Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. * * @custom:requirements @@ -475,7 +462,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is address from, address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual { if (from == to) { @@ -501,12 +488,12 @@ abstract contract LSP8IdentifiableDigitalAssetCore is _ownedTokens[to].add(tokenId); _tokenOwners[tokenId] = to; - emit Transfer(operator, from, to, tokenId, allowNonLSP1Recipient, data); + emit Transfer(operator, from, to, tokenId, force, data); bytes memory lsp1Data = abi.encode(from, to, tokenId, data); _notifyTokenSender(from, lsp1Data); - _notifyTokenReceiver(to, allowNonLSP1Recipient, lsp1Data); + _notifyTokenReceiver(to, force, lsp1Data); } /** @@ -574,13 +561,13 @@ abstract contract LSP8IdentifiableDigitalAssetCore is /** * @dev An attempt is made to notify the token receiver about the `tokenId` changing owners - * using LSP1 interface. When allowNonLSP1Recipient is FALSE the token receiver MUST support LSP1. + * using LSP1 interface. When force is FALSE the token receiver MUST support LSP1. * * The receiver may revert when the token being sent is not wanted. */ function _notifyTokenReceiver( address to, - bool allowNonLSP1Recipient, + bool force, bytes memory lsp1Data ) internal virtual { if ( @@ -593,7 +580,7 @@ abstract contract LSP8IdentifiableDigitalAssetCore is _TYPEID_LSP8_TOKENSRECIPIENT, lsp1Data ); - } else if (!allowNonLSP1Recipient) { + } else if (!force) { if (to.code.length > 0) { revert LSP8NotifyTokenReceiverContractMissingLSP1Interface(to); } else { diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol index e0e4226f1..9dafac599 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupply.sol @@ -74,13 +74,13 @@ abstract contract LSP8CappedSupply is LSP8IdentifiableDigitalAsset { function _mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { if (totalSupply() + 1 > tokenSupplyCap()) { revert LSP8CappedSupplyCannotMintOverCap(); } - super._mint(to, tokenId, allowNonLSP1Recipient, data); + super._mint(to, tokenId, force, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol index 026ed2227..13b560841 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CappedSupplyInitAbstract.sol @@ -77,13 +77,13 @@ abstract contract LSP8CappedSupplyInitAbstract is function _mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { if (totalSupply() + 1 > tokenSupplyCap()) { revert LSP8CappedSupplyCannotMintOverCap(); } - super._mint(to, tokenId, allowNonLSP1Recipient, data); + super._mint(to, tokenId, force, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol index 7f453b5e5..6dc651df8 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721.sol @@ -173,7 +173,7 @@ abstract contract LSP8CompatibleERC721 is /** * @inheritdoc ILSP8CompatibleERC721 * - * @custom:info This function sets the `allowNonLSP1Recipient` parameter to `true` so that EOAs and any contract can receive the `tokenId`. + * @custom:info This function sets the `force` parameter to `true` so that EOAs and any contract can receive the `tokenId`. */ function transferFrom( address from, @@ -186,7 +186,7 @@ abstract contract LSP8CompatibleERC721 is /** * @inheritdoc ILSP8CompatibleERC721 * - * @custom:info This function sets the `allowNonLSP1Recipient` parameter to `true` so that EOAs and any contract can receive the `tokenId`. + * @custom:info This function sets the `force` parameter to `true` so that EOAs and any contract can receive the `tokenId`. */ function safeTransferFrom( address from, @@ -199,7 +199,7 @@ abstract contract LSP8CompatibleERC721 is /** * @inheritdoc ILSP8CompatibleERC721 * - * @custom:info This function sets the `allowNonLSP1Recipient` parameter to `true` so that EOAs and any contract can receive the `tokenId`. + * @custom:info This function sets the `force` parameter to `true` so that EOAs and any contract can receive the `tokenId`. */ function safeTransferFrom( address from, @@ -278,7 +278,7 @@ abstract contract LSP8CompatibleERC721 is address from, address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { if ( @@ -289,7 +289,7 @@ abstract contract LSP8CompatibleERC721 is } emit Transfer(from, to, uint256(tokenId)); - super._transfer(from, to, tokenId, allowNonLSP1Recipient, data); + super._transfer(from, to, tokenId, force, data); } /** @@ -320,11 +320,11 @@ abstract contract LSP8CompatibleERC721 is function _mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { emit Transfer(address(0), to, uint256(tokenId)); - super._mint(to, tokenId, allowNonLSP1Recipient, data); + super._mint(to, tokenId, force, data); } /** diff --git a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol index 294e74091..5d562725c 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8CompatibleERC721InitAbstract.sol @@ -181,7 +181,7 @@ abstract contract LSP8CompatibleERC721InitAbstract is /** * @inheritdoc ILSP8CompatibleERC721 * - * @custom:info This function sets the `allowNonLSP1Recipient` parameter to `true` so that EOAs and any contract can receive the `tokenId`. + * @custom:info This function sets the `force` parameter to `true` so that EOAs and any contract can receive the `tokenId`. */ function transferFrom( address from, @@ -194,7 +194,7 @@ abstract contract LSP8CompatibleERC721InitAbstract is /** * @inheritdoc ILSP8CompatibleERC721 * - * @custom:info This function sets the `allowNonLSP1Recipient` parameter to `true` so that EOAs and any contract can receive the `tokenId`. + * @custom:info This function sets the `force` parameter to `true` so that EOAs and any contract can receive the `tokenId`. */ function safeTransferFrom( address from, @@ -207,7 +207,7 @@ abstract contract LSP8CompatibleERC721InitAbstract is /** * @inheritdoc ILSP8CompatibleERC721 * - * @custom:info This function sets the `allowNonLSP1Recipient` parameter to `true` so that EOAs and any contract can receive the `tokenId`. + * @custom:info This function sets the `force` parameter to `true` so that EOAs and any contract can receive the `tokenId`. */ function safeTransferFrom( address from, @@ -286,7 +286,7 @@ abstract contract LSP8CompatibleERC721InitAbstract is address from, address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { address operator = msg.sender; @@ -299,7 +299,7 @@ abstract contract LSP8CompatibleERC721InitAbstract is } emit Transfer(from, to, uint256(tokenId)); - super._transfer(from, to, tokenId, allowNonLSP1Recipient, data); + super._transfer(from, to, tokenId, force, data); } /** @@ -330,11 +330,11 @@ abstract contract LSP8CompatibleERC721InitAbstract is function _mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) internal virtual override { emit Transfer(address(0), to, uint256(tokenId)); - super._mint(to, tokenId, allowNonLSP1Recipient, data); + super._mint(to, tokenId, force, data); } /** diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol index da04c68a8..d6bc2e8bd 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/ILSP8Mintable.sol @@ -14,7 +14,7 @@ interface ILSP8Mintable is ILSP8IdentifiableDigitalAsset { /** * @param to The address to mint tokens * @param tokenId The tokenId to mint - * @param allowNonLSP1Recipient When set to TRUE, to may be any address but + * @param force When set to TRUE, to may be any address but * when set to FALSE to must be a contract that supports LSP1 UniversalReceiver * @param data Additional data the caller wants included in the emitted event, and sent in the hooks to `from` and `to` addresses. * @dev Mints `amount` tokens and transfers it to `to`. @@ -28,7 +28,7 @@ interface ILSP8Mintable is ILSP8IdentifiableDigitalAsset { function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) external; } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol index 872b06593..4c0c82596 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721Mintable.sol @@ -22,21 +22,21 @@ contract LSP8CompatibleERC721Mintable is LSP8CompatibleERC721 { ) LSP8CompatibleERC721(name_, symbol_, newOwner_) {} /** - * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `allowNonLSP1Recipient`). + * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `force`). * * @dev Public {_mint} function only callable by the {owner}. * * @param to The address that will receive the minted `tokenId`. * @param tokenId The tokenId to mint. - * @param allowNonLSP1Recipient Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. + * @param force Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. * @param data Any addition data to be sent alongside the minting. */ function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, tokenId, allowNonLSP1Recipient, data); + _mint(to, tokenId, force, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol index 697d1bfb9..1b27875c0 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8CompatibleERC721MintableInitAbstract.sol @@ -24,21 +24,21 @@ contract LSP8CompatibleERC721MintableInitAbstract is } /** - * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `allowNonLSP1Recipient`). + * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `force`). * * @dev Public {_mint} function only callable by the {owner}. * * @param to The address that will receive the minted `tokenId`. * @param tokenId The tokenId to mint. - * @param allowNonLSP1Recipient Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. + * @param force Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. * @param data Any addition data to be sent alongside the minting. */ function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, tokenId, allowNonLSP1Recipient, data); + _mint(to, tokenId, force, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol index 43ac8e0a0..7182aad0b 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8Mintable.sol @@ -29,21 +29,21 @@ contract LSP8Mintable is LSP8IdentifiableDigitalAsset, ILSP8Mintable { ) LSP8IdentifiableDigitalAsset(name_, symbol_, newOwner_) {} /** - * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `allowNonLSP1Recipient`). + * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `force`). * * @dev Public {_mint} function only callable by the {owner}. * * @param to The address that will receive the minted `tokenId`. * @param tokenId The tokenId to mint. - * @param allowNonLSP1Recipient Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. + * @param force Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. * @param data Any addition data to be sent alongside the minting. */ function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, tokenId, allowNonLSP1Recipient, data); + _mint(to, tokenId, force, data); } } diff --git a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol index 4e614fc0d..0c49af6d8 100644 --- a/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol +++ b/contracts/LSP8IdentifiableDigitalAsset/presets/LSP8MintableInitAbstract.sol @@ -37,21 +37,21 @@ abstract contract LSP8MintableInitAbstract is } /** - * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `allowNonLSP1Recipient`). + * @notice Minting tokenId `tokenId` for address `to` with the additional data `data` (Note: allow non-LSP1 recipient is set to `force`). * * @dev Public {_mint} function only callable by the {owner}. * * @param to The address that will receive the minted `tokenId`. * @param tokenId The tokenId to mint. - * @param allowNonLSP1Recipient Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. + * @param force Set to `false` to ensure that you are minting for a recipient that implements LSP1, `false` otherwise for forcing the minting. * @param data Any addition data to be sent alongside the minting. */ function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public virtual onlyOwner { - _mint(to, tokenId, allowNonLSP1Recipient, data); + _mint(to, tokenId, force, data); } } diff --git a/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol b/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol index 8dbe9efd9..da0984f8f 100644 --- a/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol +++ b/contracts/Mocks/Tokens/LSP7CappedSupplyInitTester.sol @@ -22,7 +22,7 @@ contract LSP7CappedSupplyInitTester is LSP7CappedSupplyInitAbstract { } function mint(address to, uint256 amount) public { - // using allowNonLSP1Recipient=true so we can send to EOA in test + // using force=true so we can send to EOA in test _mint(to, amount, true, "token printer go brrr"); } diff --git a/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol b/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol index ec8c1cd68..5834fadfa 100644 --- a/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol +++ b/contracts/Mocks/Tokens/LSP7CappedSupplyTester.sol @@ -20,7 +20,7 @@ contract LSP7CappedSupplyTester is LSP7CappedSupply { {} function mint(address to, uint256 amount) public { - // using allowNonLSP1Recipient=true so we can send to EOA in test + // using force=true so we can send to EOA in test _mint(to, amount, true, "token printer go brrr"); } diff --git a/contracts/Mocks/Tokens/LSP7CompatibleERC20InitTester.sol b/contracts/Mocks/Tokens/LSP7CompatibleERC20InitTester.sol index 07cb6e539..fc1882a35 100644 --- a/contracts/Mocks/Tokens/LSP7CompatibleERC20InitTester.sol +++ b/contracts/Mocks/Tokens/LSP7CompatibleERC20InitTester.sol @@ -24,7 +24,7 @@ contract LSP7CompatibleERC20InitTester is LSP7CompatibleERC20InitAbstract { } function mint(address to, uint256 amount, bytes calldata data) public { - // using allowNonLSP1Recipient=true so we can send to EOA in test + // using force=true so we can send to EOA in test _mint(to, amount, true, data); } diff --git a/contracts/Mocks/Tokens/LSP7CompatibleERC20Tester.sol b/contracts/Mocks/Tokens/LSP7CompatibleERC20Tester.sol index 9e7429006..1bf28b352 100644 --- a/contracts/Mocks/Tokens/LSP7CompatibleERC20Tester.sol +++ b/contracts/Mocks/Tokens/LSP7CompatibleERC20Tester.sol @@ -15,7 +15,7 @@ contract LSP7CompatibleERC20Tester is LSP7CompatibleERC20 { ) LSP7CompatibleERC20(name_, symbol_, newOwner_) {} function mint(address to, uint256 amount, bytes calldata data) public { - // using allowNonLSP1Recipient=true so we can send to EOA in test + // using force=true so we can send to EOA in test _mint(to, amount, true, data); } diff --git a/contracts/Mocks/Tokens/LSP7InitTester.sol b/contracts/Mocks/Tokens/LSP7InitTester.sol index 2a95b0ae9..ad1a3b739 100644 --- a/contracts/Mocks/Tokens/LSP7InitTester.sol +++ b/contracts/Mocks/Tokens/LSP7InitTester.sol @@ -31,9 +31,9 @@ contract LSP7InitTester is function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public { - _mint(to, amount, allowNonLSP1Recipient, data); + _mint(to, amount, force, data); } } diff --git a/contracts/Mocks/Tokens/LSP7Tester.sol b/contracts/Mocks/Tokens/LSP7Tester.sol index 4681979b2..411516e03 100644 --- a/contracts/Mocks/Tokens/LSP7Tester.sol +++ b/contracts/Mocks/Tokens/LSP7Tester.sol @@ -15,9 +15,9 @@ contract LSP7Tester is LSP7DigitalAsset, LSP7Burnable { function mint( address to, uint256 amount, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public { - _mint(to, amount, allowNonLSP1Recipient, data); + _mint(to, amount, force, data); } } diff --git a/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol b/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol index ce8517bf5..475c5e565 100644 --- a/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol +++ b/contracts/Mocks/Tokens/LSP8CompatibleERC721Tester.sol @@ -23,7 +23,7 @@ contract LSP8CompatibleERC721Tester is LSP8CompatibleERC721 { } function mint(address to, uint256 tokenId, bytes calldata data) public { - // using allowNonLSP1Recipient=true so we can send to EOA in test + // using force=true so we can send to EOA in test _mint(to, bytes32(tokenId), true, data); } diff --git a/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol b/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol index 767826cbf..0b1575b7f 100644 --- a/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol +++ b/contracts/Mocks/Tokens/LSP8CompatibleERC721TesterInit.sol @@ -32,7 +32,7 @@ contract LSP8CompatibleERC721InitTester is LSP8CompatibleERC721InitAbstract { } function mint(address to, uint256 tokenId, bytes calldata data) public { - // using allowNonLSP1Recipient=true so we can send to EOA in test + // using force=true so we can send to EOA in test _mint(to, bytes32(tokenId), true, data); } diff --git a/contracts/Mocks/Tokens/LSP8InitTester.sol b/contracts/Mocks/Tokens/LSP8InitTester.sol index 7d9fcb046..a5aa6d8c5 100644 --- a/contracts/Mocks/Tokens/LSP8InitTester.sol +++ b/contracts/Mocks/Tokens/LSP8InitTester.sol @@ -29,9 +29,9 @@ contract LSP8InitTester is function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public { - _mint(to, tokenId, allowNonLSP1Recipient, data); + _mint(to, tokenId, force, data); } } diff --git a/contracts/Mocks/Tokens/LSP8Tester.sol b/contracts/Mocks/Tokens/LSP8Tester.sol index 0dbfd5138..66a7a6639 100644 --- a/contracts/Mocks/Tokens/LSP8Tester.sol +++ b/contracts/Mocks/Tokens/LSP8Tester.sol @@ -20,9 +20,9 @@ contract LSP8Tester is LSP8IdentifiableDigitalAsset, LSP8Burnable { function mint( address to, bytes32 tokenId, - bool allowNonLSP1Recipient, + bool force, bytes memory data ) public { - _mint(to, tokenId, allowNonLSP1Recipient, data); + _mint(to, tokenId, force, data); } }