Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ochaloup/6e4f336b0891f494b562eb80914743b2 to your computer and use it in GitHub Desktop.
Save ochaloup/6e4f336b0891f494b562eb80914743b2 to your computer and use it in GitHub Desktop.
Find validator bonds settlement by stake authority value
// discriminator settlement [55, 11, 219, 33, 36, 136, 40, 182]: AD24AwEsvU5
curl $RPC_URL -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"vBoNdEvzMrSai7is21XgVYik65mqtaKXuSdMBJ1xkW4",
{
"encoding": "base64",
"dataSlice": {
"offset": 0,
"length": 0
},
"filters": [
{
"memcmp": {
"offset": 0,
"bytes": "AD24AwEsvU5",
"encoding": "base58"
}
},
{
"memcmp": {
"offset": 40,
"bytes": "8fQh91sWAtp9HwSrwXPMnpLbYS4Ac54iMgkDPeGhVCPR",
"encoding": "base58"
}
}
]
}
]
}
' | jq '.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment