pub enum Mode {
Immediate {
new_admin: String,
},
TwoStep {
new_admin: String,
},
}
Variants§
Immediate
The new admin is set using a single transaction where the current admin
calls Admin::change_admin
with this variant and the new admin is set
immediately provided that the transaction succeeded.
Use this when the new admin is a contract and it cannot accept the role.
TwoStep
The new admin is set using a two-step process. First, the current admin
initiates the change by nominating a new admin by calling Admin::change_admin
with this variant. Then the nominated address must accept the admin role by
calling Admin::change_admin
but this time with None
as an argument.
It is possible for the current admin to set the pending admin as many times
as needed. This allows to correct any mistakes in case the wrong address was
nominated.
Use this when the new admin is always a wallet address and not a contract.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Mode
impl<'de> Deserialize<'de> for Mode
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl JsonSchema for Mode
impl JsonSchema for Mode
source§fn schema_name() -> String
fn schema_name() -> String
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read more