diff --git a/404.html b/404.html index 21297268e..1cdd54683 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | Starknet Devnet - + diff --git a/assets/js/6d990bb1.f8cd7091.js b/assets/js/6d990bb1.fc12c595.js similarity index 81% rename from assets/js/6d990bb1.f8cd7091.js rename to assets/js/6d990bb1.fc12c595.js index 1a8c7e5b6..3016c5b56 100644 --- a/assets/js/6d990bb1.f8cd7091.js +++ b/assets/js/6d990bb1.fc12c595.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2282],{7164:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"docSidebar":[{"type":"link","label":"Intro","href":"/starknet-devnet-rs/docs/next/intro","docId":"intro","unlisted":false},{"type":"category","label":"Running","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Install and run","href":"/starknet-devnet-rs/docs/next/running/install","docId":"running/install","unlisted":false},{"type":"link","label":"Run with Docker","href":"/starknet-devnet-rs/docs/next/running/docker","docId":"running/docker","unlisted":false},{"type":"link","label":"CLI options","href":"/starknet-devnet-rs/docs/next/running/cli","docId":"running/cli","unlisted":false}],"href":"/starknet-devnet-rs/docs/next/category/running"},{"type":"link","label":"Account impersonation","href":"/starknet-devnet-rs/docs/next/account-impersonation","docId":"account-impersonation","unlisted":false},{"type":"link","label":"API","href":"/starknet-devnet-rs/docs/next/api","docId":"api","unlisted":false},{"type":"link","label":"Account balance","href":"/starknet-devnet-rs/docs/next/balance","docId":"balance","unlisted":false},{"type":"link","label":"Blocks","href":"/starknet-devnet-rs/docs/next/blocks","docId":"blocks","unlisted":false},{"type":"link","label":"Dump, load, restart","href":"/starknet-devnet-rs/docs/next/dump-load-restart","docId":"dump-load-restart","unlisted":false},{"type":"link","label":"Forking","href":"/starknet-devnet-rs/docs/next/forking","docId":"forking","unlisted":false},{"type":"link","label":"Historic state support","href":"/starknet-devnet-rs/docs/next/historic-state","docId":"historic-state","unlisted":false},{"type":"link","label":"Lite mode","href":"/starknet-devnet-rs/docs/next/lite","docId":"lite","unlisted":false},{"type":"link","label":"L1-L2 interaction via Postman","href":"/starknet-devnet-rs/docs/next/postman","docId":"postman","unlisted":false},{"type":"link","label":"Predeployed contracts","href":"/starknet-devnet-rs/docs/next/predeployed","docId":"predeployed","unlisted":false},{"type":"link","label":"Server config","href":"/starknet-devnet-rs/docs/next/server-config","docId":"server-config","unlisted":false},{"type":"link","label":"Starknet time","href":"/starknet-devnet-rs/docs/next/starknet-time","docId":"starknet-time","unlisted":false}]},"docs":{"account-impersonation":{"id":"account-impersonation","title":"Account impersonation","description":"This page is about account impersonation. To read about account class selection and deployment, click here.","sidebar":"docSidebar"},"api":{"id":"api","title":"API","description":"Starknet API","sidebar":"docSidebar"},"balance":{"id":"balance","title":"Account balance","description":"Other than using prefunded predeployed accounts, you can also add funds to an account that you deployed yourself.","sidebar":"docSidebar"},"blocks":{"id":"blocks","title":"Blocks","description":"Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to forked block number plus one.","sidebar":"docSidebar"},"dump-load-restart":{"id":"dump-load-restart","title":"Dump, load, restart","description":"Dumping","sidebar":"docSidebar"},"forking":{"id":"forking","title":"Forking","description":"To interact with contracts deployed on mainnet or testnet, you can use forking. Simulate the origin and experiment with it locally, making no changes to the origin itself.","sidebar":"docSidebar"},"historic-state":{"id":"historic-state","title":"Historic state support","description":"With state archive capacity set to full, Devnet will store full state history, enabling its querying by block hash or number. The default mode is none, where no old states are stored and only the latest is available for querying.","sidebar":"docSidebar"},"intro":{"id":"intro","title":"Intro","description":"- Devnet should not be used as a replacement for official testnets. After testing on Devnet, be sure to test on a testnet (alpha-sepolia)!","sidebar":"docSidebar"},"lite":{"id":"lite","title":"Lite mode","description":"To run Devnet in a minimal lite mode, provide the flag:","sidebar":"docSidebar"},"postman":{"id":"postman","title":"L1-L2 interaction via Postman","description":"Postman is a Starknet utility that allows testing L1-L2 interaction. Ensure you have an L1 node and a Devnet (L2 node) running, load a messaging contract, and flush the queue when needed. You can use starknet-hardhat-plugin to perform these actions, as witnessed in this example, or directly send requests to the endpoints specified below.","sidebar":"docSidebar"},"predeployed":{"id":"predeployed","title":"Predeployed contracts","description":"Devnet predeploys a UDC, an ERC20 (fee token) contract and a set of predeployed funded accounts.","sidebar":"docSidebar"},"running/cli":{"id":"running/cli","title":"CLI options","description":"Check out the CLI options with:","sidebar":"docSidebar"},"running/docker":{"id":"running/docker","title":"Run with Docker","description":"Devnet is available as a Docker image (Docker Hub link). To download the latest image, run:","sidebar":"docSidebar"},"running/install":{"id":"running/install","title":"Install and run","description":"Requirements","sidebar":"docSidebar"},"server-config":{"id":"server-config","title":"Server config","description":"Host and port","sidebar":"docSidebar"},"starknet-time":{"id":"starknet-time","title":"Starknet time","description":"Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods /settime and /increasetime generate a new block. This can be changed for /settime by setting the optional parameter generateblock to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.","sidebar":"docSidebar"}}}}')}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[2282],{7164:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":"unreleased","badge":true,"noIndex":false,"className":"docs-version-current","isLast":false,"docsSidebars":{"docSidebar":[{"type":"link","label":"Intro","href":"/starknet-devnet-rs/docs/next/intro","docId":"intro","unlisted":false},{"type":"category","label":"Running","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Install and run","href":"/starknet-devnet-rs/docs/next/running/install","docId":"running/install","unlisted":false},{"type":"link","label":"Run with Docker","href":"/starknet-devnet-rs/docs/next/running/docker","docId":"running/docker","unlisted":false},{"type":"link","label":"CLI options","href":"/starknet-devnet-rs/docs/next/running/cli","docId":"running/cli","unlisted":false}],"href":"/starknet-devnet-rs/docs/next/category/running"},{"type":"link","label":"Account impersonation","href":"/starknet-devnet-rs/docs/next/account-impersonation","docId":"account-impersonation","unlisted":false},{"type":"link","label":"API","href":"/starknet-devnet-rs/docs/next/api","docId":"api","unlisted":false},{"type":"link","label":"Account balance","href":"/starknet-devnet-rs/docs/next/balance","docId":"balance","unlisted":false},{"type":"link","label":"Blocks","href":"/starknet-devnet-rs/docs/next/blocks","docId":"blocks","unlisted":false},{"type":"link","label":"Dump, load, restart","href":"/starknet-devnet-rs/docs/next/dump-load-restart","docId":"dump-load-restart","unlisted":false},{"type":"link","label":"Forking","href":"/starknet-devnet-rs/docs/next/forking","docId":"forking","unlisted":false},{"type":"link","label":"Historic state support","href":"/starknet-devnet-rs/docs/next/historic-state","docId":"historic-state","unlisted":false},{"type":"link","label":"Lite mode","href":"/starknet-devnet-rs/docs/next/lite","docId":"lite","unlisted":false},{"type":"link","label":"L1-L2 interaction via Postman","href":"/starknet-devnet-rs/docs/next/postman","docId":"postman","unlisted":false},{"type":"link","label":"Predeployed contracts","href":"/starknet-devnet-rs/docs/next/predeployed","docId":"predeployed","unlisted":false},{"type":"link","label":"Server config","href":"/starknet-devnet-rs/docs/next/server-config","docId":"server-config","unlisted":false},{"type":"link","label":"Starknet time","href":"/starknet-devnet-rs/docs/next/starknet-time","docId":"starknet-time","unlisted":false}]},"docs":{"account-impersonation":{"id":"account-impersonation","title":"Account impersonation","description":"This page is about account impersonation. To read about account class selection and deployment, click here.","sidebar":"docSidebar"},"api":{"id":"api","title":"API","description":"Starknet API","sidebar":"docSidebar"},"balance":{"id":"balance","title":"Account balance","description":"Other than using prefunded predeployed accounts, you can also add funds to an account that you deployed yourself.","sidebar":"docSidebar"},"blocks":{"id":"blocks","title":"Blocks","description":"Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to forked block number plus one.","sidebar":"docSidebar"},"dump-load-restart":{"id":"dump-load-restart","title":"Dump, load, restart","description":"Dumping","sidebar":"docSidebar"},"forking":{"id":"forking","title":"Forking","description":"To interact with contracts deployed on mainnet or testnet, you can use forking. Simulate the origin and experiment with it locally, making no changes to the origin itself.","sidebar":"docSidebar"},"historic-state":{"id":"historic-state","title":"Historic state support","description":"With state archive capacity set to full, Devnet will store full state history, enabling its querying by block hash or number. The default mode is none, where no old states are stored and only the latest is available for querying.","sidebar":"docSidebar"},"intro":{"id":"intro","title":"Intro","description":"- Devnet should not be used as a replacement for official testnets. After testing on Devnet, be sure to test on a testnet (alpha-sepolia)!","sidebar":"docSidebar"},"lite":{"id":"lite","title":"Lite mode","description":"To run Devnet in a minimal lite mode, provide the flag:","sidebar":"docSidebar"},"postman":{"id":"postman","title":"L1-L2 interaction via Postman","description":"Postman is a Starknet utility that allows testing L1-L2 interaction. Ensure you have an L1 node and a Devnet (L2 node) running, load a messaging contract, and flush the queue when needed. You can use starknet-hardhat-plugin to perform these actions, as witnessed in this example, or directly send requests to the endpoints specified below.","sidebar":"docSidebar"},"predeployed":{"id":"predeployed","title":"Predeployed contracts","description":"Devnet predeploys a UDC, an ERC20 (fee token) contract and a set of predeployed funded accounts.","sidebar":"docSidebar"},"running/cli":{"id":"running/cli","title":"CLI options","description":"Configure your Devnet instance by specifying CLI parameters on startup.","sidebar":"docSidebar"},"running/docker":{"id":"running/docker","title":"Run with Docker","description":"Devnet is available as a Docker image (Docker Hub link). To download the latest image, run:","sidebar":"docSidebar"},"running/install":{"id":"running/install","title":"Install and run","description":"Requirements","sidebar":"docSidebar"},"server-config":{"id":"server-config","title":"Server config","description":"To read generally about ways to configure your Devnet instance, check out the CLI section.","sidebar":"docSidebar"},"starknet-time":{"id":"starknet-time","title":"Starknet time","description":"Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods /settime and /increasetime generate a new block. This can be changed for /settime by setting the optional parameter generateblock to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.","sidebar":"docSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/b9f7b2ab.4aa13ff2.js b/assets/js/b9f7b2ab.4aa13ff2.js new file mode 100644 index 000000000..54e960015 --- /dev/null +++ b/assets/js/b9f7b2ab.4aa13ff2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5700],{7516:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var i=r(4848),t=r(8453);const s={sidebar_position:2.3},o="CLI options",a={id:"running/cli",title:"CLI options",description:"Configure your Devnet instance by specifying CLI parameters on startup.",source:"@site/docs/running/cli.md",sourceDirName:"running",slug:"/running/cli",permalink:"/starknet-devnet-rs/docs/next/running/cli",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/running/cli.md",tags:[],version:"current",sidebarPosition:2.3,frontMatter:{sidebar_position:2.3},sidebar:"docSidebar",previous:{title:"Run with Docker",permalink:"/starknet-devnet-rs/docs/next/running/docker"},next:{title:"Account impersonation",permalink:"/starknet-devnet-rs/docs/next/account-impersonation"}},c={},l=[{value:"Help",id:"help",level:2},{value:"Environment variables",id:"environment-variables",level:2},{value:"Precedence",id:"precedence",level:3},{value:"Docker",id:"docker",level:3},{value:"Load configuration from a file",id:"load-configuration-from-a-file",level:2},{value:"Docker",id:"docker-1",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"cli-options",children:"CLI options"}),"\n",(0,i.jsx)(n.p,{children:"Configure your Devnet instance by specifying CLI parameters on startup."}),"\n",(0,i.jsx)(n.h2,{id:"help",children:"Help"}),"\n",(0,i.jsx)(n.p,{children:"Check out all the options with:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ starknet-devnet --help\n"})}),"\n",(0,i.jsx)(n.p,{children:"Or if using dockerized Devnet:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ docker run --rm shardlabs/starknet-devnet-rs --help\n"})}),"\n",(0,i.jsx)(n.h2,{id:"environment-variables",children:"Environment variables"}),"\n",(0,i.jsx)(n.p,{children:"Every CLI option can also be specified via an environment variable:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ = = starknet-devnet\n"})}),"\n",(0,i.jsxs)(n.p,{children:["To see the exact variable names, use ",(0,i.jsx)(n.a,{href:"#help",children:(0,i.jsx)(n.code,{children:"--help"})}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"precedence",children:"Precedence"}),"\n",(0,i.jsx)(n.p,{children:"If both a CLI argument and an environment variable are passed for a parameter, the CLI argument takes precedence. If none are provided, the default value is used. E.g. if running Devnet with the following command, seed value 42 will be used:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ SEED=10 starknet-devnet --seed 42\n"})}),"\n",(0,i.jsx)(n.h3,{id:"docker",children:"Docker"}),"\n",(0,i.jsx)(n.p,{children:"If using dockerized Devnet, specify the variables like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ docker run \\\n -e = \\\n -e = \\\n ... \\\n shardlabs/starknet-devnet-rs\n"})}),"\n",(0,i.jsx)(n.h2,{id:"load-configuration-from-a-file",children:"Load configuration from a file"}),"\n",(0,i.jsxs)(n.p,{children:["If providing many configuration parameters in a single command becomes cumbersome, consider loading them from a file. By relying on ",(0,i.jsx)(n.a,{href:"#environment-variables",children:"environment variables"}),", prepare your configuration in a file like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"export SEED=42\nexport ACCOUNTS=3\n...\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Assuming the file is called ",(0,i.jsx)(n.code,{children:".my-env-file"}),", then run:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"$ source .my-env-file && starknet-devnet\n"})}),"\n",(0,i.jsx)(n.p,{children:"To run in a subshell and prevent environment pollution (i.e. to unset the variables after Devnet exits), use parentheses:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"$ ( source .my-env-file && starknet-devnet )\n"})}),"\n",(0,i.jsx)(n.h3,{id:"docker-1",children:"Docker"}),"\n",(0,i.jsxs)(n.p,{children:["To load environment variables from ",(0,i.jsx)(n.code,{children:".my-env-file"})," with Docker, remove the ",(0,i.jsx)(n.code,{children:"export"})," part in each line to have the file look like this:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"SEED=42\nACCOUNTS=3\n...\n"})}),"\n",(0,i.jsx)(n.p,{children:"Then run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ docker run --env-file .my-env-file shardlabs/starknet-devnet-rs\n"})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>a});var i=r(6540);const t={},s=i.createContext(t);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b9f7b2ab.64cf4bd1.js b/assets/js/b9f7b2ab.64cf4bd1.js deleted file mode 100644 index 40e8e05e5..000000000 --- a/assets/js/b9f7b2ab.64cf4bd1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5700],{7516:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var r=t(4848),o=t(8453);const i={sidebar_position:2.3},s="CLI options",c={id:"running/cli",title:"CLI options",description:"Check out the CLI options with:",source:"@site/docs/running/cli.md",sourceDirName:"running",slug:"/running/cli",permalink:"/starknet-devnet-rs/docs/next/running/cli",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/running/cli.md",tags:[],version:"current",sidebarPosition:2.3,frontMatter:{sidebar_position:2.3},sidebar:"docSidebar",previous:{title:"Run with Docker",permalink:"/starknet-devnet-rs/docs/next/running/docker"},next:{title:"Account impersonation",permalink:"/starknet-devnet-rs/docs/next/account-impersonation"}},d={},a=[];function u(e){const n={code:"code",h1:"h1",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"cli-options",children:"CLI options"}),"\n",(0,r.jsx)(n.p,{children:"Check out the CLI options with:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --help\n"})}),"\n",(0,r.jsx)(n.p,{children:"Or if using dockerized Devnet:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ docker run --rm shardlabs/starknet-devnet-rs --help\n"})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>c});var r=t(6540);const o={},i=r.createContext(o);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e28eadbb.28dbb1f2.js b/assets/js/e28eadbb.28dbb1f2.js new file mode 100644 index 000000000..7ab127108 --- /dev/null +++ b/assets/js/e28eadbb.28dbb1f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3332],{1498:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var r=t(4848),s=t(8453);const i={},o="Server config",d={id:"server-config",title:"Server config",description:"To read generally about ways to configure your Devnet instance, check out the CLI section.",source:"@site/docs/server-config.md",sourceDirName:".",slug:"/server-config",permalink:"/starknet-devnet-rs/docs/next/server-config",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/server-config.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Predeployed contracts",permalink:"/starknet-devnet-rs/docs/next/predeployed"},next:{title:"Starknet time",permalink:"/starknet-devnet-rs/docs/next/starknet-time"}},c={},l=[{value:"Host and port",id:"host-and-port",level:2},{value:"Logging",id:"logging",level:2},{value:"Timeout",id:"timeout",level:2},{value:"Request body size limit",id:"request-body-size-limit",level:2},{value:"API",id:"api",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"server-config",children:"Server config"}),"\n",(0,r.jsxs)(n.p,{children:["To read generally about ways to configure your Devnet instance, check out the ",(0,r.jsx)(n.a,{href:"/starknet-devnet-rs/docs/next/running/cli",children:"CLI section"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"host-and-port",children:"Host and port"}),"\n",(0,r.jsxs)(n.p,{children:["Specify the host and the port used by the server with ",(0,r.jsx)(n.code,{children:"--host
"})," and ",(0,r.jsx)(n.code,{children:"--port "})," CLI arguments. If running with Docker, check out the ",(0,r.jsx)(n.a,{href:"./running/docker#container-port-publishing",children:"port publishing docs"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"logging",children:"Logging"}),"\n",(0,r.jsxs)(n.p,{children:["By default, the logging level is ",(0,r.jsx)(n.code,{children:"INFO"}),", but this can be changed via the ",(0,r.jsx)(n.code,{children:"RUST_LOG"})," environment variable."]}),"\n",(0,r.jsxs)(n.p,{children:["All logging levels: ",(0,r.jsx)(n.code,{children:"TRACE"}),", ",(0,r.jsx)(n.code,{children:"DEBUG"}),", ",(0,r.jsx)(n.code,{children:"INFO"}),", ",(0,r.jsx)(n.code,{children:"WARN"}),", ",(0,r.jsx)(n.code,{children:"ERROR"})]}),"\n",(0,r.jsx)(n.p,{children:"To specify the logging level and run Devnet on the same line:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ RUST_LOG= starknet-devnet\n"})}),"\n",(0,r.jsx)(n.p,{children:"or if using dockerized Devnet:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ docker run -e RUST_LOG= shardlabs/starknet-devnet-rs\n"})}),"\n",(0,r.jsxs)(n.p,{children:["By default, logging of request and response data is turned off.\nTo see the request and/or response body, additional levels can be specified via the ",(0,r.jsx)(n.code,{children:"RUST_LOG"})," environment variable: ",(0,r.jsx)(n.code,{children:"REQUEST"})," for request body, ",(0,r.jsx)(n.code,{children:"RESPONSE"})," for response body."]}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:["Logging request and response requires at least logging level ",(0,r.jsx)(n.code,{children:"INFO"}),"."]}),(0,r.jsxs)(n.p,{children:["For example, the following two commands will log request and response data with log level ",(0,r.jsx)(n.code,{children:"INFO"}),"."]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'$ RUST_LOG="REQUEST,RESPONSE" starknet-devnet\n'})}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'$ RUST_LOG="REQUEST,RESPONSE,INFO" starknet-devnet\n'})})]}),"\n",(0,r.jsx)(n.h2,{id:"timeout",children:"Timeout"}),"\n",(0,r.jsx)(n.p,{children:"Specify the maximum amount of time an HTTP request can be served. This makes it possible to deploy and manage large contracts that take longer to execute."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --timeout \n"})}),"\n",(0,r.jsx)(n.h2,{id:"request-body-size-limit",children:"Request body size limit"}),"\n",(0,r.jsx)(n.p,{children:"Specify the maximum size of an incoming HTTP request body. This makes it possible to deploy and manage large contracts that take up more space."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --request-body-size-limit \n"})}),"\n",(0,r.jsx)(n.h2,{id:"api",children:"API"}),"\n",(0,r.jsxs)(n.p,{children:["Retrieve the server config by sending a ",(0,r.jsx)(n.code,{children:"GET"})," request to ",(0,r.jsx)(n.code,{children:"/config"})," and extracting its ",(0,r.jsx)(n.code,{children:"server_config"})," property."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ curl localhost:5050/config | jq .server_config\n"})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>d});var r=t(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e28eadbb.4dd57af2.js b/assets/js/e28eadbb.4dd57af2.js deleted file mode 100644 index 1781614dc..000000000 --- a/assets/js/e28eadbb.4dd57af2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[3332],{1498:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>l});var r=t(4848),s=t(8453);const i={},o="Server config",d={id:"server-config",title:"Server config",description:"Host and port",source:"@site/docs/server-config.md",sourceDirName:".",slug:"/server-config",permalink:"/starknet-devnet-rs/docs/next/server-config",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/server-config.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Predeployed contracts",permalink:"/starknet-devnet-rs/docs/next/predeployed"},next:{title:"Starknet time",permalink:"/starknet-devnet-rs/docs/next/starknet-time"}},c={},l=[{value:"Host and port",id:"host-and-port",level:2},{value:"Logging",id:"logging",level:2},{value:"Timeout",id:"timeout",level:2},{value:"Request body size limit",id:"request-body-size-limit",level:2},{value:"API",id:"api",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"server-config",children:"Server config"}),"\n",(0,r.jsx)(n.h2,{id:"host-and-port",children:"Host and port"}),"\n",(0,r.jsxs)(n.p,{children:["Specify the host and the port used by the server with ",(0,r.jsx)(n.code,{children:"--host
"})," and ",(0,r.jsx)(n.code,{children:"--port "})," CLI arguments. If running with Docker, check out the ",(0,r.jsx)(n.a,{href:"./running/docker#container-port-publishing",children:"port publishing docs"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"logging",children:"Logging"}),"\n",(0,r.jsxs)(n.p,{children:["By default, the logging level is ",(0,r.jsx)(n.code,{children:"INFO"}),", but this can be changed via the ",(0,r.jsx)(n.code,{children:"RUST_LOG"})," environment variable."]}),"\n",(0,r.jsxs)(n.p,{children:["All logging levels: ",(0,r.jsx)(n.code,{children:"TRACE"}),", ",(0,r.jsx)(n.code,{children:"DEBUG"}),", ",(0,r.jsx)(n.code,{children:"INFO"}),", ",(0,r.jsx)(n.code,{children:"WARN"}),", ",(0,r.jsx)(n.code,{children:"ERROR"})]}),"\n",(0,r.jsx)(n.p,{children:"To specify the logging level and run Devnet on the same line:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ RUST_LOG= starknet-devnet\n"})}),"\n",(0,r.jsx)(n.p,{children:"or if using dockerized Devnet:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ docker run -e RUST_LOG= shardlabs/starknet-devnet-rs\n"})}),"\n",(0,r.jsxs)(n.p,{children:["By default, logging of request and response data is turned off.\nTo see the request and/or response body, additional levels can be specified via the ",(0,r.jsx)(n.code,{children:"RUST_LOG"})," environment variable: ",(0,r.jsx)(n.code,{children:"REQUEST"})," for request body, ",(0,r.jsx)(n.code,{children:"RESPONSE"})," for response body."]}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:["Logging request and response requires at least logging level ",(0,r.jsx)(n.code,{children:"INFO"}),"."]}),(0,r.jsxs)(n.p,{children:["For example, the following two commands will log request and response data with log level ",(0,r.jsx)(n.code,{children:"INFO"}),"."]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'$ RUST_LOG="REQUEST,RESPONSE" starknet-devnet\n'})}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'$ RUST_LOG="REQUEST,RESPONSE,INFO" starknet-devnet\n'})})]}),"\n",(0,r.jsx)(n.h2,{id:"timeout",children:"Timeout"}),"\n",(0,r.jsx)(n.p,{children:"Specify the maximum amount of time an HTTP request can be served. This makes it possible to deploy and manage large contracts that take longer to execute."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --timeout \n"})}),"\n",(0,r.jsx)(n.h2,{id:"request-body-size-limit",children:"Request body size limit"}),"\n",(0,r.jsx)(n.p,{children:"Specify the maximum size of an incoming HTTP request body. This makes it possible to deploy and manage large contracts that take up more space."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --request-body-size-limit \n"})}),"\n",(0,r.jsx)(n.h2,{id:"api",children:"API"}),"\n",(0,r.jsxs)(n.p,{children:["Retrieve the server config by sending a ",(0,r.jsx)(n.code,{children:"GET"})," request to ",(0,r.jsx)(n.code,{children:"/config"})," and extracting its ",(0,r.jsx)(n.code,{children:"server_config"})," property."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ curl localhost:5050/config | jq .server_config\n"})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>d});var r=t(6540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.a8c11852.js b/assets/js/runtime~main.a8c11852.js new file mode 100644 index 000000000..16b383442 --- /dev/null +++ b/assets/js/runtime~main.a8c11852.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,a,t,b,r,c={},f={};function d(e){var a=f[e];if(void 0!==a)return a.exports;var t=f[e]={id:e,loaded:!1,exports:{}};return c[e].call(t.exports,t,t.exports,d),t.loaded=!0,t.exports}d.m=c,d.c=f,e=[],d.O=(a,t,b,r)=>{if(!t){var c=1/0;for(i=0;i=r)&&Object.keys(d.O).every((e=>d.O[e](t[o])))?t.splice(o--,1):(f=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[t,b,r]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,b){if(1&b&&(e=this(e)),8&b)return e;if("object"==typeof e&&e){if(4&b&&e.__esModule)return e;if(16&b&&"function"==typeof e.then)return e}var r=Object.create(null);d.r(r);var c={};a=a||[null,t({}),t([]),t(t)];for(var f=2&b&&e;"object"==typeof f&&!~a.indexOf(f);f=t(f))Object.getOwnPropertyNames(f).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,d.d(r,c),r},d.d=(e,a)=>{for(var t in a)d.o(a,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,t)=>(d.f[t](e,a),a)),[])),d.u=e=>"assets/js/"+({134:"b7bb6147",337:"3f194bb7",463:"682c6856",562:"5fadd32f",598:"c25a813d",646:"7b998695",952:"2d66ba60",1235:"a7456010",1316:"1b560adb",1527:"778bcc8b",1863:"b4513eec",1914:"1151f991",2282:"6d990bb1",2627:"4769fc4e",2871:"3c883fc4",3332:"e28eadbb",3956:"a0ea14c4",3976:"0e384e19",4134:"393be207",4290:"ae603a5f",4583:"1df93b7f",4676:"24503201",4876:"17682634",5120:"a5ad27b1",5186:"b0477c6d",5480:"80526ee6",5700:"b9f7b2ab",5742:"aba21aa0",5771:"8f2e4180",5960:"0657c530",6061:"1f391b9e",6187:"e44e17f8",6828:"9976ff42",6900:"cc3979e2",6969:"14eb3368",7098:"a7bd4aaa",7229:"eb78b783",7230:"93f75803",7624:"5fbc5cf1",8401:"17896441",8626:"bca784a7",9048:"a94703ab",9218:"cc2baa30",9378:"5b870ab8",9440:"8d820236",9647:"5e95c892"}[e]||e)+"."+{134:"7b643943",337:"0144ea02",463:"a9ba8ef1",562:"526f0254",598:"3c832b8e",646:"ba2beb82",952:"5554bca5",1235:"7b4b0a20",1316:"6c6b1f0e",1527:"dd9974ab",1863:"2a54a4d3",1914:"2cdeffc0",2237:"ede9a640",2282:"fc12c595",2627:"1c15b3f8",2871:"36877ea9",3332:"28dbb1f2",3658:"e4ca47ec",3956:"94e319da",3976:"5aa906b8",4134:"030d51d7",4290:"4890b38d",4583:"f182b925",4676:"bb859ed4",4876:"7fb54312",5120:"67d97cd9",5186:"e14ade79",5480:"ba93d316",5700:"4aa13ff2",5742:"9ac6642b",5771:"6fb725c9",5960:"aa8fdf00",6061:"68f8d4d4",6187:"c49d81b4",6828:"efe8bc09",6900:"f2efdc37",6969:"eeb6b7e2",7098:"b82ee0df",7229:"33a8bdeb",7230:"ce271db6",7624:"8e7fc6bf",8401:"4295b40f",8626:"0345585f",9048:"2668bc5b",9218:"c2a5635a",9378:"c92e0a02",9440:"d1300806",9647:"b1f5748f"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),b={},r="website:",d.l=(e,a,t,c)=>{if(b[e])b[e].push(a);else{var f,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var r=b[e];if(delete b[e],f.parentNode&&f.parentNode.removeChild(f),r&&r.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),o&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/starknet-devnet-rs/",d.gca=function(e){return e={17682634:"4876",17896441:"8401",24503201:"4676",b7bb6147:"134","3f194bb7":"337","682c6856":"463","5fadd32f":"562",c25a813d:"598","7b998695":"646","2d66ba60":"952",a7456010:"1235","1b560adb":"1316","778bcc8b":"1527",b4513eec:"1863","1151f991":"1914","6d990bb1":"2282","4769fc4e":"2627","3c883fc4":"2871",e28eadbb:"3332",a0ea14c4:"3956","0e384e19":"3976","393be207":"4134",ae603a5f:"4290","1df93b7f":"4583",a5ad27b1:"5120",b0477c6d:"5186","80526ee6":"5480",b9f7b2ab:"5700",aba21aa0:"5742","8f2e4180":"5771","0657c530":"5960","1f391b9e":"6061",e44e17f8:"6187","9976ff42":"6828",cc3979e2:"6900","14eb3368":"6969",a7bd4aaa:"7098",eb78b783:"7229","93f75803":"7230","5fbc5cf1":"7624",bca784a7:"8626",a94703ab:"9048",cc2baa30:"9218","5b870ab8":"9378","8d820236":"9440","5e95c892":"9647"}[e]||e,d.p+d.u(e)},(()=>{var e={5354:0,1869:0};d.f.j=(a,t)=>{var b=d.o(e,a)?e[a]:void 0;if(0!==b)if(b)t.push(b[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var r=new Promise(((t,r)=>b=e[a]=[t,r]));t.push(b[2]=r);var c=d.p+d.u(a),f=new Error;d.l(c,(t=>{if(d.o(e,a)&&(0!==(b=e[a])&&(e[a]=void 0),b)){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;f.message="Loading chunk "+a+" failed.\n("+r+": "+c+")",f.name="ChunkLoadError",f.type=r,f.request=c,b[1](f)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,t)=>{var b,r,c=t[0],f=t[1],o=t[2],n=0;if(c.some((a=>0!==e[a]))){for(b in f)d.o(f,b)&&(d.m[b]=f[b]);if(o)var i=o(d)}for(a&&a(t);n{"use strict";var e,a,t,b,r,c={},d={};function f(e){var a=d[e];if(void 0!==a)return a.exports;var t=d[e]={id:e,loaded:!1,exports:{}};return c[e].call(t.exports,t,t.exports,f),t.loaded=!0,t.exports}f.m=c,f.c=d,e=[],f.O=(a,t,b,r)=>{if(!t){var c=1/0;for(i=0;i=r)&&Object.keys(f.O).every((e=>f.O[e](t[o])))?t.splice(o--,1):(d=!1,r0&&e[i-1][2]>r;i--)e[i]=e[i-1];e[i]=[t,b,r]},f.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return f.d(a,{a:a}),a},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,b){if(1&b&&(e=this(e)),8&b)return e;if("object"==typeof e&&e){if(4&b&&e.__esModule)return e;if(16&b&&"function"==typeof e.then)return e}var r=Object.create(null);f.r(r);var c={};a=a||[null,t({}),t([]),t(t)];for(var d=2&b&&e;"object"==typeof d&&!~a.indexOf(d);d=t(d))Object.getOwnPropertyNames(d).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,f.d(r,c),r},f.d=(e,a)=>{for(var t in a)f.o(a,t)&&!f.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce(((a,t)=>(f.f[t](e,a),a)),[])),f.u=e=>"assets/js/"+({134:"b7bb6147",337:"3f194bb7",463:"682c6856",562:"5fadd32f",598:"c25a813d",646:"7b998695",952:"2d66ba60",1235:"a7456010",1316:"1b560adb",1527:"778bcc8b",1863:"b4513eec",1914:"1151f991",2282:"6d990bb1",2627:"4769fc4e",2871:"3c883fc4",3332:"e28eadbb",3956:"a0ea14c4",3976:"0e384e19",4134:"393be207",4290:"ae603a5f",4583:"1df93b7f",4676:"24503201",4876:"17682634",5120:"a5ad27b1",5186:"b0477c6d",5480:"80526ee6",5700:"b9f7b2ab",5742:"aba21aa0",5771:"8f2e4180",5960:"0657c530",6061:"1f391b9e",6187:"e44e17f8",6828:"9976ff42",6900:"cc3979e2",6969:"14eb3368",7098:"a7bd4aaa",7229:"eb78b783",7230:"93f75803",7624:"5fbc5cf1",8401:"17896441",8626:"bca784a7",9048:"a94703ab",9218:"cc2baa30",9378:"5b870ab8",9440:"8d820236",9647:"5e95c892"}[e]||e)+"."+{134:"7b643943",337:"0144ea02",463:"a9ba8ef1",562:"526f0254",598:"3c832b8e",646:"ba2beb82",952:"5554bca5",1235:"7b4b0a20",1316:"6c6b1f0e",1527:"dd9974ab",1863:"2a54a4d3",1914:"2cdeffc0",2237:"ede9a640",2282:"f8cd7091",2627:"1c15b3f8",2871:"36877ea9",3332:"4dd57af2",3658:"e4ca47ec",3956:"94e319da",3976:"5aa906b8",4134:"030d51d7",4290:"4890b38d",4583:"f182b925",4676:"bb859ed4",4876:"7fb54312",5120:"67d97cd9",5186:"e14ade79",5480:"ba93d316",5700:"64cf4bd1",5742:"9ac6642b",5771:"6fb725c9",5960:"aa8fdf00",6061:"68f8d4d4",6187:"c49d81b4",6828:"efe8bc09",6900:"f2efdc37",6969:"eeb6b7e2",7098:"b82ee0df",7229:"33a8bdeb",7230:"ce271db6",7624:"8e7fc6bf",8401:"4295b40f",8626:"0345585f",9048:"2668bc5b",9218:"c2a5635a",9378:"c92e0a02",9440:"d1300806",9647:"b1f5748f"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),b={},r="website:",f.l=(e,a,t,c)=>{if(b[e])b[e].push(a);else{var d,o;if(void 0!==t)for(var n=document.getElementsByTagName("script"),i=0;i{d.onerror=d.onload=null,clearTimeout(s);var r=b[e];if(delete b[e],d.parentNode&&d.parentNode.removeChild(d),r&&r.forEach((e=>e(t))),a)return a(t)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=l.bind(null,d.onerror),d.onload=l.bind(null,d.onload),o&&document.head.appendChild(d)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/starknet-devnet-rs/",f.gca=function(e){return e={17682634:"4876",17896441:"8401",24503201:"4676",b7bb6147:"134","3f194bb7":"337","682c6856":"463","5fadd32f":"562",c25a813d:"598","7b998695":"646","2d66ba60":"952",a7456010:"1235","1b560adb":"1316","778bcc8b":"1527",b4513eec:"1863","1151f991":"1914","6d990bb1":"2282","4769fc4e":"2627","3c883fc4":"2871",e28eadbb:"3332",a0ea14c4:"3956","0e384e19":"3976","393be207":"4134",ae603a5f:"4290","1df93b7f":"4583",a5ad27b1:"5120",b0477c6d:"5186","80526ee6":"5480",b9f7b2ab:"5700",aba21aa0:"5742","8f2e4180":"5771","0657c530":"5960","1f391b9e":"6061",e44e17f8:"6187","9976ff42":"6828",cc3979e2:"6900","14eb3368":"6969",a7bd4aaa:"7098",eb78b783:"7229","93f75803":"7230","5fbc5cf1":"7624",bca784a7:"8626",a94703ab:"9048",cc2baa30:"9218","5b870ab8":"9378","8d820236":"9440","5e95c892":"9647"}[e]||e,f.p+f.u(e)},(()=>{var e={5354:0,1869:0};f.f.j=(a,t)=>{var b=f.o(e,a)?e[a]:void 0;if(0!==b)if(b)t.push(b[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var r=new Promise(((t,r)=>b=e[a]=[t,r]));t.push(b[2]=r);var c=f.p+f.u(a),d=new Error;f.l(c,(t=>{if(f.o(e,a)&&(0!==(b=e[a])&&(e[a]=void 0),b)){var r=t&&("load"===t.type?"missing":t.type),c=t&&t.target&&t.target.src;d.message="Loading chunk "+a+" failed.\n("+r+": "+c+")",d.name="ChunkLoadError",d.type=r,d.request=c,b[1](d)}}),"chunk-"+a,a)}},f.O.j=a=>0===e[a];var a=(a,t)=>{var b,r,c=t[0],d=t[1],o=t[2],n=0;if(c.some((a=>0!==e[a]))){for(b in d)f.o(d,b)&&(f.m[b]=d[b]);if(o)var i=o(f)}for(a&&a(t);n Account impersonation | Starknet Devnet - + diff --git a/docs/api/index.html b/docs/api/index.html index 784696c4e..4c5e7e658 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/balance/index.html b/docs/balance/index.html index 74ec8f51c..3529845d2 100644 --- a/docs/balance/index.html +++ b/docs/balance/index.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/blocks/index.html b/docs/blocks/index.html index fa9ca9f52..e075dc88d 100644 --- a/docs/blocks/index.html +++ b/docs/blocks/index.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/category/running/index.html b/docs/category/running/index.html index c82a13bf5..1268eecc2 100644 --- a/docs/category/running/index.html +++ b/docs/category/running/index.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/dump-load-restart/index.html b/docs/dump-load-restart/index.html index 443539ebe..e0656d595 100644 --- a/docs/dump-load-restart/index.html +++ b/docs/dump-load-restart/index.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/forking/index.html b/docs/forking/index.html index 39f88f1fa..da08883aa 100644 --- a/docs/forking/index.html +++ b/docs/forking/index.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/historic-state/index.html b/docs/historic-state/index.html index ca89fa105..3b1b22258 100644 --- a/docs/historic-state/index.html +++ b/docs/historic-state/index.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/intro/index.html b/docs/intro/index.html index 33d48a38a..780b8eec3 100644 --- a/docs/intro/index.html +++ b/docs/intro/index.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/lite/index.html b/docs/lite/index.html index 12a40cf41..55ec9df39 100644 --- a/docs/lite/index.html +++ b/docs/lite/index.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/next/account-impersonation/index.html b/docs/next/account-impersonation/index.html index 45f3cdaea..ae87824ab 100644 --- a/docs/next/account-impersonation/index.html +++ b/docs/next/account-impersonation/index.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/next/api/index.html b/docs/next/api/index.html index 936720a09..47b1816fa 100644 --- a/docs/next/api/index.html +++ b/docs/next/api/index.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/next/balance/index.html b/docs/next/balance/index.html index 7ab089a8f..e5f154ffb 100644 --- a/docs/next/balance/index.html +++ b/docs/next/balance/index.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/next/blocks/index.html b/docs/next/blocks/index.html index ecadee626..c25e61c6a 100644 --- a/docs/next/blocks/index.html +++ b/docs/next/blocks/index.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/next/category/running/index.html b/docs/next/category/running/index.html index 07547c240..5e73f850a 100644 --- a/docs/next/category/running/index.html +++ b/docs/next/category/running/index.html @@ -4,10 +4,10 @@ Running | Starknet Devnet - + - + \ No newline at end of file diff --git a/docs/next/dump-load-restart/index.html b/docs/next/dump-load-restart/index.html index 3d1cdb198..9cab6cd69 100644 --- a/docs/next/dump-load-restart/index.html +++ b/docs/next/dump-load-restart/index.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/next/forking/index.html b/docs/next/forking/index.html index bb3b4196e..e24d8ce51 100644 --- a/docs/next/forking/index.html +++ b/docs/next/forking/index.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/next/historic-state/index.html b/docs/next/historic-state/index.html index ccf65b59d..194bd8d7e 100644 --- a/docs/next/historic-state/index.html +++ b/docs/next/historic-state/index.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/next/intro/index.html b/docs/next/intro/index.html index 78dc00331..35e58d9f8 100644 --- a/docs/next/intro/index.html +++ b/docs/next/intro/index.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/next/lite/index.html b/docs/next/lite/index.html index b5b1cce68..00b38bbc3 100644 --- a/docs/next/lite/index.html +++ b/docs/next/lite/index.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/next/postman/index.html b/docs/next/postman/index.html index e73065c55..80713a508 100644 --- a/docs/next/postman/index.html +++ b/docs/next/postman/index.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/next/predeployed/index.html b/docs/next/predeployed/index.html index fbed9d605..cdd09b8df 100644 --- a/docs/next/predeployed/index.html +++ b/docs/next/predeployed/index.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/next/running/cli/index.html b/docs/next/running/cli/index.html index e0d73f34f..97786f88f 100644 --- a/docs/next/running/cli/index.html +++ b/docs/next/running/cli/index.html @@ -3,15 +3,39 @@ -CLI options | Starknet Devnet - +CLI options | Starknet Devnet + -
Version: Next

