diff --git a/website/docs/blocks.md b/website/docs/blocks.md index 4771f783b..e4f301182 100644 --- a/website/docs/blocks.md +++ b/website/docs/blocks.md @@ -22,24 +22,7 @@ In case of demanding block creation with no pending transactions, a new empty bl The creation of the genesis block is not affected by this feature. -``` -POST /create_block -``` - -``` -JSON-RPC -{ - "jsonrpc": "2.0", - "id": "1", - "method": "devnet_createBlock" -} -``` - -Response: - -``` -{'block_hash': '0x115e1b390cafa7942b6ab141ab85040defe7dee9bef3bc31d8b5b3d01cc9c67'} -``` +The specifications of a block-creating request can be found [below](#request-new-block-creation). ## Automatic periodic block creation @@ -90,6 +73,10 @@ Response: The newly created block will contain all pending transactions, if any, since the last block creation. +### Timestamp manipulation + +To affect the timestamp of the newly created block, check out [this page](./starknet-time#set-time) + ## Abort blocks This functionality allows simulating block abortion that can occur on mainnet. It is supported in the `--state-archive-capacity full` mode. diff --git a/website/docs/forking.md b/website/docs/forking.md index d9413aadf..148a67952 100644 --- a/website/docs/forking.md +++ b/website/docs/forking.md @@ -15,3 +15,7 @@ The value passed to `--fork-network` should be the URL to a Starknet JSON-RPC AP ## Deploying an undeclared account [Here](./predeployed#deploying-an-undeclared-account) you can read about deploying an account not declared on Devnet. + +## Checking forking status + +To see if your Devnet instance is using forking or not, [fetch the current configuration](./api#config-api), and check the `url` property of its `fork_config` property. If Devnet is forked, this property contains the string of the origin URL specified on startup. diff --git a/website/docs/predeployed.md b/website/docs/predeployed.md index 6ff46d3ea..3cc5edfe3 100644 --- a/website/docs/predeployed.md +++ b/website/docs/predeployed.md @@ -35,7 +35,18 @@ If you want to deploy an instance of an account contract class not predeclared o ## How to get predeployment info? -The information on predeployed contracts is logged on Devnet startup. Predeployed accounts can be retrieved in JSON format by sending a `GET` request to `/predeployed_accounts`. With the additional query parameter `with_balance=true`, WEI and FRI balances at the pending state will be provided: +### Logged on startup + +The startup log includes: + +- the addresses and class hashes of predeployed contracts +- the keys and initial balance of predeployed account contracts + +### API + +Account class info can be found in the response to [config request](api#config-api). + +Predeployed account details can be retrieved in JSON format by sending a `GET` request to `/predeployed_accounts` or via JSON-RPC. With the additional query parameter `with_balance` set to `true`, ETH and STRK balances at the pending state will be provided, in WEI and FRI, respectively: ``` GET /predeployed_accounts?[with_balance=true] diff --git a/website/docs/starknet-time.md b/website/docs/starknet-time.md index 39748a884..9972fe0bd 100644 --- a/website/docs/starknet-time.md +++ b/website/docs/starknet-time.md @@ -6,7 +6,7 @@ All values should be set in [Unix time seconds](https://en.wikipedia.org/wiki/Un ## Set time -Sets the exact time and generates a new block. +The following sets the exact time and generates a new block: ``` POST /set_time @@ -27,7 +27,7 @@ JSON-RPC } ``` -Doesn't generate a new block, but sets the exact time for the next generated block. +The following doesn't generate a new block, but sets the exact time for the next generated block: ``` POST /set_time @@ -77,8 +77,8 @@ JSON-RPC ## Start time argument -Devnet can be started with `--start-time` CLI argument, where `START_TIME_IN_SECONDS` should be greater than 0. +Devnet's time can be defined on startup via CLI by providing a positive value to `--start-time`: ``` -$ starknet-devnet --start-time +$ starknet-devnet --start-time ``` diff --git a/website/docusaurus.config.ts b/website/docusaurus.config.ts index 04b76dbb3..48b5e8f4d 100644 --- a/website/docusaurus.config.ts +++ b/website/docusaurus.config.ts @@ -14,6 +14,7 @@ const config: Config = { // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/starknet-devnet-rs/', + trailingSlash: false, // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these.