ICON Transaction Fee
Let's talk about ICON Transaction Fee. They are explained by ICON Foundation https://icon.foundation/?lang=en at
ICON Blockchain Network Transaction fee is calculated as:
usedStep*stepPrice
Where;
stepPriceis the ICX exchange rate,usedStepis the sum ofstepCostfor each action processed in the transaction.
Note that;
if
usedStepreaches thestepLimitbefore finishing the execution, the transaction will of course fail without of step error. However, remember that the amount ofstepLimitwill be deducted from your balance.It is important to know that before executing your transaction, you must have in your account at least
stepLimit*stepPriceamount of ICX. Of course, you know that if you do not have sufficient ICX in your account, then your transaction will fail immediately.
You can always query;
- the
stepCostof each action, - the maximum possible
stepLimitvalue you can set, and - the
stepPrice.
Governance SCORE Address
The governance SCORE Address is: cx0000000000000000000000000000000000000001
Calling Fee Parameters from ICON Testnet
This is the ICON Testnet https://bicon.tracker.solidwallet.io/ . The API endpoint for ICON Testnet is https://bicon.net.solidwallet.io/api/v3 .
getStepCost
Ref: https://github.com/icon-project/governance/blob/master/README.md#getstepcosts
$ 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}
getMaxStepLimit
Ref: https://github.com/icon-project/governance/blob/master/README.md#getmaxsteplimit
$ 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}
getStepPrice
Ref: https://github.com/icon-project/governance/blob/master/README.md#getstepprice
$ 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}
Links/Social
- Web: http://eossweden.eu/
- YouTube: https://www.youtube.com/c/swedencornet
- Telegram: https://t.me/swedencornet
- Linkedin: https://www.linkedin.com/company/eos-sweden/
- Twitter: https://twitter.com/SwedenEos
- Facebook: https://www.facebook.com/cryptpoint
- Steemit: https://steemit.com/@eos.sweden
- Busy.org: https://busy.org/@eos.sweden