diff --git a/AddressBook.sol b/AddressBook.sol index 4c9792d..9164fce 100644 --- a/AddressBook.sol +++ b/AddressBook.sol @@ -1,9 +1,9 @@ -// SPDX-License-Identifier: MIT use this instead ( // SPDX-License-Identifier: GPL-3.0 ) +// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.8; import "@openzeppelin/contracts/access/Ownable.sol"; -contract AddressBook is Ownable(msg.sender) { +contract AddressBook is Ownable { // Define a private salt value for internal use string private salt = "value"; @@ -27,6 +27,9 @@ contract AddressBook is Ownable(msg.sender) { // Custom error for when a contact is not found error ContactNotFound(uint id); + // 🔧 FIX: Constructor eklendi - Ownable için gerekli + constructor() Ownable(msg.sender) {} + // Function to add a new contact function addContact(string calldata firstName, string calldata lastName, uint[] calldata phoneNumbers) external onlyOwner { // Create a new contact with the provided details and add it to the contacts array