pub struct SurfnetCheatcodesRpc;Trait Implementations§
Source§impl Clone for SurfnetCheatcodesRpc
impl Clone for SurfnetCheatcodesRpc
Source§fn clone(&self) -> SurfnetCheatcodesRpc
fn clone(&self) -> SurfnetCheatcodesRpc
Returns a duplicate 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 moreSource§impl SurfnetCheatcodes for SurfnetCheatcodesRpc
impl SurfnetCheatcodes for SurfnetCheatcodesRpc
Source§fn clone_program_account(
&self,
meta: Self::Metadata,
source_program_id: String,
destination_program_id: String,
) -> BoxFuture<Result<RpcResponse<()>>>
fn clone_program_account( &self, meta: Self::Metadata, source_program_id: String, destination_program_id: String, ) -> BoxFuture<Result<RpcResponse<()>>>
Clones a program account from one program ID to another. A program account contains a pointer to a program data account, which is a PDA derived from the program ID. So, when cloning a program account, we need to clone the program data account as well.
This method will:
- Get the program account for the source program ID.
- Get the program data account for the source program ID.
- Calculate the program data address for the destination program ID.
- Set the destination program account’s data to point to the calculated destination program address.
- Copy the source program data account to the destination program data account.
type Metadata = Option<RunloopContext>
Source§fn set_account(
&self,
meta: Self::Metadata,
pubkey_str: String,
update: AccountUpdate,
) -> BoxFuture<Result<RpcResponse<()>>>
fn set_account( &self, meta: Self::Metadata, pubkey_str: String, update: AccountUpdate, ) -> BoxFuture<Result<RpcResponse<()>>>
A “cheat code” method for developers to set or update an account in Surfpool. Read more
Source§fn set_token_account(
&self,
meta: Self::Metadata,
owner_str: String,
mint_str: String,
update: TokenAccountUpdate,
some_token_program_str: Option<String>,
) -> BoxFuture<Result<RpcResponse<()>>>
fn set_token_account( &self, meta: Self::Metadata, owner_str: String, mint_str: String, update: TokenAccountUpdate, some_token_program_str: Option<String>, ) -> BoxFuture<Result<RpcResponse<()>>>
A “cheat code” method for developers to set or update a token account in Surfpool. Read more
Source§fn profile_transaction(
&self,
meta: Self::Metadata,
transaction_data_b64: String,
tag: Option<String>,
config: Option<RpcProfileResultConfig>,
) -> BoxFuture<Result<RpcResponse<UiKeyedProfileResult>>>
fn profile_transaction( &self, meta: Self::Metadata, transaction_data_b64: String, tag: Option<String>, config: Option<RpcProfileResultConfig>, ) -> BoxFuture<Result<RpcResponse<UiKeyedProfileResult>>>
Estimates the compute units that a given transaction will consume. Read more
Source§fn get_profile_results_by_tag(
&self,
meta: Self::Metadata,
tag: String,
config: Option<RpcProfileResultConfig>,
) -> Result<RpcResponse<Option<Vec<UiKeyedProfileResult>>>>
fn get_profile_results_by_tag( &self, meta: Self::Metadata, tag: String, config: Option<RpcProfileResultConfig>, ) -> Result<RpcResponse<Option<Vec<UiKeyedProfileResult>>>>
Retrieves all profiling results for a given tag. Read more
Source§fn set_supply(
&self,
meta: Self::Metadata,
update: SupplyUpdate,
) -> BoxFuture<Result<RpcResponse<()>>>
fn set_supply( &self, meta: Self::Metadata, update: SupplyUpdate, ) -> BoxFuture<Result<RpcResponse<()>>>
A “cheat code” method for developers to set or update the network supply information in Surfpool. Read more
A cheat code to set the upgrade authority of a program’s ProgramData account. Read more
Source§fn get_transaction_profile(
&self,
meta: Self::Metadata,
signature_or_uuid: UuidOrSignature,
config: Option<RpcProfileResultConfig>,
) -> Result<RpcResponse<Option<UiKeyedProfileResult>>>
fn get_transaction_profile( &self, meta: Self::Metadata, signature_or_uuid: UuidOrSignature, config: Option<RpcProfileResultConfig>, ) -> Result<RpcResponse<Option<UiKeyedProfileResult>>>
A cheat code to get the transaction profile for a given signature or UUID. Read more
Source§fn register_idl(
&self,
meta: Self::Metadata,
idl: Idl,
slot: Option<Slot>,
) -> Result<RpcResponse<()>>
fn register_idl( &self, meta: Self::Metadata, idl: Idl, slot: Option<Slot>, ) -> Result<RpcResponse<()>>
A cheat code to register an IDL for a given program in memory. Read more
Source§fn get_idl(
&self,
meta: Self::Metadata,
program_id: String,
slot: Option<Slot>,
) -> Result<RpcResponse<Option<Idl>>>
fn get_idl( &self, meta: Self::Metadata, program_id: String, slot: Option<Slot>, ) -> Result<RpcResponse<Option<Idl>>>
A cheat code to get the registered IDL for a given program ID. Read more
Source§fn get_local_signatures(
&self,
meta: Self::Metadata,
limit: Option<u64>,
) -> BoxFuture<Result<RpcResponse<Vec<RpcLogsResponse>>>>
fn get_local_signatures( &self, meta: Self::Metadata, limit: Option<u64>, ) -> BoxFuture<Result<RpcResponse<Vec<RpcLogsResponse>>>>
A cheat code to get the last 50 local signatures from the local network. Read more
Source§fn pause_clock(&self, meta: Self::Metadata) -> Result<EpochInfo>
fn pause_clock(&self, meta: Self::Metadata) -> Result<EpochInfo>
A cheat code to freeze the Surfnet clock on the local network.
All time progression halts until resumed. Read more
Source§fn resume_clock(&self, meta: Self::Metadata) -> Result<EpochInfo>
fn resume_clock(&self, meta: Self::Metadata) -> Result<EpochInfo>
A cheat code to resume Solana clock progression after it was paused.
The validator will start producing new slots again. Read more
Source§fn time_travel(
&self,
meta: Self::Metadata,
config: Option<TimeTravelConfig>,
) -> Result<EpochInfo>
fn time_travel( &self, meta: Self::Metadata, config: Option<TimeTravelConfig>, ) -> Result<EpochInfo>
A cheat code to jump forward or backward in time on the local network.
Useful for testing epoch-based or time-sensitive logic. Read more
Source§fn reset_account(
&self,
meta: Self::Metadata,
pubkey: String,
config: Option<ResetAccountConfig>,
) -> Result<RpcResponse<()>>
fn reset_account( &self, meta: Self::Metadata, pubkey: String, config: Option<ResetAccountConfig>, ) -> Result<RpcResponse<()>>
A cheat code to reset an account on the local network. Read more
Source§fn reset_network(
&self,
meta: Self::Metadata,
) -> BoxFuture<Result<RpcResponse<()>>>
fn reset_network( &self, meta: Self::Metadata, ) -> BoxFuture<Result<RpcResponse<()>>>
A cheat code to reset a network. Read more
Source§fn stream_account(
&self,
meta: Self::Metadata,
pubkey_str: String,
config: Option<StreamAccountConfig>,
) -> Result<RpcResponse<()>>
fn stream_account( &self, meta: Self::Metadata, pubkey_str: String, config: Option<StreamAccountConfig>, ) -> Result<RpcResponse<()>>
A cheat code to simulate account streaming.
When a transaction is processed, the accounts that are accessed are downloaded from the datasource and cached in the SVM.
With this method, you can simulate the streaming of accounts by providing a pubkey. Read more
Source§fn get_streamed_accounts(
&self,
meta: Self::Metadata,
) -> Result<RpcResponse<GetStreamedAccountsResponse>>
fn get_streamed_accounts( &self, meta: Self::Metadata, ) -> Result<RpcResponse<GetStreamedAccountsResponse>>
A cheat code to retrieve the streamed accounts.
When a transaction is processed, the accounts that are accessed are downloaded from the datasource and cached in the SVM.
With this method, you can simulate the streaming of accounts by providing a pubkey. Read more
Source§fn get_surfnet_info(
&self,
meta: Self::Metadata,
) -> Result<RpcResponse<GetSurfnetInfoResponse>>
fn get_surfnet_info( &self, meta: Self::Metadata, ) -> Result<RpcResponse<GetSurfnetInfoResponse>>
A cheat code to get Surfnet network information. Read more
Source§fn write_program(
&self,
meta: Self::Metadata,
program_id_str: String,
data_hex: String,
offset: usize,
authority: Option<String>,
) -> BoxFuture<Result<RpcResponse<()>>>
fn write_program( &self, meta: Self::Metadata, program_id_str: String, data_hex: String, offset: usize, authority: Option<String>, ) -> BoxFuture<Result<RpcResponse<()>>>
A “cheat code” method for developers to write program data at a specified offset in Surfpool. Read more
Source§fn export_snapshot(
&self,
meta: Self::Metadata,
config: Option<ExportSnapshotConfig>,
) -> Result<RpcResponse<BTreeMap<String, AccountSnapshot>>>
fn export_snapshot( &self, meta: Self::Metadata, config: Option<ExportSnapshotConfig>, ) -> Result<RpcResponse<BTreeMap<String, AccountSnapshot>>>
A cheat code to export a snapshot of all accounts in the Surfnet SVM. Read more
Source§fn register_scenario(
&self,
meta: Self::Metadata,
scenario: Scenario,
slot: Option<Slot>,
) -> Result<RpcResponse<()>>
fn register_scenario( &self, meta: Self::Metadata, scenario: Scenario, slot: Option<Slot>, ) -> Result<RpcResponse<()>>
A cheat code to register a scenario with account overrides. Read more
Source§fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
fn to_delegate(self) -> IoDelegate<Self, Self::Metadata>
Create an
IoDelegate, wiring rpc calls to the trait methods.Auto Trait Implementations§
impl Freeze for SurfnetCheatcodesRpc
impl RefUnwindSafe for SurfnetCheatcodesRpc
impl Send for SurfnetCheatcodesRpc
impl Sync for SurfnetCheatcodesRpc
impl Unpin for SurfnetCheatcodesRpc
impl UnsafeUnpin for SurfnetCheatcodesRpc
impl UnwindSafe for SurfnetCheatcodesRpc
Blanket Implementations§
Source§impl<T> AggregateExpressionMethods for T
impl<T> AggregateExpressionMethods for T
Source§fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
fn aggregate_distinct(self) -> Self::Outputwhere
Self: DistinctDsl,
DISTINCT modifier for aggregate functions Read moreSource§fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
fn aggregate_all(self) -> Self::Outputwhere
Self: AllDsl,
ALL modifier for aggregate functions Read moreSource§fn aggregate_filter<P>(self, f: P) -> Self::Output
fn aggregate_filter<P>(self, f: P) -> Self::Output
Add an aggregate function filter Read more
Source§fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
fn aggregate_order<O>(self, o: O) -> Self::Outputwhere
Self: OrderAggregateDsl<O>,
Add an aggregate function order Read more
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.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<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self to an expression for Diesel’s query builder. Read moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Pipes by value. This is generally the method you want to use. Read more
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Mutably borrows
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
Borrows
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
Mutably borrows
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
Borrows
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Immutable access to the
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
Mutable access to the
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
Immutable access to the
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
Mutable access to the
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Immutable access to the
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Mutable access to the
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
Calls
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
Calls
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
Calls
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
Calls
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
Calls
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
Calls
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
Calls
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> WindowExpressionMethods for T
impl<T> WindowExpressionMethods for T
Source§fn over(self) -> Self::Outputwhere
Self: OverDsl,
fn over(self) -> Self::Outputwhere
Self: OverDsl,
Turn a function call into a window function call Read more
Source§fn window_filter<P>(self, f: P) -> Self::Output
fn window_filter<P>(self, f: P) -> Self::Output
Add a filter to the current window function Read more
Source§fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
fn partition_by<E>(self, expr: E) -> Self::Outputwhere
Self: PartitionByDsl<E>,
Add a partition clause to the current window function Read more
Source§fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
fn window_order<E>(self, expr: E) -> Self::Outputwhere
Self: OrderWindowDsl<E>,
Add a order clause to the current window function Read more