Skip to content

Commit 336cdaa

Browse files
Seulgi Kimmergify[bot]
authored andcommitted
Add spec about chain_getMinTransactionFee
1 parent 0f6b757 commit 336cdaa

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

spec/JSON-RPC.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ When `Transaction` is included in any response, there will be an additional fiel
299299
* [chain_getShardOwners](#chain_getshardowners)
300300
* [chain_getShardUsers](#chain_getshardusers)
301301
* [chain_getMiningReward](#chain_getminingreward)
302+
* [chain_getMinTransactionFee](#chain_getmintransactionfee)
302303
* [chain_executeTransaction](#chain_executetransaction)
303304
* [chain_executeVM](#chain_executevm)
304305
* [chain_getNetworkId](#chain_getnetworkid)
@@ -1308,6 +1309,38 @@ It returns `null` if the given block number is not mined yet.
13081309

13091310
[Back to **List of methods**](#list-of-methods)
13101311

1312+
# chain_getMinTransactionFee
1313+
Gets the min cost of the transaction.
1314+
It returns null if the first parameter is an invalid transaction type or the second parameter is larger than the current best block.
1315+
1316+
### Params
1317+
1. transaction type - `string`
1318+
2. block number - `number` | `null`
1319+
1320+
### Returns
1321+
`number` | `null`
1322+
1323+
Errors: `Invalid Params`
1324+
1325+
### Request Example
1326+
```
1327+
curl \
1328+
-H 'Content-Type: application/json' \
1329+
-d '{"jsonrpc": "2.0", "method": "chain_getMinTransactionFee", "params": ["pay", 3], "id": 7}' \
1330+
localhost:8080
1331+
```
1332+
1333+
### Response Example
1334+
```
1335+
{
1336+
"jsonrpc":"2.0",
1337+
"result":100,
1338+
"id":7
1339+
}
1340+
```
1341+
1342+
[Back to **List of methods**](#list-of-methods)
1343+
13111344
## chain_executeTransaction
13121345
Executes the transactions and returns whether the execution is successful.
13131346

0 commit comments

Comments
 (0)