Contract Related Methods

hmy_estimateGas

Generates and returns an estimate of how much gas is necessary to allow the transaction to complete. The transaction will not be added to the blockchain.

Method: POST

https://one.nownodes.io

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "hmy_estimateGas",
    "params": [
    ],
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "error": {
        "code": -32602,
        "message": "missing value for required argument 0"
    }
}

hmy_getStorageAt

Returns the value from a storage position at a given address.

Method: POST

https://one.nownodes.io

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "hmy_getStorageAt",
    "params": [
        "0x295a70b2de5e3953354a6a8344e616ed314d7251",
        "0x0",
        "latest"
    ],
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

hmy_call

Executes a new message call immediately without creating a transaction on the block chain.

Method: POST

https://one.nownodes.io

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "hmy_call",
    "params": [
        {
            "to": "0x08AE1abFE01aEA60a47663bCe0794eCCD5763c19"
        },
        "latest"
    ],
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x"
}

hmy_getCode

Get the code at a specific address.

Method: POST

https://one.nownodes.io

Example body (raw)

{
    "jsonrpc": "2.0",
    "method": "hmy_getCode",
    "params": [
        "0x08AE1abFE01aEA60a47663bCe0794eCCD5763c19",
        "latest"
    ],
    "id": 1
}

Example response: 200

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x"
}

Last updated