cfx_getSponsorInfo
Returns sponsor information of the given contract
Params
(2)1. addr (required)
string
Match pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
2. epoch_number (required)
U64
(one of)
string or null
Match pattern:
^0x([1-9a-f][0-9a-f]{0,15}|0)$
Result
(cfx_getSponsorInfo_result)availableStoragePoints
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
sponsorBalanceForCollateral
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
sponsorBalanceForGas
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
sponsorForCollateral
stringMatch pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
sponsorForGas
stringMatch pattern:
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$
sponsorGasBound
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
usedStoragePoints
stringMatch pattern:
^0x([1-9a-f][0-9a-f]{0,63}|0)$
Examples
Request
curl -X POST --data \
'{
"method": "cfx_getSponsorInfo",
"params": [
"CFXTEST:TYPE.USER:AATGGCS6J4VMKE5M10WY04SKDZ7D27RDX2CZXKDMY3"
],
"jsonrpc": "2.0",
"id": 1
}' \
-H "Content-Type: application/json" \
localhost:12539
Result
{
"sponsorBalanceForCollateral": "0x0",
"sponsorBalanceForGas": "0x0",
"sponsorForCollateral": "CFXTEST:TYPE.NULL:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6F0VRCSW",
"sponsorForGas": "CFXTEST:TYPE.NULL:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6F0VRCSW",
"sponsorGasBound": "0x0"
}