Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SafleID Registration Implementation #9

Open
sshubhamagg opened this issue Feb 17, 2025 · 0 comments
Open

SafleID Registration Implementation #9

sshubhamagg opened this issue Feb 17, 2025 · 0 comments
Assignees

Comments

@sshubhamagg
Copy link
Member

  1. Implement registration function:

    function registerID(
        uint256 id,
        address primaryWallet,
        bytes memory signature
    ) external payable onlyRegistrar
    
  2. Implement signature verification:

    function verifyPrimarySignature(
        uint256 id,
        address primaryWallet,
        bytes memory signature
    ) internal view returns (bool)
    

Requirements:

  1. Transaction must include registration fee
  2. Contract must be unpaused
  3. Caller must be registered registrar
  4. Signature must be valid
  5. ID must not exist
  6. Primary wallet must not be registered

Events Emitted:

IDRegistered(
    uint256 indexed id,
    address indexed primaryWallet,
    address indexed registrar,
    uint256 fee
)

RegistrationFailed(
    uint256 indexed id,
    address primaryWallet,
    address registrar,
    string reason
)


event IDRegistrationCompleted(
    uint256 indexed id,
    address indexed primaryWallet,
    uint256 fee
);

event IDRegistrationFailed(
    uint256 indexed id,
    address primaryWallet,
    string reason
);

event FeeCollected(
    uint256 indexed id,
    uint256 amount,
    address indexed collector
);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants