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
AvailableSets the account for a given pubkey.
Parameters
pubkey
requiredstring
The public key of the account to update, as a base-58 encoded string.
update
requiredThe 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
AvailableSets the token account for a given pubkey.
Parameters
mint
requiredstring
The public key of the token mint, as a base-58 encoded string.
owner
requiredstring
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
requiredThe 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
AvailableClones a program account for a given pubkey.
Parameters
destinationProgramId
requiredstring
The public key of the destination program, as a base-58 encoded string.
sourceProgramId
requiredstring
The public key of the source program to clone, as a base-58 encoded string.
surfnet_profileTransaction
AvailableProfiles a transaction for a given tag.
Parameters
tag
string (optional)
An optional tag to identify the profiling results.
transactionData
requiredstring
The transaction data to profile, as a base-64 encoded string.
surfnet_getProfileResults
AvailableGets the profile results for a given tag.
Parameters
tag
requiredstring
The tag to retrieve profiling results for.
surfnet_setSupply
AvailableSets the supply for the cluster.
Parameters
update
requiredThe 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.