Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions AddressBook.sol
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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
Expand Down