pub struct StoCallApi<'api> { /* private fields */ }
Implementations§
Source§impl<'api> StoCallApi<'api>
impl<'api> StoCallApi<'api>
Sourcepub fn create_fundraiser(
&self,
offering_portfolio: PortfolioId,
offering_asset: AssetId,
raising_portfolio: PortfolioId,
raising_asset: AssetId,
tiers: Vec<PriceTier>,
venue_id: VenueId,
start: Option<u64>,
end: Option<u64>,
minimum_investment: u128,
fundraiser_name: FundraiserName,
) -> Result<WrappedCall>
pub fn create_fundraiser( &self, offering_portfolio: PortfolioId, offering_asset: AssetId, raising_portfolio: PortfolioId, raising_asset: AssetId, tiers: Vec<PriceTier>, venue_id: VenueId, start: Option<u64>, end: Option<u64>, minimum_investment: u128, fundraiser_name: FundraiserName, ) -> Result<WrappedCall>
Create a new fundraiser.
offering_portfolio
- Portfolio containing theoffering_asset
.offering_asset
- Asset being offered.raising_portfolio
- Portfolio containing theraising_asset
.raising_asset
- Asset being exchanged foroffering_asset
on investment.tiers
- Price tiers to charge investors on investment.venue_id
- Venue to handle settlement.start
- Fundraiser start time, ifNone
the fundraiser will start immediately.end
- Fundraiser end time, ifNone
the fundraiser will never expire.minimum_investment
- Minimum amount ofraising_asset
that an investor needs to spend to invest in this raise.fundraiser_name
- Fundraiser name, only used in the UIs.
§Permissions
- Asset
- Portfolio
Sourcepub fn invest(
&self,
investment_portfolio: PortfolioId,
funding_portfolio: PortfolioId,
offering_asset: AssetId,
id: FundraiserId,
purchase_amount: u128,
max_price: Option<u128>,
receipt: Option<ReceiptDetails<AccountId, MultiSignature>>,
) -> Result<WrappedCall>
pub fn invest( &self, investment_portfolio: PortfolioId, funding_portfolio: PortfolioId, offering_asset: AssetId, id: FundraiserId, purchase_amount: u128, max_price: Option<u128>, receipt: Option<ReceiptDetails<AccountId, MultiSignature>>, ) -> Result<WrappedCall>
Invest in a fundraiser.
investment_portfolio
- Portfolio thatoffering_asset
will be deposited in.funding_portfolio
- Portfolio that will fund the investment.offering_asset
- Asset to invest in.id
- ID of the fundraiser to invest in.purchase_amount
- Amount ofoffering_asset
to purchase.max_price
- Maximum price to pay per unit ofoffering_asset
, IfNone
there are no constraints on price.receipt
- Off-chain receipt to use instead of on-chain balance infunding_portfolio
.
§Permissions
- Portfolio
Sourcepub fn freeze_fundraiser(
&self,
offering_asset: AssetId,
id: FundraiserId,
) -> Result<WrappedCall>
pub fn freeze_fundraiser( &self, offering_asset: AssetId, id: FundraiserId, ) -> Result<WrappedCall>
Freeze a fundraiser.
offering_asset
- Asset to freeze.id
- ID of the fundraiser to freeze.
§Permissions
- Asset
Sourcepub fn unfreeze_fundraiser(
&self,
offering_asset: AssetId,
id: FundraiserId,
) -> Result<WrappedCall>
pub fn unfreeze_fundraiser( &self, offering_asset: AssetId, id: FundraiserId, ) -> Result<WrappedCall>
Unfreeze a fundraiser.
offering_asset
- Asset to unfreeze.id
- ID of the fundraiser to unfreeze.
§Permissions
- Asset
Sourcepub fn modify_fundraiser_window(
&self,
offering_asset: AssetId,
id: FundraiserId,
start: u64,
end: Option<u64>,
) -> Result<WrappedCall>
pub fn modify_fundraiser_window( &self, offering_asset: AssetId, id: FundraiserId, start: u64, end: Option<u64>, ) -> Result<WrappedCall>
Modify the time window a fundraiser is active
offering_asset
- Asset to modify.id
- ID of the fundraiser to modify.start
- New start of the fundraiser.end
- New end of the fundraiser to modify.
§Permissions
- Asset
Sourcepub fn stop(
&self,
offering_asset: AssetId,
id: FundraiserId,
) -> Result<WrappedCall>
pub fn stop( &self, offering_asset: AssetId, id: FundraiserId, ) -> Result<WrappedCall>
Stop a fundraiser.
offering_asset
- Asset to stop.id
- ID of the fundraiser to stop.
§Permissions
- Asset
Trait Implementations§
Source§impl<'api> Clone for StoCallApi<'api>
impl<'api> Clone for StoCallApi<'api>
Source§fn clone(&self) -> StoCallApi<'api>
fn clone(&self) -> StoCallApi<'api>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<'api> Freeze for StoCallApi<'api>
impl<'api> !RefUnwindSafe for StoCallApi<'api>
impl<'api> Send for StoCallApi<'api>
impl<'api> Sync for StoCallApi<'api>
impl<'api> Unpin for StoCallApi<'api>
impl<'api> !UnwindSafe for StoCallApi<'api>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.