Trait WhitelistWithManager

Source
pub trait WhitelistWithManager: Whitelist + WhitelistRolesWithManager {
    // Required methods
    fn extend_whitelist_expiration(
        &mut self,
        service_id: &Bytes32,
        user: &<Self as Whitelist>::Address,
        expiration_timestamp: u64,
    );
    fn set_whitelist_expiration(
        &mut self,
        service_id: &Bytes32,
        user: &<Self as Whitelist>::Address,
        expiration_timestamp: u64,
    );
    fn set_indefinite_whitelist_status(
        &mut self,
        service_id: &Bytes32,
        user: &<Self as Whitelist>::Address,
        status: bool,
    ) -> U256;
    fn revoke_indefinite_whitelist_status(
        &mut self,
        service_id: &Bytes32,
        user: &<Self as Whitelist>::Address,
        setter: &<Self as Whitelist>::Address,
    ) -> (bool, U256);
}
Expand description

Whitelist contract that is controlled by a manager

Required Methods§

Source

fn extend_whitelist_expiration( &mut self, service_id: &Bytes32, user: &<Self as Whitelist>::Address, expiration_timestamp: u64, )

Extends the expiration of the temporary whitelist of user to be able to use the service with service_id if the sender has the whitelist expiration extender role

§Arguments
  • service_id Service ID
  • user User address
  • expiration_timestamp Timestamp at which the temporary whitelist will expire
Source

fn set_whitelist_expiration( &mut self, service_id: &Bytes32, user: &<Self as Whitelist>::Address, expiration_timestamp: u64, )

Sets the expiration of the temporary whitelist of user to be able to use the service with service_id if the sender has the whitelist expiration setter role

§Arguments
  • service_id Service ID
  • user User address
  • expiration_timestamp Timestamp at which the temporary whitelist will expire
Source

fn set_indefinite_whitelist_status( &mut self, service_id: &Bytes32, user: &<Self as Whitelist>::Address, status: bool, ) -> U256

Sets the indefinite whitelist status of user to be able to use the service with service_id if the sender has the indefinite whitelister role

§Arguments
  • service_id Service ID
  • user User address
  • status Indefinite whitelist status
Source

fn revoke_indefinite_whitelist_status( &mut self, service_id: &Bytes32, user: &<Self as Whitelist>::Address, setter: &<Self as Whitelist>::Address, ) -> (bool, U256)

Revokes the indefinite whitelist status granted to the user for the service by a specific account

§Arguments
  • service_id Service ID
  • user User address
  • setter Setter address

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Address> WhitelistWithManager for DummyWhitelist<Address>
where Address: AsRef<[u8]> + Zero + Default + PartialEq,