pub type Module<T> = Pallet<T>;
👎Deprecated: use
Pallet
insteadExpand description
Type alias to Pallet
, to be used by construct_runtime
.
Generated by pallet
attribute macro.
Aliased Type§
struct Module<T>(/* private fields */);
Implementations
source§impl<T: Config> Pallet<T>
impl<T: Config> Pallet<T>
pub fn mock_pool_exists(f: impl Fn(T::PoolId) -> bool + 'static)
pub fn mock_tranche_exists( f: impl Fn(T::PoolId, T::TrancheId) -> bool + 'static )
pub fn mock_account_for(f: impl Fn(T::PoolId) -> T::AccountId + 'static)
pub fn mock_currency_for( f: impl Fn(T::PoolId) -> Option<T::CurrencyId> + 'static )
pub fn mock_withdraw( f: impl Fn(T::PoolId, T::AccountId, T::Balance) -> DispatchResult + 'static )
pub fn mock_deposit( f: impl Fn(T::PoolId, T::AccountId, T::Balance) -> DispatchResult + 'static )
pub fn mock_info( f: impl Fn((T::PoolId, T::TrancheId)) -> Result<InvestmentInfo<T::AccountId, T::CurrencyId, (T::PoolId, T::TrancheId)>, DispatchError> + 'static )
pub fn mock_balance( f: impl Fn((T::PoolId, T::TrancheId), &T::AccountId) -> T::Balance + 'static )
pub fn mock_transfer( f: impl Fn((T::PoolId, T::TrancheId), &T::AccountId, &T::AccountId, T::Balance) -> DispatchResult + 'static )
pub fn mock_get_price( f: impl Fn(T::PoolId, T::TrancheId) -> Option<(T::BalanceRatio, Seconds)> + 'static )
pub fn mock_InvestmentAccountant_deposit( f: impl Fn(&T::AccountId, (T::PoolId, T::TrancheId), T::Balance) -> DispatchResult + 'static )
pub fn mock_InvestmentAccountant_withdraw( f: impl Fn(&T::AccountId, (T::PoolId, T::TrancheId), T::Balance) -> DispatchResult + 'static )
Trait Implementations
source§impl<T: Config> TrancheTokenPrice<<T as Config>::AccountId, <T as Config>::CurrencyId> for Pallet<T>
impl<T: Config> TrancheTokenPrice<<T as Config>::AccountId, <T as Config>::CurrencyId> for Pallet<T>
source§impl<T: Config> PoolInspect<<T as Config>::AccountId, <T as Config>::CurrencyId> for Pallet<T>
impl<T: Config> PoolInspect<<T as Config>::AccountId, <T as Config>::CurrencyId> for Pallet<T>
type Moment = u64
type PoolId = <T as Config>::PoolId
type TrancheId = <T as Config>::TrancheId
source§fn pool_exists(a: T::PoolId) -> bool
fn pool_exists(a: T::PoolId) -> bool
Check if the pool exists
source§fn tranche_exists(a: T::PoolId, b: T::TrancheId) -> bool
fn tranche_exists(a: T::PoolId, b: T::TrancheId) -> bool
Check if the tranche exists for the given pool
source§fn account_for(a: T::PoolId) -> T::AccountId
fn account_for(a: T::PoolId) -> T::AccountId
Get the account used for the given
pool_id
.source§fn currency_for(a: T::PoolId) -> Option<T::CurrencyId>
fn currency_for(a: T::PoolId) -> Option<T::CurrencyId>
Get the currency used for the given
pool_id
.source§impl<T: Config> IntegrityTest for Pallet<T>
impl<T: Config> IntegrityTest for Pallet<T>
source§fn integrity_test()
fn integrity_test()
See [
Hooks::integrity_test
].source§impl<T: Config> GetStorageVersion for Pallet<T>
impl<T: Config> GetStorageVersion for Pallet<T>
§type CurrentStorageVersion = NoStorageVersionSet
type CurrentStorageVersion = NoStorageVersionSet
source§fn current_storage_version() -> Self::CurrentStorageVersion
fn current_storage_version() -> Self::CurrentStorageVersion
Returns the current storage version as supported by the pallet.
source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
Returns the on-chain storage version of the pallet as stored in the storage.
source§impl<T> PartialEq for Pallet<T>
impl<T> PartialEq for Pallet<T>
source§impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
This function is being called after every block import (when fully synced). Read more
impl<T> Eq for Pallet<T>
source§impl<T: Config> OnRuntimeUpgrade for Pallet<T>
impl<T: Config> OnRuntimeUpgrade for Pallet<T>
source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
See [
Hooks::on_runtime_upgrade
].source§impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
Block initialization hook. This is called at the very beginning of block execution. Read more
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
Block finalization hook. This is called at the very end of block execution. Read more
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hook to consume a block’s idle time. This will run when the block is being finalized (before
[
Hooks::on_finalize
]). Read more§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hook executed when a code change (aka. a “runtime upgrade”) is detected by FRAME. Read more
§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
Implementing this function on a pallet allows you to perform long-running tasks that are
dispatched as separate threads, and entirely independent of the main wasm runtime. Read more
§fn integrity_test()
fn integrity_test()
Check the integrity of this pallet’s configuration. Read more
source§impl<T: Config> PoolReserve<<T as Config>::AccountId, <T as Config>::CurrencyId> for Pallet<T>
impl<T: Config> PoolReserve<<T as Config>::AccountId, <T as Config>::CurrencyId> for Pallet<T>
source§impl<T: Config> WhitelistedStorageKeys for Pallet<T>
impl<T: Config> WhitelistedStorageKeys for Pallet<T>
source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Returns a
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.source§impl<T: Config> OnGenesis for Pallet<T>
impl<T: Config> OnGenesis for Pallet<T>
source§fn on_genesis()
fn on_genesis()
Something that should happen at genesis.
source§impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
impl<T: Config> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>
source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
See [
Hooks::on_finalize
].source§impl<T: Config> InvestmentAccountant<<T as Config>::AccountId> for Pallet<T>
impl<T: Config> InvestmentAccountant<<T as Config>::AccountId> for Pallet<T>
type Amount = <T as Config>::Balance
type Error = DispatchError
type InvestmentId = (<T as Config>::PoolId, <T as Config>::TrancheId)
type InvestmentInfo = InvestmentInfo<<T as Config>::AccountId, <T as Config>::CurrencyId, <Pallet<T> as InvestmentAccountant<<T as Config>::AccountId>>::InvestmentId>
source§fn info(a: Self::InvestmentId) -> Result<Self::InvestmentInfo, DispatchError>
fn info(a: Self::InvestmentId) -> Result<Self::InvestmentInfo, DispatchError>
Information about an asset. Must allow to derive
owner, payment and denomination currency
source§fn balance(a: Self::InvestmentId, b: &T::AccountId) -> Self::Amount
fn balance(a: Self::InvestmentId, b: &T::AccountId) -> Self::Amount
Return the balance of a given user for the given investmnet
source§fn transfer(
a: Self::InvestmentId,
b: &T::AccountId,
c: &T::AccountId,
d: Self::Amount
) -> DispatchResult
fn transfer( a: Self::InvestmentId, b: &T::AccountId, c: &T::AccountId, d: Self::Amount ) -> DispatchResult
Transfer a given investment from source, to destination
source§impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
impl<T: Config> BeforeAllRuntimeMigrations for Pallet<T>
source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Something that should happen before runtime migrations are executed.
source§impl<T: Config> PalletInfoAccess for Pallet<T>
impl<T: Config> PalletInfoAccess for Pallet<T>
source§fn module_name() -> &'static str
fn module_name() -> &'static str
Name of the Rust module containing the pallet.
source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Version of the crate containing the pallet.