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
A "cheat code" method for developers to set or update an account in Surfpool. This method allows developers to set or update the lamports, data, owner, executable status, and rent epoch of a given account.
Parameters
pubkey
string
The public key of the account to be updated, as a base-58 encoded string.
update
AccountUpdate
The `AccountUpdate` struct containing the fields to update the account.
surfnet_setTokenAccount
A "cheat code" method for developers to set or update a token account in Surfpool. This method allows developers to set or update various properties of a token account, including the token amount, delegate, state, delegated amount, and close authority.
Parameters
owner
string
The base-58 encoded public key of the token account's owner.
mint
string
The base-58 encoded public key of the token mint (e.g., the token type).
update
TokenAccountUpdate
The `TokenAccountUpdate` struct containing the fields to update the token account.
token_program
string (optional)
The optional base-58 encoded address of the token program (defaults to the system token program).