CLI options

-

Check out the CLI options with:

+
Version: Next

CLI options

+

Configure your Devnet instance by specifying CLI parameters on startup.

+

Help

+

Check out all the options with:

$ starknet-devnet --help

Or if using dockerized Devnet:

-
$ docker run --rm shardlabs/starknet-devnet-rs --help
+
$ docker run --rm shardlabs/starknet-devnet-rs --help
+

Environment variables

+

Every CLI option can also be specified via an environment variable:

+
$ <VAR1>=<VALUE> <VAR2>=<VALUE> starknet-devnet
+

To see the exact variable names, use --help.

+

Precedence

+

If both a CLI argument and an environment variable are passed for a parameter, the CLI argument takes precedence. If none are provided, the default value is used. E.g. if running Devnet with the following command, seed value 42 will be used:

+
$ SEED=10 starknet-devnet --seed 42
+

Docker

+

If using dockerized Devnet, specify the variables like this:

+
$ docker run \
-e <VAR1>=<VALUE> \
-e <VAR2>=<VALUE> \
... \
shardlabs/starknet-devnet-rs
+

Load configuration from a file

+

If providing many configuration parameters in a single command becomes cumbersome, consider loading them from a file. By relying on environment variables, prepare your configuration in a file like this:

+
export SEED=42
export ACCOUNTS=3
...
+

