1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! Builder types for constructing Surfnet cheatcode RPC payloads.
//!
//! These builders are useful when tests need to express optional parameters
//! incrementally and then execute the request through
//! [`crate::Cheatcodes::execute`].
//!
//! ```rust
//! use surfpool_sdk::{Pubkey, Surfnet};
//! use surfpool_sdk::cheatcodes::builders::SetAccount;
//!
//! # async fn example() {
//! let surfnet = Surfnet::start().await.unwrap();
//! let cheats = surfnet.cheatcodes();
//! let address = Pubkey::new_unique();
//! let owner = Pubkey::new_unique();
//!
//! cheats
//! .execute(
//! SetAccount::new(address)
//! .lamports(1_000_000)
//! .owner(owner)
//! .data(vec![1, 2, 3, 4]),
//! )
//! .unwrap();
//! # }
//! ```
pub use DeployProgram;
pub use ResetAccount;
pub use SetAccount;
pub use SetTokenAccount;
pub use StreamAccount;
/// Trait implemented by typed cheatcode builders.
///
/// `METHOD` is the target Surfnet RPC method, and [`Self::build`] returns
/// the JSON-RPC parameter array for that method.