pub struct Contract { /* private fields */ }
Implementations§
Source§impl Contract
impl Contract
pub fn create_address( &mut self, address: AccountId, category: Category, risk_score: RiskScore, case_id: CaseId, )
pub fn update_address( &mut self, address: AccountId, category: Category, risk_score: RiskScore, case_id: CaseId, )
pub fn confirm_address(&mut self, address: AccountId)
Source§impl Contract
impl Contract
pub fn get_address(&self, address: &AccountId) -> AddressView
pub fn get_addresses(&self, take: u64, skip: u64) -> Vec<AddressView>
pub fn get_address_count(&self) -> u64
Source§impl Contract
impl Contract
pub fn create_asset( &mut self, address: AccountId, id: U64, category: Category, risk_score: RiskScore, case_id: CaseId, )
pub fn update_asset( &mut self, address: AccountId, id: U64, category: Category, risk_score: RiskScore, case_id: CaseId, )
pub fn confirm_asset(&mut self, address: AccountId, id: U64)
Source§impl Contract
impl Contract
pub fn create_case(&mut self, id: CaseId, name: String, url: String)
pub fn update_case( &mut self, id: CaseId, name: String, status: CaseStatus, url: String, )
Source§impl Contract
impl Contract
pub fn update_stake_configuration( &mut self, stake_configuration: StakeConfiguration, )
pub fn update_reward_configuration( &mut self, reward_configuration: RewardConfiguration, )
pub fn get_stake_configuration(&self) -> StakeConfiguration
pub fn get_reward_configuration(&self) -> RewardConfiguration
Source§impl Contract
impl Contract
pub fn create_reporter( &mut self, id: ReporterId, account_id: AccountId, name: String, role: Role, url: String, )
pub fn update_reporter( &mut self, id: ReporterId, account_id: AccountId, name: String, role: Role, url: String, )
pub fn deactivate_reporter(&mut self)
pub fn unstake(&mut self)
Source§impl Contract
impl Contract
pub fn get_reporter(&self, id: ReporterId) -> Reporter
pub fn get_reporters(&self, take: u64, skip: u64) -> Vec<Reporter>
pub fn get_reporter_count(&self) -> u64
pub fn get_reporter_by_account(&self, account_id: AccountId) -> Reporter
Source§impl Contract
impl Contract
Sourcepub fn ext(account_id: AccountId) -> ContractExt
pub fn ext(account_id: AccountId) -> ContractExt
API for calling this contract’s functions in a subsequent execution.
Source§impl Contract
impl Contract
pub fn contract_source_metadata()
Trait Implementations§
Source§impl BorshDeserialize for Contract
impl BorshDeserialize for Contract
fn deserialize_reader<__R: Read>(reader: &mut __R) -> Result<Self, Error>
Source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
Deserializes this instance from a given slice of bytes.
Updates the buffer to point at the remaining bytes.
Source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
Deserialize this instance from a slice of bytes.
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
Source§impl BorshSerialize for Contract
impl BorshSerialize for Contract
Source§impl ExtSelf for Contract
impl ExtSelf for Contract
fn after_transfer_stake(&mut self, reporter_account: AccountId, amount: U128)
Source§impl FungibleTokenReceiver for Contract
impl FungibleTokenReceiver for Contract
Source§fn ft_on_transfer(
&mut self,
sender_id: AccountId,
amount: U128,
msg: String,
) -> PromiseOrValue<U128>
fn ft_on_transfer( &mut self, sender_id: AccountId, amount: U128, msg: String, ) -> PromiseOrValue<U128>
Called by fungible token contract after
ft_transfer_call
was initiated by
sender_id
of the given amount
with the transfer message given in msg
field.
The amount
of tokens were already transferred to this contract account and ready to be used. Read moreAuto Trait Implementations§
impl Freeze for Contract
impl RefUnwindSafe for Contract
impl Send for Contract
impl Sync for Contract
impl Unpin for Contract
impl UnwindSafe for Contract
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