pub trait TimelockController: ContractEnv {
Show 28 associated items type isOperationOutput: ImpliesReturn<bool>; type isOperationPendingOutput: ImpliesReturn<bool>; type isOperationReadyOutput: ImpliesReturn<bool>; type isOperationDoneOutput: ImpliesReturn<bool>; type getTimestampOutput: ImpliesReturn<Timestamp>; type getMinDelayOutput: ImpliesReturn<Timestamp>; type hashOperationOutput: ImpliesReturn<Hash>; type hashOperationBatchOutput: ImpliesReturn<Hash>; type scheduleOutput: ImpliesReturn<Result<(), TimelockControllerError>>; type scheduleBatchOutput: ImpliesReturn<Result<(), TimelockControllerError>>; type cancelOutput: ImpliesReturn<Result<(), TimelockControllerError>>; type executeOutput: ImpliesReturn<Result<(), TimelockControllerError>>; type executeBatchOutput: ImpliesReturn<Result<(), TimelockControllerError>>; type updateDelayOutput: ImpliesReturn<Result<(), TimelockControllerError>>; // Required methods fn is_operation(&self, id: OperationId) -> Self::isOperationOutput; fn is_operation_pending( &self, id: OperationId, ) -> Self::isOperationPendingOutput; fn is_operation_ready( &self, id: OperationId, ) -> Self::isOperationReadyOutput; fn is_operation_done(&self, id: OperationId) -> Self::isOperationDoneOutput; fn get_timestamp(&self, id: OperationId) -> Self::getTimestampOutput; fn get_min_delay(&self) -> Self::getMinDelayOutput; fn hash_operation( &self, transaction: Transaction, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::hashOperationOutput; fn hash_operation_batch( &self, transactions: Vec<Transaction>, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::hashOperationBatchOutput; fn schedule( &mut self, transaction: Transaction, predecessor: Option<OperationId>, salt: [u8; 32], delay: Timestamp, ) -> Self::scheduleOutput; fn schedule_batch( &mut self, transactions: Vec<Transaction>, predecessor: Option<OperationId>, salt: [u8; 32], delay: Timestamp, ) -> Self::scheduleBatchOutput; fn cancel(&mut self, id: OperationId) -> Self::cancelOutput; fn execute( &mut self, transaction: Transaction, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::executeOutput; fn execute_batch( &mut self, transactions: Vec<Transaction>, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::executeBatchOutput; fn update_delay(&mut self, new_delay: Timestamp) -> Self::updateDelayOutput;
}
Expand description

Contract module which acts as a time-locked controller. When set as the owner of an Ownable smart contract, it enforces a timelock on all onlyOwner maintenance operations. This gives time for users of the controlled contract to exit before a potentially dangerous maintenance operation is applied.

By default, this contract is self-administered, meaning administration tasks have to go through the timelock process. The proposer (resp executor) role is in charge of proposing (resp executing) operations. A common use case is to position this TimelockController as the owner of a smart contract, with a multisig or a DAO as the sole proposer.

Required Associated Types§

Source

type isOperationOutput: ImpliesReturn<bool>

Output type of the respective trait message.

Source

type isOperationPendingOutput: ImpliesReturn<bool>

Output type of the respective trait message.

Source

type isOperationReadyOutput: ImpliesReturn<bool>

Output type of the respective trait message.

Source

type isOperationDoneOutput: ImpliesReturn<bool>

Output type of the respective trait message.

Source

type getTimestampOutput: ImpliesReturn<Timestamp>

Output type of the respective trait message.

Source

type getMinDelayOutput: ImpliesReturn<Timestamp>

Output type of the respective trait message.

Source

type hashOperationOutput: ImpliesReturn<Hash>

Output type of the respective trait message.

Source

type hashOperationBatchOutput: ImpliesReturn<Hash>

Output type of the respective trait message.

Source

type scheduleOutput: ImpliesReturn<Result<(), TimelockControllerError>>

Output type of the respective trait message.

Source

type scheduleBatchOutput: ImpliesReturn<Result<(), TimelockControllerError>>

Output type of the respective trait message.

Source

type cancelOutput: ImpliesReturn<Result<(), TimelockControllerError>>

Output type of the respective trait message.

Source

type executeOutput: ImpliesReturn<Result<(), TimelockControllerError>>

Output type of the respective trait message.

Source

type executeBatchOutput: ImpliesReturn<Result<(), TimelockControllerError>>

Output type of the respective trait message.

Source

type updateDelayOutput: ImpliesReturn<Result<(), TimelockControllerError>>

Output type of the respective trait message.

Required Methods§

Source

fn is_operation(&self, id: OperationId) -> Self::isOperationOutput

Source

fn is_operation_pending( &self, id: OperationId, ) -> Self::isOperationPendingOutput

