Cheatcode Methods

These special-purpose methods are unique to Surfpool and allow developers to directly modify account and token states. They're invaluable for simulating certain conditions, reproducing edge cases, or setting up specific scenarios without needing full transaction flows.

surfnet_setAccount
Available
Sets the account for a given pubkey.
Parameters
pubkey
required
string
The public key of the account to update, as a base-58 encoded string.
update
required
The account data to update.
data
string (optional)
The new account data, as a hex encoded string.
executable
boolean (optional)
Whether the account should be executable.
lamports
integer (optional)
The new balance in lamports.
owner
string (optional)
The new owner program ID, as a base-58 encoded string.
rentEpoch
integer (optional)
The new rent epoch.

surfnet_setTokenAccount
Available
Sets the token account for a given pubkey.
Parameters
mint
required
string
The public key of the token mint, as a base-58 encoded string.
owner
required
string
The public key of the token account owner, as a base-58 encoded string.
tokenProgram
string (optional)
The token program ID, as a base-58 encoded string.
update
required
The token account data to update.
amount
integer (optional)
The new token balance.
closeAuthority
string (optional)
The new close authority.
delegate
string (optional)
The new delegate account.
delegatedAmount
integer (optional)
The new delegated amount.
state
string (optional)
The new account state (e.g., 'initialized').

surfnet_cloneProgramAccount
Available
Clones a program account for a given pubkey.
Parameters
destinationProgramId
required
string
The public key of the destination program, as a base-58 encoded string.
sourceProgramId
required
string
The public key of the source program to clone, as a base-58 encoded string.

surfnet_profileTransaction
Available
Profiles a transaction for a given tag.
Parameters
tag
string (optional)
An optional tag to identify the profiling results.
transactionData
required
string
The transaction data to profile, as a base-64 encoded string.

surfnet_getProfileResults
Available
Gets the profile results for a given tag.
Parameters
tag
required
string
The tag to retrieve profiling results for.

surfnet_setSupply
Available
Sets the supply for the cluster.
Parameters
update
required
The supply data to update.
circulating
integer (optional)
The new circulating supply.
nonCirculating
integer (optional)
The new non-circulating supply.
nonCirculatingAccounts
array (optional)
The new list of non-circulating accounts.
total
integer (optional)
The new total supply.