Assuming the file is called .my-env-file, then run:

+
$ source .my-env-file && starknet-devnet
+

To run in a subshell and prevent environment pollution (i.e. to unset the variables after Devnet exits), use parentheses:

+
$ ( source .my-env-file && starknet-devnet )
+

Docker

+

To load environment variables from .my-env-file with Docker, remove the export part in each line to have the file look like this:

+
SEED=42
ACCOUNTS=3
...
+

Then run:

+
$ docker run --env-file .my-env-file shardlabs/starknet-devnet-rs
\ No newline at end of file diff --git a/docs/next/running/docker/index.html b/docs/next/running/docker/index.html index 7350e2a92..616090958 100644 --- a/docs/next/running/docker/index.html +++ b/docs/next/running/docker/index.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/next/running/install/index.html b/docs/next/running/install/index.html index dcff6da7e..f4a038de0 100644 --- a/docs/next/running/install/index.html +++ b/docs/next/running/install/index.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/next/server-config/index.html b/docs/next/server-config/index.html index 67809f612..4ac6af0d8 100644 --- a/docs/next/server-config/index.html +++ b/docs/next/server-config/index.html @@ -3,12 +3,13 @@ -Server config | Starknet Devnet - +Server config | Starknet Devnet +
Version: Next

Server config

