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

Removed Constructor #9

Merged
merged 4 commits into from
Dec 5, 2024
Merged

Removed Constructor #9

merged 4 commits into from
Dec 5, 2024

Conversation

DarkKnight3074
Copy link
Collaborator

@DarkKnight3074 DarkKnight3074 commented Dec 4, 2024

This PR introduces several updates and modification.

Files Added:
Sybil.sol: Add the Sybil contract based on the latest MVP design.
IMVPSybil.sol: This file contains the interface for the Sybil.sol file.
SybilHelpers.sol: This file contains the helper function for the Sybil.sol file.
MVPTransactionTypes.sol: This file contains the helper function for the testing.
mvp.t.sol: This file contains several test case for the latest MVP Sybil contract.

@DarkKnight3074 DarkKnight3074 changed the title Fix/constructor removing Removed Constructor Dec 4, 2024
@DarkKnight3074 DarkKnight3074 marked this pull request as ready for review December 4, 2024 12:03
@DarkKnight3074 DarkKnight3074 merged commit 1a78a0d into develop Dec 5, 2024
2 checks passed
@jjamie65
Copy link
Member

jjamie65 commented Dec 6, 2024

Do we need ABSOLUTE_MAX_L1BATCHTIMEOUT?
Can we simplify verifiers?
The txns type is Createaccountdeposit not createaccount, so should have an amount
What about vouch?
what is the 'override' for in the txn functions?
do we need to set lastforgedbatch in intialization?

@amantokamak
Copy link

Do we need ABSOLUTE_MAX_L1BATCHTIMEOUT? Can we simplify verifiers?
The txns type is Createaccountdeposit not createaccount, so should have an amount What about vouch? what is the 'override' for in the txn functions? do we need to set lastforgedbatch in intialization?

-> do we need to set lastforgedbatch in intialization?
We don't need as it starts from 0 by default.

-> Do we need ABSOLUTE_MAX_L1BATCHTIMEOUT?
We will see might be we need to add it in forgeBatch function.

-> The txns type is Createaccountdeposit not createaccount?
As per document we have CreateAccount and Deposit function, do we need only one function named CreateAccountdeposit?

->What about vouch?
Can you explain about vouch like where do we need it and are other functionalities need it?
function createVouch(uint48 toIdx) external {
require(toIdx != _RESERVED_IDX, "Cannot vouch for reserved account");
require(toIdx != msg.sender, "Cannot vouch for yourself");
require(!vouchMap[msg.sender][toIdx], "Already vouched");

    // Set the vouch relationship
    vouchMap[msg.sender][toIdx] = true;

    emit CreateVouch(msg.sender, toIdx);
}

function deleteVouch(uint48 toIdx) external {
    require(toIdx != _RESERVED_IDX, "Cannot delete vouch for reserved account");
    require(toIdx != msg.sender, "Cannot delete vouch for yourself");
    require(vouchMap[msg.sender][toIdx], "No existing vouch to delete");

    // Remove the vouch relationship
    vouchMap[msg.sender][toIdx] = false;

    emit DeleteVouch(msg.sender, toIdx);
}

@Intizar-T Intizar-T deleted the fix/constructor-removing branch December 29, 2024 10:34
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

Successfully merging this pull request may close these issues.

3 participants