-
Notifications
You must be signed in to change notification settings - Fork 30
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
feat(starknet): add support for maintenance mode #424
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
trait IMaintenance<T> { | ||
fn is_enabled(self: @T) -> bool; | ||
fn enable(ref self: T, enable: bool); | ||
} |
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.
could we use a more descriptive function name here ? like set_maintenance_mode
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.
Updated:
#[starknet::interface]
trait IMaintenance<T> {
fn is_in_maintenance(self: @T) -> bool;
fn set_maintenance_mode(ref self: T, on: bool);
}
efca109
to
0567cfb
Compare
Description
Add support for maintenance mode, when
executor
is disabled, the following functions will revert:create_order
cancel_order
execute_order
fulfill_order
Here is the interface for maintenance mode:
IMaintenance::enable
can only be invoked byadmin
What type of PR is this? (check all applicable)
feat:
)fix:
)docs:
)style:
)refactor:
)perf:
)test:
)build:
)ci:
)chore:
)revert:
)BREAKING CHANGE:
)Related Tickets & Documents
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?
[optional] What gif best describes this PR or how it makes you feel?
PR Title and Description Guidelines:
feat:
,fix:
,chore:
,BREAKING CHANGE:
etc. in your PR title.Closing Issues