+

To read generally about ways to configure your Devnet instance, check out the CLI section.

Host and port

Specify the host and the port used by the server with --host <ADDRESS> and --port <NUMBER> CLI arguments. If running with Docker, check out the port publishing docs.

Logging

diff --git a/docs/next/starknet-time/index.html b/docs/next/starknet-time/index.html index 189853cd4..a2872786c 100644 --- a/docs/next/starknet-time/index.html +++ b/docs/next/starknet-time/index.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/postman/index.html b/docs/postman/index.html index 7aed78732..e62301dc8 100644 --- a/docs/postman/index.html +++ b/docs/postman/index.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/predeployed/index.html b/docs/predeployed/index.html index 5bb9cbb11..f0f76e4bf 100644 --- a/docs/predeployed/index.html +++ b/docs/predeployed/index.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/running/cli/index.html b/docs/running/cli/index.html index e4fd1d46f..9c60f88c7 100644 --- a/docs/running/cli/index.html +++ b/docs/running/cli/index.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/running/docker/index.html b/docs/running/docker/index.html index 478e8ad30..b0441d073 100644 --- a/docs/running/docker/index.html +++ b/docs/running/docker/index.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/running/install/index.html b/docs/running/install/index.html index 9ccf69f15..3b551f9b5 100644 --- a/docs/running/install/index.html +++ b/docs/running/install/index.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/server-config/index.html b/docs/server-config/index.html index 294cff86d..8e3b9a961 100644 --- a/docs/server-config/index.html +++ b/docs/server-config/index.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/starknet-time/index.html b/docs/starknet-time/index.html index f0c7085d0..42f24788e 100644 --- a/docs/starknet-time/index.html +++ b/docs/starknet-time/index.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/index.html b/index.html index f31e35c46..1cecbddd5 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Home | Starknet Devnet - + diff --git a/markdown-page/index.html b/markdown-page/index.html index 0728aa426..d116b7564 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -4,7 +4,7 @@ Markdown page example | Starknet Devnet - +