Struct ContractExt

Source
pub struct ContractExt { /* private fields */ }

Implementations§

Source§

impl ContractExt

Source

pub fn create_address( self, address: AccountId, category: Category, risk_score: RiskScore, case_id: CaseId, ) -> Promise

Source

pub fn update_address( self, address: AccountId, category: Category, risk_score: RiskScore, case_id: CaseId, ) -> Promise

Source

pub fn confirm_address(self, address: AccountId) -> Promise

Source§

impl ContractExt

Source

pub fn get_address(self, address: &AccountId) -> Promise

Source

pub fn get_addresses(self, take: u64, skip: u64) -> Promise

Source

pub fn get_address_count(self) -> Promise

Source§

impl ContractExt

Source

pub fn create_asset( self, address: AccountId, id: U64, category: Category, risk_score: RiskScore, case_id: CaseId, ) -> Promise

Source

pub fn update_asset( self, address: AccountId, id: U64, category: Category, risk_score: RiskScore, case_id: CaseId, ) -> Promise

Source

pub fn confirm_asset(self, address: AccountId, id: U64) -> Promise

Source§

impl ContractExt

Source

pub fn get_asset(self, address: AccountId, id: U64) -> Promise

Source

pub fn get_assets(self, take: u64, skip: u64) -> Promise

Source

pub fn get_asset_count(self) -> Promise

Source§

impl ContractExt

Source

pub fn create_case(self, id: CaseId, name: String, url: String) -> Promise

Source

pub fn update_case( self, id: CaseId, name: String, status: CaseStatus, url: String, ) -> Promise

Source§

impl ContractExt

Source

pub fn get_case(self, id: CaseId) -> Promise

Source

pub fn get_cases(self, skip: u64, take: u64) -> Promise

Source

pub fn get_case_count(self) -> Promise

Source§

impl ContractExt

Source

pub fn update_stake_configuration( self, stake_configuration: StakeConfiguration, ) -> Promise

Source

pub fn update_reward_configuration( self, reward_configuration: RewardConfiguration, ) -> Promise

Source

pub fn set_authority(self, authority: AccountId) -> Promise

Source

pub fn get_stake_configuration(self) -> Promise

Source

pub fn get_reward_configuration(self) -> Promise

Source

pub fn get_authority(self) -> Promise

Source§

impl ContractExt

Source

pub fn create_reporter( self, id: ReporterId, account_id: AccountId, name: String, role: Role, url: String, ) -> Promise

Source

pub fn update_reporter( self, id: ReporterId, account_id: AccountId, name: String, role: Role, url: String, ) -> Promise

Source

pub fn deactivate_reporter(self) -> Promise

Source

pub fn unstake(self) -> Promise

Source§

impl ContractExt

Source

pub fn get_reporter(self, id: ReporterId) -> Promise

Source

pub fn get_reporters(self, take: u64, skip: u64) -> Promise

Source

pub fn get_reporter_count(self) -> Promise

Source

pub fn get_reporter_by_account(self, account_id: AccountId) -> Promise

Source§

impl ContractExt

Source

pub fn after_transfer_stake( self, reporter_account: AccountId, amount: U128, ) -> Promise

Source§

impl ContractExt

Source

pub fn ft_on_transfer( self, sender_id: AccountId, amount: U128, msg: String, ) -> Promise

Source§

impl ContractExt

Source

pub fn with_attached_deposit(self, amount: NearToken) -> Self

Source

pub fn with_static_gas(self, static_gas: Gas) -> Self

Source

pub fn with_unused_gas_weight(self, gas_weight: u64) -> Self

Source§

impl ContractExt

Source§

impl ContractExt

Source

pub fn initialize(self) -> Promise

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.