Skip to content

Commit

Permalink
Add function to update quorum
Browse files Browse the repository at this point in the history
  • Loading branch information
pscott committed May 12, 2022
1 parent 0fbf8d4 commit 23e86a7
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions contracts/starknet/space.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ end
func controller_updated(previous : felt, new_controller : felt):
end
@event
func quorum_updated(previous : Uint256, new_quorum : Uint256):
end
@event
func voting_delay_updated(previous : felt, new_voting_delay : felt):
end
Expand Down Expand Up @@ -401,6 +405,20 @@ func update_controller{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_c
return ()
end
@external
func update_quorum{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : felt}(
new_quorum : Uint256
):
Ownable_only_owner()
let (previous_quorum) = quorum.read()
quorum.write(new_quorum)
quorum_updated.emit(previous_quorum, new_quorum)
return ()
end
@external
func update_voting_delay{syscall_ptr : felt*, pedersen_ptr : HashBuiltin*, range_check_ptr : felt}(
new_delay : felt
Expand Down

0 comments on commit 23e86a7

Please sign in to comment.