Source

fn is_operation_ready(&self, id: OperationId) -> Self::isOperationReadyOutput

Source

fn is_operation_done(&self, id: OperationId) -> Self::isOperationDoneOutput

Source

fn get_timestamp(&self, id: OperationId) -> Self::getTimestampOutput

Source

fn get_min_delay(&self) -> Self::getMinDelayOutput

Source

fn hash_operation( &self, transaction: Transaction, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::hashOperationOutput

Source

fn hash_operation_batch( &self, transactions: Vec<Transaction>, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::hashOperationBatchOutput

Source

fn schedule( &mut self, transaction: Transaction, predecessor: Option<OperationId>, salt: [u8; 32], delay: Timestamp, ) -> Self::scheduleOutput

Source

fn schedule_batch( &mut self, transactions: Vec<Transaction>, predecessor: Option<OperationId>, salt: [u8; 32], delay: Timestamp, ) -> Self::scheduleBatchOutput

Source

fn cancel(&mut self, id: OperationId) -> Self::cancelOutput

Source

fn execute( &mut self, transaction: Transaction, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::executeOutput

Source

fn execute_batch( &mut self, transactions: Vec<Transaction>, predecessor: Option<OperationId>, salt: [u8; 32], ) -> Self::executeBatchOutput

Source

fn update_delay(&mut self, new_delay: Timestamp) -> Self::updateDelayOutput

Implementations on Foreign Types§

Source§

impl<E> TimelockController for TraitDefinitionRegistry<E>
where E: Environment,

Source§

type isOperationOutput = bool

Source§

type isOperationPendingOutput = bool

Source§

type isOperationReadyOutput = bool

Source§

type isOperationDoneOutput = bool

Source§

type getTimestampOutput = <DefaultEnvironment as Environment>::Timestamp

Source§

type getMinDelayOutput = <DefaultEnvironment as Environment>::Timestamp

Source§

type hashOperationOutput = <DefaultEnvironment as Environment>::Hash

Source§

type hashOperationBatchOutput = <DefaultEnvironment as Environment>::Hash

Source§

type scheduleOutput = Result<(), TimelockControllerError>

Source§

type scheduleBatchOutput = Result<(), TimelockControllerError>

Source§

type cancelOutput = Result<(), TimelockControllerError>

Source§

type executeOutput = Result<(), TimelockControllerError>

Source§

type executeBatchOutput = Result<(), TimelockControllerError>

Source§

type updateDelayOutput = Result<(), TimelockControllerError>

Source§

fn is_operation(&self, __ink_binding_0: OperationId) -> Self::isOperationOutput

Source§

fn is_operation_pending( &self, __ink_binding_0: OperationId, ) -> Self::isOperationPendingOutput

Source§

fn is_operation_ready( &self, __ink_binding_0: OperationId, ) -> Self::isOperationReadyOutput

Source§

fn is_operation_done( &self, __ink_binding_0: OperationId, ) -> Self::isOperationDoneOutput

Source§

fn get_timestamp( &self, __ink_binding_0: OperationId, ) -> Self::getTimestampOutput

Source§

fn get_min_delay(&self) -> Self::getMinDelayOutput

Source§

fn hash_operation( &self, __ink_binding_0: Transaction, __ink_binding_1: Option<OperationId>, __ink_binding_2: [u8; 32], ) -> Self::hashOperationOutput

Source§

fn hash_operation_batch( &self, __ink_binding_0: Vec<Transaction>, __ink_binding_1: Option<OperationId>, __ink_binding_2: [u8; 32], ) -> Self::hashOperationBatchOutput

Source§

fn schedule( &mut self, __ink_binding_0: Transaction, __ink_binding_1: Option<OperationId>, __ink_binding_2: [u8; 32], __ink_binding_3: Timestamp, ) -> Self::scheduleOutput

Source§

fn schedule_batch( &mut self, __ink_binding_0: Vec<Transaction>, __ink_binding_1: Option<OperationId>, __ink_binding_2: [u8; 32], __ink_binding_3: Timestamp, ) -> Self::scheduleBatchOutput

Source§

fn cancel(&mut self, __ink_binding_0: OperationId) -> Self::cancelOutput

Source§

fn execute( &mut self, __ink_binding_0: Transaction, __ink_binding_1: Option<OperationId>, __ink_binding_2: [u8; 32], ) -> Self::executeOutput

Source§

fn execute_batch( &mut self, __ink_binding_0: Vec<Transaction>, __ink_binding_1: Option<OperationId>, __ink_binding_2: [u8; 32], ) -> Self::executeBatchOutput

Source§

fn update_delay( &mut self, __ink_binding_0: Timestamp, ) -> Self::updateDelayOutput

Implementors§