-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Issue: I’m deploying a native Solana program via a Surfpool runbook and explicitly providing a Shank-generated IDL. The runbook appears to load and parse the IDL correctly (e.g. intentionally breaking the IDL schema causes Surfpool to error as expected).
However, after invoking an instruction on the deployed program, Surfpool Studio does not deserialize account data. Instead, the account data is shown only as a base64 string in the Pretty tab.
Versions:
shank 0.4.6
solana-program 2.3.0
Steps to reproduce:
- Deploy native program via runbook
action "deploy_seedplex" "svm::deploy_program" {
description = "Deploy seedplex program"
program = svm::get_program_from_native_project("seedplex", "./target/deploy/seedplex-keypair.json", "./idl/seedplex.json")
authority = signer.authority
payer = signer.payer
}
- IDL (seedplex.json)
Below is a shortened version of the IDL containing a single instruction:
{
"version": "0.1.0",
"name": "seedplex",
"instructions": [
{
"name": "InitSeedplexDao",
"accounts": [
{
"name": "seedplexAdmin",
"isMut": true,
"isSigner": true,
"docs": [
"Seedplex admin"
]
},
{
"name": "seedplexDao",
"isMut": true,
"isSigner": false,
"docs": [
"Seedplex DAO"
]
},
{
"name": "adminRecord",
"isMut": true,
"isSigner": false,
"docs": [
"Admin Record"
]
},
{
"name": "systemProgram",
"isMut": false,
"isSigner": false,
"docs": [
"System Program Account"
]
}
],
"args": [
{
"name": "initSeedplexDaoArgs",
"type": {
"defined": "InitSeedplexDaoArgs"
}
}
],
"discriminant": {
"type": "u8",
"value": 0
}
}
],
"accounts": [
{
"name": "AdminRecord",
"type": {
"kind": "struct",
"fields": [
{
"name": "key",
"type": {
"defined": "Key"
}
},
{
"name": "wallet",
"type": "publicKey"
},
{
"name": "bump",
"type": "u8"
}
]
}
},
{
"name": "SeedplexDao",
"type": {
"kind": "struct",
"fields": [
{
"name": "key",
"type": {
"defined": "Key"
}
},
{
"name": "adminMultisig",
"type": "publicKey"
},
{
"name": "bump",
"type": "u8"
}
]
}
}
],
"types": [
{
"name": "InitSeedplexDaoArgs",
"type": {
"kind": "struct",
"fields": [
{
"name": "adminMultisig",
"type": "publicKey"
}
]
}
},
{
"name": "Key",
"type": {
"kind": "enum",
"variants": [
{
"name": "Uninitialized"
},
{
"name": "SeedplexDao"
}
]
}
}
],
"errors": [],
"metadata": {
"origin": "shank",
"address": "sEEDQ9EnkDQGgyvuzMWJrMdnxEGzhvrNFKvLFEPufMD"
}
}
- Invoke instruction
Invoke the InitSeedplexDao instruction.
Actual Behavior
After invocation, Surfpool Studio does not deserialize the program accounts. In the Pretty tab, the account data is displayed only as a base64 string rather than a decoded struct based on the IDL.
Expected Behavior
Account data should be deserialized and displayed according to the IDL definitions (AdminRecord, SeedplexDao) when viewing the account in Surfpool Studio.
Surfpool studio after invoking the InitSeedplexDao instruction
