icondev

> hyperconnect the world _

ICON is a scalable smart contract enabled blockchain platform with a long-term goal of interoperability between enterprise and public blockchains. Our goal is to Hyperconnect the World, and by combining groundbreaking technology, a strong community, and relentless growth strategies we believe this goal is reachable.

Get Started    

Transaction Fee

Transaction fee is calculated as usedStep * stepPrice.

  • Where stepPrice is the ICX exchange rate, and usedStep is the sum of stepCost for each action processed in the transaction.
  • If usedStep reaches the stepLimit before finishing the execution, the transaction will fail with out of step error, but the amount of stepLimit is deducted from your balance.
  • Before executing your transaction, your account must hold at least stepLimit * stepPrice amount of ICX. If you do not have sufficient ICX, your transaction will fail immediately.

You can query the stepCost of each action, the maximum possible stepLimit value you can set, and the stepPrice.

$ cat stepcost.json 
{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "icx_call",
    "params": {
        "to": "cx0000000000000000000000000000000000000001",
        "dataType": "call",
        "data": {
            "method": "getStepCosts"
        }
    }
}

$ curl -H "Content-Type: application/json" -d @stepcost.json https://bicon.net.solidwallet.io/api/v3 
{
    "jsonrpc": "2.0",
    "result": {
        "default": "0x186a0",
        "contractCall": "0x61a8",
        "contractCreate": "0x3b9aca00",
        "contractUpdate": "0x5f5e1000",
        "contractDestruct": "-0x11170",
        "contractSet": "0x7530",
        "get": "0x0",
        "set": "0x140",
        "replace": "0x50",
        "delete": "-0xf0",
        "input": "0xc8",
        "eventLog": "0x64",
        "apiCall": "0x0"
    },
    "id": 1
}
$ cat maxsteplimit.json 
{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "icx_call",
    "params": {
        "to": "cx0000000000000000000000000000000000000001",
        "dataType": "call",
        "data": {
            "method": "getMaxStepLimit",
            "params": {
                "contextType": "invoke"
            }
        }
    }
}

$ curl -H "Content-Type: application/json" -d @maxsteplimit.json https://bicon.net.solidwallet.io/api/v3 
{
    "jsonrpc": "2.0",
    "result": "0x9502f900",
    "id": 2
}
$ cat stepprice.json 
{
    "jsonrpc": "2.0",
    "id": 3,
    "method": "icx_call",
    "params": {
        "to": "cx0000000000000000000000000000000000000001",
        "dataType": "call",
        "data": {
            "method": "getStepPrice"
            }
        }
    }
}

$ curl -H "Content-Type: application/json" -d @stepprice.json https://bicon.net.solidwallet.io/api/v3 
{
    "jsonrpc": "2.0",
    "result": "0x2540be400",
    "id": 3
}