pub struct PaymentRuntime {
pub setup: PaymentSetup,
pub shared_state: Arc<Mutex<SharedState>>,
pub wake: Arc<Notify>,
pub driver_broadcast_sender: Option<Sender<DriverEvent>>,
pub driver_mpsc_sender: Option<Sender<DriverEvent>>,
pub raw_event_sender: Sender<DriverEvent>,
/* private fields */
}Fields§
§setup: PaymentSetup§wake: Arc<Notify>§driver_broadcast_sender: Option<Sender<DriverEvent>>§driver_mpsc_sender: Option<Sender<DriverEvent>>§raw_event_sender: Sender<DriverEvent>Implementations§
Source§impl PaymentRuntime
impl PaymentRuntime
pub async fn new( payment_runtime_args: PaymentRuntimeArgs, signer: Arc<Box<dyn Signer + Send + Sync + 'static>>, ) -> Result<PaymentRuntime, PaymentError>
pub fn is_any_task_running(&self) -> bool
pub fn is_any_task_finished(&self) -> bool
pub async fn join_tasks(&self) -> Result<(), JoinError>
pub fn abort_tasks(&self)
pub fn add_account( &self, payment_account: SignerAccount, extra_testing: Option<ExtraOptionsForTesting>, options: AdditionalOptions, ) -> bool
pub async fn get_unpaid_token_amount( &self, chain_name: String, sender: Address, ) -> Result<U256, PaymentError>
pub async fn validate_deposit( &self, chain_name: String, deposit_id: DepositId, validate_args: BTreeMap<String, String>, ) -> Result<ValidateDepositResult, PaymentError>
pub async fn deposit_details( &self, chain_name: String, deposit_id: DepositId, ) -> Result<DepositDetails, PaymentError>
pub async fn get_token_balance( &self, chain_name: String, address: Address, block_number: Option<u64>, ) -> Result<GetBalanceResult, PaymentError>
Sourcepub async fn force_check_endpoint_info(
&self,
network: Option<String>,
resolve: bool,
verify: bool,
wait: bool,
) -> Result<(), PaymentError>
pub async fn force_check_endpoint_info( &self, network: Option<String>, resolve: bool, verify: bool, wait: bool, ) -> Result<(), PaymentError>
Force sources and enpoints check depending on input. If wait is set to false, it is nonblocking.
pub fn get_rpc_sources( &self, network: Option<String>, ) -> Result<BTreeMap<String, Web3ExternalSources>, PaymentError>
pub fn get_rpc_endpoints( &self, network: Option<String>, ) -> Result<BTreeMap<String, Vec<Web3FullNodeData>>, PaymentError>
pub async fn transfer_guess_account( &self, transfer_args: TransferArgs, ) -> Result<(), PaymentError>
pub async fn transfer_with_account( &self, account: &SignerAccount, transfer_args: TransferArgs, ) -> Result<(), PaymentError>
pub async fn distribute_gas( &self, chain_name: &str, from: Address, ) -> Result<(), PaymentError>
pub async fn mint_golem_token( &self, chain_name: &str, from: Address, ) -> Result<(), PaymentError>
pub async fn get_status(&self) -> Vec<StatusProperty>
pub fn get_chain(&self, chain_id: i64) -> Option<&ChainSetup>
pub fn network_name(&self, chain_id: i64) -> Option<&str>
pub async fn verify_transaction( &self, chain_id: i64, tx_hash: H256, sender: Address, receiver: Address, amount: U256, ) -> Result<VerifyTransactionResult, PaymentError>
pub async fn close_deposit( &self, chain_name: &str, from: Address, deposit_id: DepositId, ) -> Result<(), PaymentError>
pub fn chains(&self) -> Vec<i64>
Auto Trait Implementations§
impl Freeze for PaymentRuntime
impl !RefUnwindSafe for PaymentRuntime
impl Send for PaymentRuntime
impl Sync for PaymentRuntime
impl Unpin for PaymentRuntime
impl !UnwindSafe for PaymentRuntime
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> 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 more