Skip to content

Instantly share code, notes, and snippets.

@gallynaut
Created June 29, 2022 20:16
Show Gist options
  • Save gallynaut/360b7b874a5e67098dd50133689ac619 to your computer and use it in GitHub Desktop.
Save gallynaut/360b7b874a5e67098dd50133689ac619 to your computer and use it in GitHub Desktop.
Solend cUSDC Token Price
{
"name": "Solend cUSDC",
"tasks": [
{
"solanaAccountDataFetchTask": {
"pubkey": "BgxfHJDzm44T7XG68MYKx7YisTjZu73tVovyZSjJMpmw"
}
},
{
"cacheTask": {
"cacheItems": [
{
"variableName": "CTOKEN_AVAILABLE_AMOUNT_WADS",
"job": {
"tasks": [
{
"bufferLayoutParseTask": {
"offset": 171,
"endian": 0,
"type": 10
}
},
{
"multiplyTask": {
"scalar": "1000000000000000000"
}
}
]
}
},
{
"variableName": "CTOKEN_TOTAL_BORROWS_WADS",
"job": {
"tasks": [
{
"bufferLayoutParseTask": {
"offset": 179,
"endian": 0,
"type": 13
}
}
]
}
},
{
"variableName": "CTOKEN_MINT_TOTAL_SUPPLY",
"job": {
"tasks": [
{
"bufferLayoutParseTask": {
"offset": 259,
"endian": 0,
"type": 10
}
}
]
}
}
]
}
},
{
"valueTask": {
"big": "${CTOKEN_AVAILABLE_AMOUNT_WADS}"
}
},
{
"addTask": {
"big": "${CTOKEN_TOTAL_BORROWS_WADS}"
}
},
{
"divideTask": {
"big": "${CTOKEN_MINT_TOTAL_SUPPLY}"
}
},
{
"divideTask": {
"big": "1000000000000000000"
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment