Skip to content

dev Namespace

The dev API provides a way to manipulate the blockchain state at runtime. This namespace is only accessible when the --dev flag is enabled.


Mines a new block which includes all currently pending transactions.

Method invocation
{ "method": "dev_generateBlock", "params": [] }


Get the timestamp for the next block.

Method invocation
{ "method": "dev_nextBlockTimestamp", "params": [] }


Increase the time for the block by a given amount of time, in seconds.

Method invocation
{ "method": "dev_increaseNextBlockTimestamp", "params": [ amount ] }


Similar to dev_increaseNextBlockTimestamp but takes the exact timestamp that you want in the next block.

Method invocation
{ "method": "dev_setNextBlockTimestamp", "params": [ timestamp ] }