-
-
Save z0r0z/6e23ebe5dbaa9b06a62ce568ab061a57 to your computer and use it in GitHub Desktop.
LexDAO Lawyer Registry Contract
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity >=0.8.0; | |
contract LexRegistry { | |
address public owner; | |
mapping(address => Lawyer) lawyers; | |
struct Lawyer { | |
string name; | |
string jurisdiction; | |
string details; | |
bool availability; | |
} | |
modifier onlyOwner { | |
require(msg.sender == owner, "NOT_OWNER"); | |
_; | |
} | |
constructor() { | |
owner = msg.sender; | |
} | |
function register(address lawyer, string calldata name, string calldata jurisdiction, string calldata details) external onlyOwner { | |
lawyers[lawyer] = Lawyer(name, jurisdiction, details, true); | |
} | |
// function to edit availability (?) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment