-
Notifications
You must be signed in to change notification settings - Fork 69
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
Whitelist executors #103
Whitelist executors #103
Conversation
Side note:
|
…into whitelist_executors
@@ -113,6 +113,38 @@ func update_controller{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_c | |||
return () | |||
end | |||
|
|||
@external | |||
func add_executors{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : felt}( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get away with just add_executors
or just register_executors
? seems kind of redundant to have both
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lmao I'm stupid! Ofc we can :) 843ad89
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually the reason why there was an add_executors
and a register_executors
was because add_executors
is only_controller()
whereas register
is not. Since _controller
is an argument passed in to the constructor
(and not get_caller_address
), add_executors
fails when called in the constructor
... I think we should keep register_executors
, but we could decide to go the other way and simply set the _controller
to get_caller_address
in the constructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i see yes. annoying but not much we can do then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once we create the space factory we can properly figure out the space deployment/controller update flows
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decided to fix it by having add_executors
simply be a wrapper with a call to only_owner()
before register_executors
. I think naming should be changed though, and maybe use _
as we sometimes do in solidity :)
@@ -113,6 +113,38 @@ func update_controller{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_c | |||
return () | |||
end | |||
|
|||
@external | |||
func add_executors{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : felt}( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i see yes. annoying but not much we can do then
@@ -113,6 +113,38 @@ func update_controller{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_c | |||
return () | |||
end | |||
|
|||
@external | |||
func add_executors{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : felt}( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
once we create the space factory we can properly figure out the space deployment/controller update flows
This PR:
executor
from a single address to a whitelist of executors (provided via constructor, can be modified by thecontroller
using theadd_executors
andremove_executors
)executor
specified (when creating a proposal viapropose
). Thisexecutor
needs to be part of the whitelistfinalize_proposal
, the executor is checked to see whether it's still in the whitelist. If it is not, then theproposal_outcome
is set toCANCELLED
Closes #94