Struct poc_framework::RemoteEnvironment [−][src]
pub struct RemoteEnvironment { /* fields omitted */ }Expand description
A remote environment on a cluster. Interacts with the cluster using RPC.
Implementations
Contruct a new remote environment. The payer keypair is expected to have enough funds to fund all transactions.
Construct a new remote environment, airdropping lamports from the given airdrop endpoint up to the given account. Use this on devnet and testnet.
Trait Implementations
Returns the keypair used to pay for all transactions. All transaction fees and rent costs are payed for by this keypair.
Executes the batch of transactions in the right order and waits for them to be confirmed. The execution results are returned.
Fetch a recent blockhash, for construction of transactions.
Fetch the amount of lamports needed for an account of the given size to be rent excempt.
Fetch an account. None if the account does not exist.
fn tx_with_instructions(
&self,
instructions: &[Instruction],
signers: &[&Keypair]
) -> Transaction
fn tx_with_instructions(
&self,
instructions: &[Instruction],
signers: &[&Keypair]
) -> Transaction
Assemble the given instructions into a transaction and sign it. All transactions constructed by this method are signed and payed for by the payer.
fn execute_as_transaction(
&mut self,
instructions: &[Instruction],
signers: &[&Keypair]
) -> EncodedConfirmedTransaction
fn execute_as_transaction(
&mut self,
instructions: &[Instruction],
signers: &[&Keypair]
) -> EncodedConfirmedTransaction
Assemble the given instructions into a transaction and sign it. All transactions executed by this method are signed and payed for by the payer.
fn execute_as_transaction_debug(
&mut self,
instructions: &[Instruction],
signers: &[&Keypair]
) -> EncodedConfirmedTransaction
fn execute_as_transaction_debug(
&mut self,
instructions: &[Instruction],
signers: &[&Keypair]
) -> EncodedConfirmedTransaction
Assemble the given instructions into a transaction and sign it. All transactions executed by this method are signed and payed for by the payer. Prints the transaction before sending it. Read more
Executes a transaction constructing an empty account with the specified amount of space and lamports, owned by the provided program.
Executes a transaction constructing an empty rent-excempt account with the specified amount of space, owned by the provided program.
Executes a transaction constructing a token mint. The account needs to be empty and belong to system for this to work.
Executes a transaction that mints tokens from a mint to an account belonging to that mint.
Executes a transaction constructing a token account of the specified mint. The account needs to be empty and belong to system for this to work. Prefer to use [create_associated_token_account] if you don’t need the provided account to contain the token account. Read more
Executes a transaction constructing the associated token account of the specified mint belonging to the owner. This will fail if the account already exists.
Executes a transaction constructing the associated token account of the specified mint belonging to the owner.
Executes a transaction creating and filling the given account with the given data. The account is required to be empty and will be owned by bpf_loader afterwards. Read more
Executes a transaction deploying a program from a file if it does not already exist. The keypair is derived from the file contents. Read more
Gets and unpacks an account. None if the account does not exist.
Gets and deserializes an account. None if the account does not exist.
fn get_serde_deserialized_account<'a, T: DeserializeOwned>(
&self,
pubkey: Pubkey
) -> Option<T>
fn get_serde_deserialized_account<'a, T: DeserializeOwned>(
&self,
pubkey: Pubkey
) -> Option<T>
Gets and deserializes an account. None if the account does not exist.
Auto Trait Implementations
impl !RefUnwindSafe for RemoteEnvironment
impl Send for RemoteEnvironment
impl Sync for RemoteEnvironment
impl Unpin for RemoteEnvironment
impl !UnwindSafe for RemoteEnvironment
Blanket Implementations
pub default fn example() -> T
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span, returning an
Instrumented wrapper. Read more
type Output = T
type Output = T
Should always be Self