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

fix allow list comments #469

Merged
merged 4 commits into from
Jan 31, 2023
Merged
Changes from 2 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
9 changes: 6 additions & 3 deletions precompile/allow_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ const (
)

var (
AllowListNoRole AllowListRole = AllowListRole(common.BigToHash(big.NewInt(0))) // No role assigned - this is equivalent to common.Hash{} and deletes the key from the DB when set
AllowListEnabled AllowListRole = AllowListRole(common.BigToHash(big.NewInt(1))) // Deployers are allowed to create new contracts
AllowListAdmin AllowListRole = AllowListRole(common.BigToHash(big.NewInt(2))) // Admin - allowed to modify both the admin and deployer list as well as deploy contracts
// No role assigned - this is equivalent to common.Hash{} and deletes the key from the DB when set
AllowListNoRole AllowListRole = AllowListRole(common.BigToHash(big.NewInt(0)))
darioush marked this conversation as resolved.
Show resolved Hide resolved
// Enabled - allowed to use state-changing precompile functions without modifying status of other admins or enableds
AllowListEnabled AllowListRole = AllowListRole(common.BigToHash(big.NewInt(1)))
// Admin - allowed to modify both the admin and enabled list, as well as to use state-changing precompile functions
AllowListAdmin AllowListRole = AllowListRole(common.BigToHash(big.NewInt(2)))

// AllowList function signatures
setAdminSignature = CalculateFunctionSelector("setAdmin(address)")
Expand Down