GetSmartContractSubState


Returns the state (or a part specified) of a smart contract address, represented in a JSON format.

Example Request

curl -d '{
"id": "1",
"jsonrpc": "2.0",
"method": "GetSmartContractSubState",
"params": ["fe001824823b12b58708bf24edd94d8b5e1cfcf7","admins",[]]
}' -H "Content-Type: application/json" -X POST "https://api.zilliqa.com/"

Example Response

{
"admins": {
"0xdfa89866ae86632b36361d53b76c1373448c28fa": {
"argtypes": [],
"arguments": [],
"constructor": "True"
}
}
}

HTTP Request

Chain(s)URL(s)
Zilliqa mainnethttps://api.zilliqa.com/
Developer testnethttps://dev-api.zilliqa.com/
Local testnethttp://localhost:4201/
Isolated serverhttp://localhost:5555/

Arguments

ParameterTypeRequiredDescription
idstringRequired"1"
jsonrpcstringRequired"2.0"
methodstringRequired"GetSmartContractSubState"
paramsarrayRequiredState params

State Params

ParameterTypeRequiredDescription
AddressstringRequiredA smart contract address of 20 bytes.
Variable NamestringCan be emptyName of the variable in the Smart Contract
IndicesJSON ArrayCan be emptyIf the variable is of map type, you can specify an index (or indices)

The params is a JSON array.

Example: "params":["fe001824823b12b58708bf24edd94d8b5e1cfcf7","admins",[\"0x9bfec715a6bd658fcb62b0f8cc9bfa2ade71434a\""]]

Note: If Variable Name and Indices Array are both empty, the response would be same as GetSmartContractState