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,

§

type isOperationOutput = bool

source§

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

§

type isOperationPendingOutput = bool

source§

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

§

type isOperationReadyOutput = bool

source§

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

§

type isOperationDoneOutput = bool

source§

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

§

type getTimestampOutput = <DefaultEnvironment as Environment>::Timestamp

source§

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

§

type getMinDelayOutput = <DefaultEnvironment as Environment>::Timestamp

source§

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

§

type hashOperationOutput = <DefaultEnvironment as Environment>::Hash

source§

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

§

type hashOperationBatchOutput = <DefaultEnvironment as Environment>::Hash

source§

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

§

type scheduleOutput = Result<(), TimelockControllerError>

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

§

type scheduleBatchOutput = Result<(), TimelockControllerError>

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

§

type cancelOutput = Result<(), TimelockControllerError>

source§

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

§

type executeOutput = Result<(), TimelockControllerError>

source§

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

§

type executeBatchOutput = Result<(), TimelockControllerError>

source§

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

§

type updateDelayOutput = Result<(), TimelockControllerError>

source§

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

Implementors§