diff --git a/404.html b/404.html index 54b517833..dda2035a8 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | Starknet Devnet - + diff --git a/assets/js/7019eb68.19990d6b.js b/assets/js/7019eb68.d044f45e.js similarity index 54% rename from assets/js/7019eb68.19990d6b.js rename to assets/js/7019eb68.d044f45e.js index 44252881a..c0219e88c 100644 --- a/assets/js/7019eb68.19990d6b.js +++ b/assets/js/7019eb68.d044f45e.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7987],{9723:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var i=t(4848),r=t(8453);const s={sidebar_position:2.1},l="Install and run",a={id:"running/install",title:"Install and run",description:"Requirements",source:"@site/versioned_docs/version-0.2.0/running/install.md",sourceDirName:"running",slug:"/running/install",permalink:"/starknet-devnet-rs/docs/running/install",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/versioned_docs/version-0.2.0/running/install.md",tags:[],version:"0.2.0",sidebarPosition:2.1,frontMatter:{sidebar_position:2.1},sidebar:"docSidebar",previous:{title:"Running",permalink:"/starknet-devnet-rs/docs/category/running"},next:{title:"Run with Docker",permalink:"/starknet-devnet-rs/docs/running/docker"}},o={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Install an executable binary",id:"install-an-executable-binary",level:2},{value:"Remove Pythonic Devnet",id:"remove-pythonic-devnet",level:3},{value:"Install from crates.io",id:"install-from-cratesio",level:3},{value:"Install from GitHub",id:"install-from-github",level:3},{value:"Install with asdf",id:"install-with-asdf",level:3},{value:"Run the installed executable",id:"run-the-installed-executable",level:3},{value:"Fetch a pre-compiled binary executable",id:"fetch-a-pre-compiled-binary-executable",level:2},{value:"Run from source",id:"run-from-source",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"install-and-run",children:"Install and run"}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:["Any of the approaches below that mention ",(0,i.jsx)(n.code,{children:"cargo"})," require you to have ",(0,i.jsx)(n.a,{href:"https://www.rust-lang.org/tools/install",children:"installed Rust"}),". You might also need to install ",(0,i.jsx)(n.code,{children:"pkg-config"})," and ",(0,i.jsx)(n.code,{children:"make"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The required Rust version is specified in ",(0,i.jsx)(n.code,{children:"rust-toolchain.toml"})," in the project root and handled automatically by ",(0,i.jsx)(n.code,{children:"cargo"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"install-an-executable-binary",children:"Install an executable binary"}),"\n",(0,i.jsxs)(n.p,{children:["Installing an executable binary is achievable with ",(0,i.jsx)(n.code,{children:"cargo install"})," via ",(0,i.jsx)(n.a,{href:"https://crates.io/",children:"crates.io"})," or ",(0,i.jsx)(n.a,{href:"https://github.com",children:"github.com"}),". This approach downloads the crate, builds it in release mode and copies it to ",(0,i.jsx)(n.code,{children:"~/.cargo/bin/"}),". To avoid needing to compile and wait, check the ",(0,i.jsx)(n.a,{href:"#fetch-a-pre-compiled-binary-executable",children:"pre-compiled binary section"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"remove-pythonic-devnet",children:"Remove Pythonic Devnet"}),"\n",(0,i.jsxs)(n.p,{children:["If in the past you installed ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet",children:"Pythonic Devnet"}),", be sure to remove it to avoid name collision of the old and the new executable - if by no other means, then by ",(0,i.jsx)(n.code,{children:"rm $(which starknet-devnet)"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"install-from-cratesio",children:"Install from crates.io"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h3,{id:"install-from-github",children:"Install from GitHub"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Use the ",(0,i.jsx)(n.code,{children:"--locked"})," flag to ensure using the dependencies listed in ",(0,i.jsx)(n.code,{children:"Cargo.lock"})," in the project root."]}),"\n",(0,i.jsxs)(n.li,{children:["Preferably familiarize yourself with the ",(0,i.jsx)(n.code,{children:"cargo install"})," command (",(0,i.jsx)(n.a,{href:"https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile",children:"docs"}),")."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"install-with-asdf",children:["Install with ",(0,i.jsx)(n.code,{children:"asdf"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Follow the instructions from the ",(0,i.jsx)(n.a,{href:"https://github.com/ptisserand/asdf-starknet-devnet",children:"asdf-starknet-devnet"})," repo."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"run-the-installed-executable",children:"Run the installed executable"}),"\n",(0,i.jsxs)(n.p,{children:["When ",(0,i.jsx)(n.code,{children:"cargo install"})," finishes, follow the output in your terminal. If properly configured, you should be able to run Devnet with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"fetch-a-pre-compiled-binary-executable",children:"Fetch a pre-compiled binary executable"}),"\n",(0,i.jsxs)(n.p,{children:["If you want to save time and skip project compilation on installation, since Devnet v0.0.5, the Assets section of each ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs/releases",children:"GitHub release"})," contains a set of platform-specific pre-compiled binary executables. Extract and run with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ curl -sSfL https://github.com/0xSpaceShard/starknet-devnet-rs/releases/download// | tar -xvz -C \n$ /starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"run-from-source",children:"Run from source"}),"\n",(0,i.jsxs)(n.p,{children:["To install the project from source, after ",(0,i.jsx)(n.a,{href:"https://github.com/git-guides/git-clone",children:"git-cloning"})," the ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs",children:"Devnet repository"}),", running the following command will install, build and start Devnet:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run\n"})}),"\n",(0,i.jsx)(n.p,{children:"Specify optional CLI params like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run -- [ARGS]\n"})}),"\n",(0,i.jsx)(n.p,{children:"For a more optimized performance (though with a longer compilation time), run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run --release\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>a});var i=t(6540);const r={},s=i.createContext(r);function l(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(r):e.components||r:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7987],{9723:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>o});var i=t(4848),r=t(8453);const s={sidebar_position:2.1},l="Install and run",a={id:"running/install",title:"Install and run",description:"Requirements",source:"@site/versioned_docs/version-0.2.0/running/install.md",sourceDirName:"running",slug:"/running/install",permalink:"/starknet-devnet-rs/docs/running/install",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/versioned_docs/version-0.2.0/running/install.md",tags:[],version:"0.2.0",sidebarPosition:2.1,frontMatter:{sidebar_position:2.1},sidebar:"docSidebar",previous:{title:"Running",permalink:"/starknet-devnet-rs/docs/category/running"},next:{title:"Run with Docker",permalink:"/starknet-devnet-rs/docs/running/docker"}},c={},o=[{value:"Requirements",id:"requirements",level:2},{value:"Install an executable binary",id:"install-an-executable-binary",level:2},{value:"Remove Pythonic Devnet",id:"remove-pythonic-devnet",level:3},{value:"Install from crates.io",id:"install-from-cratesio",level:3},{value:"Install from GitHub",id:"install-from-github",level:3},{value:"Install with asdf",id:"install-with-asdf",level:3},{value:"Run the installed executable",id:"run-the-installed-executable",level:3},{value:"Fetch a pre-compiled binary executable",id:"fetch-a-pre-compiled-binary-executable",level:2},{value:"Run from source",id:"run-from-source",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"install-and-run",children:"Install and run"}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:["Any of the approaches below that mention ",(0,i.jsx)(n.code,{children:"cargo"})," require you to have ",(0,i.jsx)(n.a,{href:"https://www.rust-lang.org/tools/install",children:"installed Rust"}),". You might also need to install ",(0,i.jsx)(n.code,{children:"pkg-config"})," and ",(0,i.jsx)(n.code,{children:"make"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The required Rust version is specified in ",(0,i.jsx)(n.code,{children:"rust-toolchain.toml"})," in the project root and handled automatically by ",(0,i.jsx)(n.code,{children:"cargo"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"install-an-executable-binary",children:"Install an executable binary"}),"\n",(0,i.jsxs)(n.p,{children:["Installing an executable binary is achievable with ",(0,i.jsx)(n.code,{children:"cargo install"})," via ",(0,i.jsx)(n.a,{href:"https://crates.io/",children:"crates.io"})," or ",(0,i.jsx)(n.a,{href:"https://github.com",children:"github.com"}),". This approach downloads the crate, builds it in release mode and copies it to ",(0,i.jsx)(n.code,{children:"~/.cargo/bin/"}),". To avoid needing to compile and wait, check the ",(0,i.jsx)(n.a,{href:"#fetch-a-pre-compiled-binary-executable",children:"pre-compiled binary section"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"remove-pythonic-devnet",children:"Remove Pythonic Devnet"}),"\n",(0,i.jsxs)(n.p,{children:["If in the past you installed ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet",children:"Pythonic Devnet"}),", be sure to remove it to avoid name collision of the old and the new executable - if by no other means, then by ",(0,i.jsx)(n.code,{children:"rm $(which starknet-devnet)"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"install-from-cratesio",children:"Install from crates.io"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h3,{id:"install-from-github",children:"Install from GitHub"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Use the ",(0,i.jsx)(n.code,{children:"--locked"})," flag to ensure using the dependencies listed in ",(0,i.jsx)(n.code,{children:"Cargo.lock"})," in the project root."]}),"\n",(0,i.jsxs)(n.li,{children:["Preferably familiarize yourself with the ",(0,i.jsx)(n.code,{children:"cargo install"})," command (",(0,i.jsx)(n.a,{href:"https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile",children:"docs"}),")."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"install-with-asdf",children:["Install with ",(0,i.jsx)(n.code,{children:"asdf"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Run the following to add the ",(0,i.jsx)(n.code,{children:"starknet-devnet"})," plugin"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf plugin add starknet-devnet\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Show all installable versions:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf list-all starknet-devnet\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Install latest version:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf install starknet-devnet latest\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Install specific version:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf install starknet-devnet 0.2.0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://asdf-vm.com/guide/getting-started.html",children:"asdf guide"})," for more instructions on how to install & manage versions."]}),"\n",(0,i.jsx)(n.h3,{id:"run-the-installed-executable",children:"Run the installed executable"}),"\n",(0,i.jsxs)(n.p,{children:["When ",(0,i.jsx)(n.code,{children:"cargo install"})," finishes, follow the output in your terminal. If properly configured, you should be able to run Devnet with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"fetch-a-pre-compiled-binary-executable",children:"Fetch a pre-compiled binary executable"}),"\n",(0,i.jsxs)(n.p,{children:["If you want to save time and skip project compilation on installation, since Devnet v0.0.5, the Assets section of each ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs/releases",children:"GitHub release"})," contains a set of platform-specific pre-compiled binary executables. Extract and run with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ curl -sSfL https://github.com/0xSpaceShard/starknet-devnet-rs/releases/download// | tar -xvz -C \n$ /starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"run-from-source",children:"Run from source"}),"\n",(0,i.jsxs)(n.p,{children:["To install the project from source, after ",(0,i.jsx)(n.a,{href:"https://github.com/git-guides/git-clone",children:"git-cloning"})," the ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs",children:"Devnet repository"}),", running the following command will install, build and start Devnet:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run\n"})}),"\n",(0,i.jsx)(n.p,{children:"Specify optional CLI params like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run -- [ARGS]\n"})}),"\n",(0,i.jsx)(n.p,{children:"For a more optimized performance (though with a longer compilation time), run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run --release\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>a});var i=t(6540);const r={},s=i.createContext(r);function l(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(r):e.components||r:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/778bcc8b.2eb5e1de.js b/assets/js/778bcc8b.2eb5e1de.js new file mode 100644 index 000000000..1758a04aa --- /dev/null +++ b/assets/js/778bcc8b.2eb5e1de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1527],{9260:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>m,frontMatter:()=>r,metadata:()=>c,toc:()=>o});var i=n(4848),s=n(8453);const r={},a="Starknet time",c={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, /increasetime and JSON-RPC methods devnetsetTime, devnetincreaseTime generate a new block. This can be changed for /settime (devnetsetTime) by setting the optional parameter generate_block to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.",source:"@site/docs/starknet-time.md",sourceDirName:".",slug:"/starknet-time",permalink:"/starknet-devnet-rs/docs/next/starknet-time",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/starknet-time.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Server config",permalink:"/starknet-devnet-rs/docs/next/server-config"}},d={},o=[{value:"Set time",id:"set-time",level:2},{value:"Increase time",id:"increase-time",level:2},{value:"Start time",id:"start-time",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"starknet-time",children:"Starknet time"}),"\n",(0,i.jsxs)(t.p,{children:["Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods ",(0,i.jsx)(t.code,{children:"/set_time"}),", ",(0,i.jsx)(t.code,{children:"/increase_time"})," and ",(0,i.jsx)(t.code,{children:"JSON-RPC"})," methods ",(0,i.jsx)(t.code,{children:"devnet_setTime"}),", ",(0,i.jsx)(t.code,{children:"devnet_increaseTime"})," generate a new block. This can be changed for ",(0,i.jsx)(t.code,{children:"/set_time"})," (",(0,i.jsx)(t.code,{children:"devnet_setTime"}),") by setting the optional parameter ",(0,i.jsx)(t.code,{children:"generate_block"})," to ",(0,i.jsx)(t.code,{children:"false"}),". This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated."]}),"\n",(0,i.jsxs)(t.p,{children:["All values should be set in ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Unix_time",children:"Unix time seconds"}),". After ",(0,i.jsx)(t.a,{href:"#start-time",children:"startup"}),", the time progresses naturally."]}),"\n",(0,i.jsx)(t.h2,{id:"set-time",children:"Set time"}),"\n",(0,i.jsx)(t.p,{children:"The following sets the exact time and generates a new block:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"The following doesn't generate a new block, but sets the exact time for the next generated block:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS,\n "generate_block": false\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS,\n "generate_block": false\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"Warning: block time can be set in the past which might lead to unexpected behavior!"}),"\n",(0,i.jsx)(t.h2,{id:"increase-time",children:"Increase time"}),"\n",(0,i.jsx)(t.p,{children:"Increases the block timestamp by the provided amount and generates a new block. All subsequent blocks will keep this increment."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /increase_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_increaseTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.admonition,{title:"Increment example",type:"note",children:(0,i.jsxs)(t.p,{children:["Imagine a block is generated with timestamp ",(0,i.jsx)(t.code,{children:"T1"}),", some time passes (let's call this interval ",(0,i.jsx)(t.code,{children:"T_passed"}),"), and you call increase_time with ",(0,i.jsx)(t.code,{children:"T_inc"})," as the argument, which immediately mines a new block at ",(0,i.jsx)(t.code,{children:"T2"}),". ",(0,i.jsx)(t.code,{children:"T2"})," should equal ",(0,i.jsx)(t.code,{children:"T1 + T_passed + T_inc"}),"."]})}),"\n",(0,i.jsx)(t.h2,{id:"start-time",children:"Start time"}),"\n",(0,i.jsxs)(t.p,{children:["Devnet's starting timestamp can be defined via CLI by providing a positive value of ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Unix_time",children:"Unix time seconds"})," to ",(0,i.jsx)(t.code,{children:"--start-time"}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"$ starknet-devnet --start-time \n"})}),"\n",(0,i.jsx)(t.p,{children:"If provided, this timestamp shall be used in mining the genesis block. The default value is the current Unix time."})]})}function m(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var i=n(6540);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/778bcc8b.72a3506c.js b/assets/js/778bcc8b.72a3506c.js deleted file mode 100644 index 9c01d5acf..000000000 --- a/assets/js/778bcc8b.72a3506c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[1527],{9260:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>o});var i=n(4848),s=n(8453);const r={},a="Starknet time",c={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, /increasetime and JSON-RPC methods devnetsetTime, devnetincreaseTime generate a new block. This can be changed for /settime (devnetsetTime) by setting the optional parameter generate_block to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.",source:"@site/docs/starknet-time.md",sourceDirName:".",slug:"/starknet-time",permalink:"/starknet-devnet-rs/docs/next/starknet-time",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/starknet-time.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Server config",permalink:"/starknet-devnet-rs/docs/next/server-config"}},d={},o=[{value:"Set time",id:"set-time",level:2},{value:"Increase time",id:"increase-time",level:2},{value:"Start time argument",id:"start-time-argument",level:2}];function m(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"starknet-time",children:"Starknet time"}),"\n",(0,i.jsxs)(t.p,{children:["Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods ",(0,i.jsx)(t.code,{children:"/set_time"}),", ",(0,i.jsx)(t.code,{children:"/increase_time"})," and ",(0,i.jsx)(t.code,{children:"JSON-RPC"})," methods ",(0,i.jsx)(t.code,{children:"devnet_setTime"}),", ",(0,i.jsx)(t.code,{children:"devnet_increaseTime"})," generate a new block. This can be changed for ",(0,i.jsx)(t.code,{children:"/set_time"})," (",(0,i.jsx)(t.code,{children:"devnet_setTime"}),") by setting the optional parameter ",(0,i.jsx)(t.code,{children:"generate_block"})," to ",(0,i.jsx)(t.code,{children:"false"}),". This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated."]}),"\n",(0,i.jsxs)(t.p,{children:["All values should be set in ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Unix_time",children:"Unix time seconds"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"set-time",children:"Set time"}),"\n",(0,i.jsx)(t.p,{children:"The following sets the exact time and generates a new block:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"The following doesn't generate a new block, but sets the exact time for the next generated block:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS,\n "generate_block": false\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS,\n "generate_block": false\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"Warning: block time can be set in the past which might lead to unexpected behavior!"}),"\n",(0,i.jsx)(t.h2,{id:"increase-time",children:"Increase time"}),"\n",(0,i.jsx)(t.p,{children:"Increases the block timestamp by the provided amount and generates a new block. All subsequent blocks will keep this increment."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /increase_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_increaseTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.h2,{id:"start-time-argument",children:"Start time argument"}),"\n",(0,i.jsxs)(t.p,{children:["Devnet's time can be defined on startup via CLI by providing a positive value to ",(0,i.jsx)(t.code,{children:"--start-time"}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"$ starknet-devnet --start-time \n"})})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(m,{...e})}):m(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var i=n(6540);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7b998695.77b6f90e.js b/assets/js/7b998695.6ebe2686.js similarity index 52% rename from assets/js/7b998695.77b6f90e.js rename to assets/js/7b998695.6ebe2686.js index 365903019..9d13464dc 100644 --- a/assets/js/7b998695.77b6f90e.js +++ b/assets/js/7b998695.6ebe2686.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[646],{5833:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>c});var i=t(4848),r=t(8453);const s={sidebar_position:2.1},l="Install and run",a={id:"running/install",title:"Install and run",description:"Requirements",source:"@site/docs/running/install.md",sourceDirName:"running",slug:"/running/install",permalink:"/starknet-devnet-rs/docs/next/running/install",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/running/install.md",tags:[],version:"current",sidebarPosition:2.1,frontMatter:{sidebar_position:2.1},sidebar:"docSidebar",previous:{title:"Running",permalink:"/starknet-devnet-rs/docs/next/category/running"},next:{title:"Run with Docker",permalink:"/starknet-devnet-rs/docs/next/running/docker"}},o={},c=[{value:"Requirements",id:"requirements",level:2},{value:"Install an executable binary",id:"install-an-executable-binary",level:2},{value:"Remove Pythonic Devnet",id:"remove-pythonic-devnet",level:3},{value:"Install from crates.io",id:"install-from-cratesio",level:3},{value:"Install from GitHub",id:"install-from-github",level:3},{value:"Install with asdf",id:"install-with-asdf",level:3},{value:"Run the installed executable",id:"run-the-installed-executable",level:3},{value:"Fetch a pre-compiled binary executable",id:"fetch-a-pre-compiled-binary-executable",level:2},{value:"Run from source",id:"run-from-source",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"install-and-run",children:"Install and run"}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:["Any of the approaches below that mention ",(0,i.jsx)(n.code,{children:"cargo"})," require you to have ",(0,i.jsx)(n.a,{href:"https://www.rust-lang.org/tools/install",children:"installed Rust"}),". You might also need to install ",(0,i.jsx)(n.code,{children:"pkg-config"})," and ",(0,i.jsx)(n.code,{children:"make"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The required Rust version is specified in ",(0,i.jsx)(n.code,{children:"rust-toolchain.toml"})," in the project root and handled automatically by ",(0,i.jsx)(n.code,{children:"cargo"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"install-an-executable-binary",children:"Install an executable binary"}),"\n",(0,i.jsxs)(n.p,{children:["Installing an executable binary is achievable with ",(0,i.jsx)(n.code,{children:"cargo install"})," via ",(0,i.jsx)(n.a,{href:"https://crates.io/",children:"crates.io"})," or ",(0,i.jsx)(n.a,{href:"https://github.com",children:"github.com"}),". This approach downloads the crate, builds it in release mode and copies it to ",(0,i.jsx)(n.code,{children:"~/.cargo/bin/"}),". To avoid needing to compile and wait, check the ",(0,i.jsx)(n.a,{href:"#fetch-a-pre-compiled-binary-executable",children:"pre-compiled binary section"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"remove-pythonic-devnet",children:"Remove Pythonic Devnet"}),"\n",(0,i.jsxs)(n.p,{children:["If in the past you installed ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet",children:"Pythonic Devnet"}),", be sure to remove it to avoid name collision of the old and the new executable - if by no other means, then by ",(0,i.jsx)(n.code,{children:"rm $(which starknet-devnet)"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"install-from-cratesio",children:"Install from crates.io"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h3,{id:"install-from-github",children:"Install from GitHub"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Use the ",(0,i.jsx)(n.code,{children:"--locked"})," flag to ensure using the dependencies listed in ",(0,i.jsx)(n.code,{children:"Cargo.lock"})," in the project root."]}),"\n",(0,i.jsxs)(n.li,{children:["Preferably familiarize yourself with the ",(0,i.jsx)(n.code,{children:"cargo install"})," command (",(0,i.jsx)(n.a,{href:"https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile",children:"docs"}),")."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"install-with-asdf",children:["Install with ",(0,i.jsx)(n.code,{children:"asdf"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Follow the instructions from the ",(0,i.jsx)(n.a,{href:"https://github.com/ptisserand/asdf-starknet-devnet",children:"asdf-starknet-devnet"})," repo."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"run-the-installed-executable",children:"Run the installed executable"}),"\n",(0,i.jsxs)(n.p,{children:["When ",(0,i.jsx)(n.code,{children:"cargo install"})," finishes, follow the output in your terminal. If properly configured, you should be able to run Devnet with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"fetch-a-pre-compiled-binary-executable",children:"Fetch a pre-compiled binary executable"}),"\n",(0,i.jsxs)(n.p,{children:["If you want to save time and skip project compilation on installation, since Devnet v0.0.5, the Assets section of each ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs/releases",children:"GitHub release"})," contains a set of platform-specific pre-compiled binary executables. Extract and run with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ curl -sSfL https://github.com/0xSpaceShard/starknet-devnet-rs/releases/download// | tar -xvz -C \n$ /starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"run-from-source",children:"Run from source"}),"\n",(0,i.jsxs)(n.p,{children:["To install the project from source, after ",(0,i.jsx)(n.a,{href:"https://github.com/git-guides/git-clone",children:"git-cloning"})," the ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs",children:"Devnet repository"}),", running the following command will install, build and start Devnet:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run\n"})}),"\n",(0,i.jsx)(n.p,{children:"Specify optional CLI params like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run -- [ARGS]\n"})}),"\n",(0,i.jsx)(n.p,{children:"For a more optimized performance (though with a longer compilation time), run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run --release\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>a});var i=t(6540);const r={},s=i.createContext(r);function l(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(r):e.components||r:l(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[646],{5833:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>l,metadata:()=>a,toc:()=>o});var i=t(4848),r=t(8453);const l={sidebar_position:2.1},s="Install and run",a={id:"running/install",title:"Install and run",description:"Requirements",source:"@site/docs/running/install.md",sourceDirName:"running",slug:"/running/install",permalink:"/starknet-devnet-rs/docs/next/running/install",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/running/install.md",tags:[],version:"current",sidebarPosition:2.1,frontMatter:{sidebar_position:2.1},sidebar:"docSidebar",previous:{title:"Running",permalink:"/starknet-devnet-rs/docs/next/category/running"},next:{title:"Run with Docker",permalink:"/starknet-devnet-rs/docs/next/running/docker"}},c={},o=[{value:"Requirements",id:"requirements",level:2},{value:"Install an executable binary",id:"install-an-executable-binary",level:2},{value:"Remove Pythonic Devnet",id:"remove-pythonic-devnet",level:3},{value:"Install from crates.io",id:"install-from-cratesio",level:3},{value:"Install from GitHub",id:"install-from-github",level:3},{value:"Install with asdf",id:"install-with-asdf",level:3},{value:"Run the installed executable",id:"run-the-installed-executable",level:3},{value:"Fetch a pre-compiled binary executable",id:"fetch-a-pre-compiled-binary-executable",level:2},{value:"Run from source",id:"run-from-source",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.h1,{id:"install-and-run",children:"Install and run"}),"\n",(0,i.jsx)(n.h2,{id:"requirements",children:"Requirements"}),"\n",(0,i.jsxs)(n.p,{children:["Any of the approaches below that mention ",(0,i.jsx)(n.code,{children:"cargo"})," require you to have ",(0,i.jsx)(n.a,{href:"https://www.rust-lang.org/tools/install",children:"installed Rust"}),". You might also need to install ",(0,i.jsx)(n.code,{children:"pkg-config"})," and ",(0,i.jsx)(n.code,{children:"make"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The required Rust version is specified in ",(0,i.jsx)(n.code,{children:"rust-toolchain.toml"})," in the project root and handled automatically by ",(0,i.jsx)(n.code,{children:"cargo"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"install-an-executable-binary",children:"Install an executable binary"}),"\n",(0,i.jsxs)(n.p,{children:["Installing an executable binary is achievable with ",(0,i.jsx)(n.code,{children:"cargo install"})," via ",(0,i.jsx)(n.a,{href:"https://crates.io/",children:"crates.io"})," or ",(0,i.jsx)(n.a,{href:"https://github.com",children:"github.com"}),". This approach downloads the crate, builds it in release mode and copies it to ",(0,i.jsx)(n.code,{children:"~/.cargo/bin/"}),". To avoid needing to compile and wait, check the ",(0,i.jsx)(n.a,{href:"#fetch-a-pre-compiled-binary-executable",children:"pre-compiled binary section"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"remove-pythonic-devnet",children:"Remove Pythonic Devnet"}),"\n",(0,i.jsxs)(n.p,{children:["If in the past you installed ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet",children:"Pythonic Devnet"}),", be sure to remove it to avoid name collision of the old and the new executable - if by no other means, then by ",(0,i.jsx)(n.code,{children:"rm $(which starknet-devnet)"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"install-from-cratesio",children:"Install from crates.io"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h3,{id:"install-from-github",children:"Install from GitHub"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Use the ",(0,i.jsx)(n.code,{children:"--locked"})," flag to ensure using the dependencies listed in ",(0,i.jsx)(n.code,{children:"Cargo.lock"})," in the project root."]}),"\n",(0,i.jsxs)(n.li,{children:["Preferably familiarize yourself with the ",(0,i.jsx)(n.code,{children:"cargo install"})," command (",(0,i.jsx)(n.a,{href:"https://doc.rust-lang.org/cargo/commands/cargo-install.html#dealing-with-the-lockfile",children:"docs"}),")."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked\n"})}),"\n",(0,i.jsxs)(n.h3,{id:"install-with-asdf",children:["Install with ",(0,i.jsx)(n.code,{children:"asdf"})]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Run the following to add the ",(0,i.jsx)(n.code,{children:"starknet-devnet"})," plugin"]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf plugin add starknet-devnet\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Show all installable versions:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf list-all starknet-devnet\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Install latest version:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf install starknet-devnet latest\n"})}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Install specific version:"}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ asdf install starknet-devnet 0.2.0\n"})}),"\n",(0,i.jsxs)(n.p,{children:["Check ",(0,i.jsx)(n.a,{href:"https://asdf-vm.com/guide/getting-started.html",children:"asdf guide"})," for more instructions on how to install & manage versions."]}),"\n",(0,i.jsx)(n.h3,{id:"run-the-installed-executable",children:"Run the installed executable"}),"\n",(0,i.jsxs)(n.p,{children:["When ",(0,i.jsx)(n.code,{children:"cargo install"})," finishes, follow the output in your terminal. If properly configured, you should be able to run Devnet with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"fetch-a-pre-compiled-binary-executable",children:"Fetch a pre-compiled binary executable"}),"\n",(0,i.jsxs)(n.p,{children:["If you want to save time and skip project compilation on installation, since Devnet v0.0.5, the Assets section of each ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs/releases",children:"GitHub release"})," contains a set of platform-specific pre-compiled binary executables. Extract and run with:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ curl -sSfL https://github.com/0xSpaceShard/starknet-devnet-rs/releases/download// | tar -xvz -C \n$ /starknet-devnet\n"})}),"\n",(0,i.jsx)(n.h2,{id:"run-from-source",children:"Run from source"}),"\n",(0,i.jsxs)(n.p,{children:["To install the project from source, after ",(0,i.jsx)(n.a,{href:"https://github.com/git-guides/git-clone",children:"git-cloning"})," the ",(0,i.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-devnet-rs",children:"Devnet repository"}),", running the following command will install, build and start Devnet:"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run\n"})}),"\n",(0,i.jsx)(n.p,{children:"Specify optional CLI params like this:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run -- [ARGS]\n"})}),"\n",(0,i.jsx)(n.p,{children:"For a more optimized performance (though with a longer compilation time), run:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"$ cargo run --release\n"})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var i=t(6540);const r={},l=i.createContext(r);function s(e){const n=i.useContext(l);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(r):e.components||r:s(e.components),i.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d4ac7305.61c66b44.js b/assets/js/d4ac7305.61c66b44.js new file mode 100644 index 000000000..6456ffd9f --- /dev/null +++ b/assets/js/d4ac7305.61c66b44.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6208],{6566:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>m,frontMatter:()=>r,metadata:()=>c,toc:()=>o});var i=n(4848),s=n(8453);const r={},a="Starknet time",c={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, /increasetime and JSON-RPC methods devnetsetTime, devnetincreaseTime generate a new block. This can be changed for /settime (devnetsetTime) by setting the optional parameter generate_block to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.",source:"@site/versioned_docs/version-0.2.0/starknet-time.md",sourceDirName:".",slug:"/starknet-time",permalink:"/starknet-devnet-rs/docs/starknet-time",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/versioned_docs/version-0.2.0/starknet-time.md",tags:[],version:"0.2.0",frontMatter:{},sidebar:"docSidebar",previous:{title:"Server config",permalink:"/starknet-devnet-rs/docs/server-config"}},d={},o=[{value:"Set time",id:"set-time",level:2},{value:"Increase time",id:"increase-time",level:2},{value:"Start time",id:"start-time",level:2}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"starknet-time",children:"Starknet time"}),"\n",(0,i.jsxs)(t.p,{children:["Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods ",(0,i.jsx)(t.code,{children:"/set_time"}),", ",(0,i.jsx)(t.code,{children:"/increase_time"})," and ",(0,i.jsx)(t.code,{children:"JSON-RPC"})," methods ",(0,i.jsx)(t.code,{children:"devnet_setTime"}),", ",(0,i.jsx)(t.code,{children:"devnet_increaseTime"})," generate a new block. This can be changed for ",(0,i.jsx)(t.code,{children:"/set_time"})," (",(0,i.jsx)(t.code,{children:"devnet_setTime"}),") by setting the optional parameter ",(0,i.jsx)(t.code,{children:"generate_block"})," to ",(0,i.jsx)(t.code,{children:"false"}),". This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated."]}),"\n",(0,i.jsxs)(t.p,{children:["All values should be set in ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Unix_time",children:"Unix time seconds"}),". After ",(0,i.jsx)(t.a,{href:"#start-time",children:"startup"}),", the time progresses naturally."]}),"\n",(0,i.jsx)(t.h2,{id:"set-time",children:"Set time"}),"\n",(0,i.jsx)(t.p,{children:"The following sets the exact time and generates a new block:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"The following doesn't generate a new block, but sets the exact time for the next generated block:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS,\n "generate_block": false\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS,\n "generate_block": false\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"Warning: block time can be set in the past which might lead to unexpected behavior!"}),"\n",(0,i.jsx)(t.h2,{id:"increase-time",children:"Increase time"}),"\n",(0,i.jsx)(t.p,{children:"Increases the block timestamp by the provided amount and generates a new block. All subsequent blocks will keep this increment."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /increase_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_increaseTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.admonition,{title:"Increment example",type:"note",children:(0,i.jsxs)(t.p,{children:["Imagine a block is generated with timestamp ",(0,i.jsx)(t.code,{children:"T1"}),", some time passes (let's call this interval ",(0,i.jsx)(t.code,{children:"T_passed"}),"), and you call increase_time with ",(0,i.jsx)(t.code,{children:"T_inc"})," as the argument, which immediately mines a new block at ",(0,i.jsx)(t.code,{children:"T2"}),". ",(0,i.jsx)(t.code,{children:"T2"})," should equal ",(0,i.jsx)(t.code,{children:"T1 + T_passed + T_inc"}),"."]})}),"\n",(0,i.jsx)(t.h2,{id:"start-time",children:"Start time"}),"\n",(0,i.jsxs)(t.p,{children:["Devnet's starting timestamp can be defined via CLI by providing a positive value of ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Unix_time",children:"Unix time seconds"})," to ",(0,i.jsx)(t.code,{children:"--start-time"}),":"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"$ starknet-devnet --start-time \n"})}),"\n",(0,i.jsx)(t.p,{children:"If provided, this timestamp shall be used in mining the genesis block. The default value is the current Unix time."})]})}function m(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var i=n(6540);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d4ac7305.da2046e6.js b/assets/js/d4ac7305.da2046e6.js deleted file mode 100644 index d9108b97b..000000000 --- a/assets/js/d4ac7305.da2046e6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[6208],{6566:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>l,frontMatter:()=>r,metadata:()=>c,toc:()=>o});var i=n(4848),s=n(8453);const r={},a="Starknet time",c={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, /increasetime and JSON-RPC methods devnetsetTime, devnetincreaseTime generate a new block. This can be changed for /settime (devnetsetTime) by setting the optional parameter generate_block to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.",source:"@site/versioned_docs/version-0.2.0/starknet-time.md",sourceDirName:".",slug:"/starknet-time",permalink:"/starknet-devnet-rs/docs/starknet-time",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/versioned_docs/version-0.2.0/starknet-time.md",tags:[],version:"0.2.0",frontMatter:{},sidebar:"docSidebar",previous:{title:"Server config",permalink:"/starknet-devnet-rs/docs/server-config"}},d={},o=[{value:"Set time",id:"set-time",level:2},{value:"Increase time",id:"increase-time",level:2},{value:"Start time argument",id:"start-time-argument",level:2}];function m(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.h1,{id:"starknet-time",children:"Starknet time"}),"\n",(0,i.jsxs)(t.p,{children:["Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods ",(0,i.jsx)(t.code,{children:"/set_time"}),", ",(0,i.jsx)(t.code,{children:"/increase_time"})," and ",(0,i.jsx)(t.code,{children:"JSON-RPC"})," methods ",(0,i.jsx)(t.code,{children:"devnet_setTime"}),", ",(0,i.jsx)(t.code,{children:"devnet_increaseTime"})," generate a new block. This can be changed for ",(0,i.jsx)(t.code,{children:"/set_time"})," (",(0,i.jsx)(t.code,{children:"devnet_setTime"}),") by setting the optional parameter ",(0,i.jsx)(t.code,{children:"generate_block"})," to ",(0,i.jsx)(t.code,{children:"false"}),". This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated."]}),"\n",(0,i.jsxs)(t.p,{children:["All values should be set in ",(0,i.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/Unix_time",children:"Unix time seconds"}),"."]}),"\n",(0,i.jsx)(t.h2,{id:"set-time",children:"Set time"}),"\n",(0,i.jsx)(t.p,{children:"Sets the exact time and generates a new block."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"Doesn't generate a new block, but sets the exact time for the next generated block."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /set_time\n{\n "time": TIME_IN_SECONDS,\n "generate_block": false\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_setTime",\n "params": {\n "time": TIME_IN_SECONDS,\n "generate_block": false\n }\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"Warning: block time can be set in the past which might lead to unexpected behavior!"}),"\n",(0,i.jsx)(t.h2,{id:"increase-time",children:"Increase time"}),"\n",(0,i.jsx)(t.p,{children:"Increases the block timestamp by the provided amount and generates a new block. All subsequent blocks will keep this increment."}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'POST /increase_time\n{\n "time": TIME_IN_SECONDS\n}\n'})}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:'JSON-RPC\n{\n "jsonrpc": "2.0",\n "id": "1",\n "method": "devnet_increaseTime",\n "params": {\n "time": TIME_IN_SECONDS\n }\n}\n'})}),"\n",(0,i.jsx)(t.h2,{id:"start-time-argument",children:"Start time argument"}),"\n",(0,i.jsxs)(t.p,{children:["Devnet can be started with ",(0,i.jsx)(t.code,{children:"--start-time"})," CLI argument, where ",(0,i.jsx)(t.code,{children:"START_TIME_IN_SECONDS"})," should be greater than 0."]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{children:"$ starknet-devnet --start-time \n"})})]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(m,{...e})}):m(e)}},8453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var i=n(6540);const s={},r=i.createContext(s);function a(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.5329a35e.js b/assets/js/runtime~main.1435e04b.js similarity index 97% rename from assets/js/runtime~main.5329a35e.js rename to assets/js/runtime~main.1435e04b.js index 6a849e9f8..018b086fa 100644 --- a/assets/js/runtime~main.5329a35e.js +++ b/assets/js/runtime~main.1435e04b.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,b,f,d,c={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={id:e,loaded:!1,exports:{}};return c[e].call(b.exports,b,b.exports,r),b.loaded=!0,b.exports}r.m=c,r.c=t,e=[],r.O=(a,b,f,d)=>{if(!b){var c=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[b,f,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var c={};a=a||[null,b({}),b([]),b(b)];for(var t=2&f&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,r.d(d,c),d},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({134:"b7bb6147",141:"28a0cb7e",337:"3f194bb7",447:"79bea677",463:"682c6856",484:"673b87a5",562:"5fadd32f",579:"9bb1131a",598:"c25a813d",626:"005b2ed7",646:"7b998695",662:"645cda15",871:"9978e21e",952:"2d66ba60",1235:"a7456010",1316:"1b560adb",1437:"8e76450a",1475:"9c3aeb12",1513:"add761da",1527:"778bcc8b",1603:"cb97154e",1863:"b4513eec",1864:"09d5ad39",1914:"1151f991",1953:"d24dc0ef",2134:"c4d2e5c1",2282:"6d990bb1",2408:"9abfa349",2412:"16a2713f",2557:"b1ee2929",2604:"b8663a1f",2627:"4769fc4e",2828:"49885c5e",2871:"3c883fc4",2916:"425e1ae2",2963:"922c21f9",3055:"7e6e598a",3124:"ef2a8751",3211:"1ed22fa3",3332:"e28eadbb",3705:"c75c8ede",3726:"a5e062ff",3729:"a525598e",3768:"e8953dad",3919:"f84fb341",3950:"b7007dab",3956:"a0ea14c4",3976:"0e384e19",4033:"ba6851eb",4213:"64d9acd1",4290:"ae603a5f",4291:"93f3c2aa",4455:"993d6a8d",4525:"4717d09b",4583:"1df93b7f",4643:"f44adc48",4676:"24503201",4876:"17682634",5120:"a5ad27b1",5186:"b0477c6d",5222:"b759477d",5282:"c1fff4ba",5348:"5402810c",5480:"80526ee6",5532:"e81f6410",5624:"9b932233",5634:"ef3b0775",5700:"b9f7b2ab",5742:"aba21aa0",5771:"8f2e4180",5864:"2ad05638",5960:"0657c530",6017:"8d981dc3",6131:"119a2918",6187:"e44e17f8",6208:"d4ac7305",6286:"e2f00550",6439:"ad6bd692",6613:"38541689",6651:"18672b0b",6773:"2146f16f",6828:"9976ff42",6900:"cc3979e2",6928:"def2ee80",6969:"14eb3368",7098:"a7bd4aaa",7117:"224c8fe8",7229:"eb78b783",7230:"93f75803",7330:"a130ae53",7341:"e2db9f7a",7595:"0debafb6",7624:"5fbc5cf1",7780:"1e29fbdb",7807:"fdcd530c",7817:"a56dc942",7883:"e2538a57",7969:"5985dcf4",7987:"7019eb68",8401:"17896441",8541:"9fb136ba",8586:"94a47589",8609:"06604d59",8626:"bca784a7",8704:"1c1cdb4e",8838:"f8ae958c",9048:"a94703ab",9108:"aaf8ab99",9146:"533ff15f",9167:"ba738306",9184:"5999894b",9218:"cc2baa30",9308:"509bfc31",9337:"e120dcd9",9378:"5b870ab8",9440:"8d820236",9471:"e82252d2",9497:"e3e59843",9629:"9875b4b5",9647:"5e95c892",9736:"4adc7347",9891:"6bb6da1f",9998:"7923f30a"}[e]||e)+"."+{134:"290a582f",141:"5d79e79a",337:"22bfc72a",447:"6aa8f6d6",463:"6d8a69a6",484:"d8f6d2d7",562:"04fe94e0",579:"d9ecc795",598:"dcaf95cd",626:"bcd286c8",646:"77b6f90e",662:"dca1c291",871:"44defd03",952:"a7127b7e",1235:"7b4b0a20",1316:"0fed137f",1437:"457a0c79",1475:"2ff5ffe7",1513:"257e3eec",1527:"72a3506c",1603:"44cfc0ec",1863:"a7844b85",1864:"836bb2d7",1914:"193b4b8f",1953:"47d18514",2134:"6f189758",2237:"ede9a640",2282:"6f96a3b4",2408:"620b16d7",2412:"f08ebda5",2557:"0daf59a0",2604:"aedceb6b",2627:"d5e77644",2828:"4bc7e5ad",2871:"d1c841d8",2916:"469cee91",2963:"e86c36fd",3055:"6c0dfde6",3124:"0dc9d49a",3211:"ff5f5ac6",3332:"9880c232",3705:"6029ecd0",3726:"0c80ff57",3729:"296cded1",3768:"d8af09d8",3919:"cf9c8bea",3950:"dce48c7e",3956:"74b8c7b1",3976:"9f5b9cab",4033:"f246b59f",4213:"93ae8c7e",4290:"fa5b263f",4291:"850dddd9",4455:"28bbc400",4525:"2e0c324e",4583:"f182b925",4643:"fe264cf6",4676:"df561d25",4876:"3d25384a",5120:"07b90a0d",5186:"24e2e5c9",5222:"05e92393",5282:"2ec0eaa6",5348:"3ad38ed6",5480:"b9a69f3d",5532:"60f06895",5624:"211be870",5634:"0187249f",5700:"fc7d833c",5742:"9ac6642b",5771:"6fb725c9",5864:"f7bde80c",5960:"aa8fdf00",6017:"5d6a3cde",6131:"18512c2f",6187:"709607a7",6208:"da2046e6",6286:"8ca4e8a2",6439:"2d8efa6d",6613:"b3b7a295",6651:"f10bbef6",6773:"fed3c84a",6828:"8da5bc72",6900:"f2efdc37",6928:"5fd884cc",6969:"eeb6b7e2",7098:"b82ee0df",7117:"bf31a5eb",7229:"33a8bdeb",7230:"260ce03e",7330:"46fa423f",7341:"810d7342",7595:"bf13c614",7624:"0e41cfdd",7780:"d5a6d9e6",7807:"3feb8b84",7817:"d708dd89",7883:"b963a51d",7969:"70d866fa",7987:"19990d6b",8401:"dcdbd021",8541:"64533b19",8586:"a4d56e94",8609:"18dbfdaf",8626:"09d406cb",8704:"e543d3ff",8838:"a3ca5c4d",9048:"2668bc5b",9108:"a5aed152",9146:"e81f7cd6",9167:"fde851af",9184:"aaf5b65a",9218:"3cda2f1c",9308:"be1fbadb",9337:"22e90422",9378:"e5b723a6",9440:"525617f1",9471:"9b22e8ad",9497:"a3e0afab",9629:"9ea44d6b",9647:"b1f5748f",9736:"7ae4e26a",9891:"10bde74f",9998:"012c6902"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},d="website:",r.l=(e,a,b,c)=>{if(f[e])f[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=f[e];if(delete f[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/starknet-devnet-rs/",r.gca=function(e){return e={17682634:"4876",17896441:"8401",24503201:"4676",38541689:"6613",b7bb6147:"134","28a0cb7e":"141","3f194bb7":"337","79bea677":"447","682c6856":"463","673b87a5":"484","5fadd32f":"562","9bb1131a":"579",c25a813d:"598","005b2ed7":"626","7b998695":"646","645cda15":"662","9978e21e":"871","2d66ba60":"952",a7456010:"1235","1b560adb":"1316","8e76450a":"1437","9c3aeb12":"1475",add761da:"1513","778bcc8b":"1527",cb97154e:"1603",b4513eec:"1863","09d5ad39":"1864","1151f991":"1914",d24dc0ef:"1953",c4d2e5c1:"2134","6d990bb1":"2282","9abfa349":"2408","16a2713f":"2412",b1ee2929:"2557",b8663a1f:"2604","4769fc4e":"2627","49885c5e":"2828","3c883fc4":"2871","425e1ae2":"2916","922c21f9":"2963","7e6e598a":"3055",ef2a8751:"3124","1ed22fa3":"3211",e28eadbb:"3332",c75c8ede:"3705",a5e062ff:"3726",a525598e:"3729",e8953dad:"3768",f84fb341:"3919",b7007dab:"3950",a0ea14c4:"3956","0e384e19":"3976",ba6851eb:"4033","64d9acd1":"4213",ae603a5f:"4290","93f3c2aa":"4291","993d6a8d":"4455","4717d09b":"4525","1df93b7f":"4583",f44adc48:"4643",a5ad27b1:"5120",b0477c6d:"5186",b759477d:"5222",c1fff4ba:"5282","5402810c":"5348","80526ee6":"5480",e81f6410:"5532","9b932233":"5624",ef3b0775:"5634",b9f7b2ab:"5700",aba21aa0:"5742","8f2e4180":"5771","2ad05638":"5864","0657c530":"5960","8d981dc3":"6017","119a2918":"6131",e44e17f8:"6187",d4ac7305:"6208",e2f00550:"6286",ad6bd692:"6439","18672b0b":"6651","2146f16f":"6773","9976ff42":"6828",cc3979e2:"6900",def2ee80:"6928","14eb3368":"6969",a7bd4aaa:"7098","224c8fe8":"7117",eb78b783:"7229","93f75803":"7230",a130ae53:"7330",e2db9f7a:"7341","0debafb6":"7595","5fbc5cf1":"7624","1e29fbdb":"7780",fdcd530c:"7807",a56dc942:"7817",e2538a57:"7883","5985dcf4":"7969","7019eb68":"7987","9fb136ba":"8541","94a47589":"8586","06604d59":"8609",bca784a7:"8626","1c1cdb4e":"8704",f8ae958c:"8838",a94703ab:"9048",aaf8ab99:"9108","533ff15f":"9146",ba738306:"9167","5999894b":"9184",cc2baa30:"9218","509bfc31":"9308",e120dcd9:"9337","5b870ab8":"9378","8d820236":"9440",e82252d2:"9471",e3e59843:"9497","9875b4b5":"9629","5e95c892":"9647","4adc7347":"9736","6bb6da1f":"9891","7923f30a":"9998"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,b)=>{var f=r.o(e,a)?e[a]:void 0;if(0!==f)if(f)b.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((b,d)=>f=e[a]=[b,d]));b.push(f[2]=d);var c=r.p+r.u(a),t=new Error;r.l(c,(b=>{if(r.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var d=b&&("load"===b.type?"missing":b.type),c=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+c+")",t.name="ChunkLoadError",t.type=d,t.request=c,f[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var f,d,c=b[0],t=b[1],o=b[2],n=0;if(c.some((a=>0!==e[a]))){for(f in t)r.o(t,f)&&(r.m[f]=t[f]);if(o)var i=o(r)}for(a&&a(b);n{"use strict";var e,a,b,f,d,c={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var b=t[e]={id:e,loaded:!1,exports:{}};return c[e].call(b.exports,b,b.exports,r),b.loaded=!0,b.exports}r.m=c,r.c=t,e=[],r.O=(a,b,f,d)=>{if(!b){var c=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](b[o])))?b.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[b,f,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var c={};a=a||[null,b({}),b([]),b(b)];for(var t=2&f&&e;"object"==typeof t&&!~a.indexOf(t);t=b(t))Object.getOwnPropertyNames(t).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,r.d(d,c),d},r.d=(e,a)=>{for(var b in a)r.o(a,b)&&!r.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,b)=>(r.f[b](e,a),a)),[])),r.u=e=>"assets/js/"+({134:"b7bb6147",141:"28a0cb7e",337:"3f194bb7",447:"79bea677",463:"682c6856",484:"673b87a5",562:"5fadd32f",579:"9bb1131a",598:"c25a813d",626:"005b2ed7",646:"7b998695",662:"645cda15",871:"9978e21e",952:"2d66ba60",1235:"a7456010",1316:"1b560adb",1437:"8e76450a",1475:"9c3aeb12",1513:"add761da",1527:"778bcc8b",1603:"cb97154e",1863:"b4513eec",1864:"09d5ad39",1914:"1151f991",1953:"d24dc0ef",2134:"c4d2e5c1",2282:"6d990bb1",2408:"9abfa349",2412:"16a2713f",2557:"b1ee2929",2604:"b8663a1f",2627:"4769fc4e",2828:"49885c5e",2871:"3c883fc4",2916:"425e1ae2",2963:"922c21f9",3055:"7e6e598a",3124:"ef2a8751",3211:"1ed22fa3",3332:"e28eadbb",3705:"c75c8ede",3726:"a5e062ff",3729:"a525598e",3768:"e8953dad",3919:"f84fb341",3950:"b7007dab",3956:"a0ea14c4",3976:"0e384e19",4033:"ba6851eb",4213:"64d9acd1",4290:"ae603a5f",4291:"93f3c2aa",4455:"993d6a8d",4525:"4717d09b",4583:"1df93b7f",4643:"f44adc48",4676:"24503201",4876:"17682634",5120:"a5ad27b1",5186:"b0477c6d",5222:"b759477d",5282:"c1fff4ba",5348:"5402810c",5480:"80526ee6",5532:"e81f6410",5624:"9b932233",5634:"ef3b0775",5700:"b9f7b2ab",5742:"aba21aa0",5771:"8f2e4180",5864:"2ad05638",5960:"0657c530",6017:"8d981dc3",6131:"119a2918",6187:"e44e17f8",6208:"d4ac7305",6286:"e2f00550",6439:"ad6bd692",6613:"38541689",6651:"18672b0b",6773:"2146f16f",6828:"9976ff42",6900:"cc3979e2",6928:"def2ee80",6969:"14eb3368",7098:"a7bd4aaa",7117:"224c8fe8",7229:"eb78b783",7230:"93f75803",7330:"a130ae53",7341:"e2db9f7a",7595:"0debafb6",7624:"5fbc5cf1",7780:"1e29fbdb",7807:"fdcd530c",7817:"a56dc942",7883:"e2538a57",7969:"5985dcf4",7987:"7019eb68",8401:"17896441",8541:"9fb136ba",8586:"94a47589",8609:"06604d59",8626:"bca784a7",8704:"1c1cdb4e",8838:"f8ae958c",9048:"a94703ab",9108:"aaf8ab99",9146:"533ff15f",9167:"ba738306",9184:"5999894b",9218:"cc2baa30",9308:"509bfc31",9337:"e120dcd9",9378:"5b870ab8",9440:"8d820236",9471:"e82252d2",9497:"e3e59843",9629:"9875b4b5",9647:"5e95c892",9736:"4adc7347",9891:"6bb6da1f",9998:"7923f30a"}[e]||e)+"."+{134:"290a582f",141:"5d79e79a",337:"22bfc72a",447:"6aa8f6d6",463:"6d8a69a6",484:"d8f6d2d7",562:"04fe94e0",579:"d9ecc795",598:"dcaf95cd",626:"bcd286c8",646:"6ebe2686",662:"dca1c291",871:"44defd03",952:"a7127b7e",1235:"7b4b0a20",1316:"0fed137f",1437:"457a0c79",1475:"2ff5ffe7",1513:"257e3eec",1527:"2eb5e1de",1603:"44cfc0ec",1863:"a7844b85",1864:"836bb2d7",1914:"193b4b8f",1953:"47d18514",2134:"6f189758",2237:"ede9a640",2282:"6f96a3b4",2408:"620b16d7",2412:"f08ebda5",2557:"0daf59a0",2604:"aedceb6b",2627:"d5e77644",2828:"4bc7e5ad",2871:"d1c841d8",2916:"469cee91",2963:"e86c36fd",3055:"6c0dfde6",3124:"0dc9d49a",3211:"ff5f5ac6",3332:"9880c232",3705:"6029ecd0",3726:"0c80ff57",3729:"296cded1",3768:"d8af09d8",3919:"cf9c8bea",3950:"dce48c7e",3956:"74b8c7b1",3976:"9f5b9cab",4033:"f246b59f",4213:"93ae8c7e",4290:"fa5b263f",4291:"850dddd9",4455:"28bbc400",4525:"2e0c324e",4583:"f182b925",4643:"fe264cf6",4676:"df561d25",4876:"3d25384a",5120:"07b90a0d",5186:"24e2e5c9",5222:"05e92393",5282:"2ec0eaa6",5348:"3ad38ed6",5480:"b9a69f3d",5532:"60f06895",5624:"211be870",5634:"0187249f",5700:"fc7d833c",5742:"9ac6642b",5771:"6fb725c9",5864:"f7bde80c",5960:"aa8fdf00",6017:"5d6a3cde",6131:"18512c2f",6187:"709607a7",6208:"61c66b44",6286:"8ca4e8a2",6439:"2d8efa6d",6613:"b3b7a295",6651:"f10bbef6",6773:"fed3c84a",6828:"8da5bc72",6900:"f2efdc37",6928:"5fd884cc",6969:"eeb6b7e2",7098:"b82ee0df",7117:"bf31a5eb",7229:"33a8bdeb",7230:"260ce03e",7330:"46fa423f",7341:"810d7342",7595:"bf13c614",7624:"0e41cfdd",7780:"d5a6d9e6",7807:"3feb8b84",7817:"d708dd89",7883:"b963a51d",7969:"70d866fa",7987:"d044f45e",8401:"dcdbd021",8541:"64533b19",8586:"a4d56e94",8609:"18dbfdaf",8626:"09d406cb",8704:"e543d3ff",8838:"a3ca5c4d",9048:"2668bc5b",9108:"a5aed152",9146:"e81f7cd6",9167:"fde851af",9184:"aaf5b65a",9218:"3cda2f1c",9308:"be1fbadb",9337:"22e90422",9378:"e5b723a6",9440:"525617f1",9471:"9b22e8ad",9497:"a3e0afab",9629:"9ea44d6b",9647:"b1f5748f",9736:"7ae4e26a",9891:"10bde74f",9998:"012c6902"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},d="website:",r.l=(e,a,b,c)=>{if(f[e])f[e].push(a);else{var t,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=f[e];if(delete f[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/starknet-devnet-rs/",r.gca=function(e){return e={17682634:"4876",17896441:"8401",24503201:"4676",38541689:"6613",b7bb6147:"134","28a0cb7e":"141","3f194bb7":"337","79bea677":"447","682c6856":"463","673b87a5":"484","5fadd32f":"562","9bb1131a":"579",c25a813d:"598","005b2ed7":"626","7b998695":"646","645cda15":"662","9978e21e":"871","2d66ba60":"952",a7456010:"1235","1b560adb":"1316","8e76450a":"1437","9c3aeb12":"1475",add761da:"1513","778bcc8b":"1527",cb97154e:"1603",b4513eec:"1863","09d5ad39":"1864","1151f991":"1914",d24dc0ef:"1953",c4d2e5c1:"2134","6d990bb1":"2282","9abfa349":"2408","16a2713f":"2412",b1ee2929:"2557",b8663a1f:"2604","4769fc4e":"2627","49885c5e":"2828","3c883fc4":"2871","425e1ae2":"2916","922c21f9":"2963","7e6e598a":"3055",ef2a8751:"3124","1ed22fa3":"3211",e28eadbb:"3332",c75c8ede:"3705",a5e062ff:"3726",a525598e:"3729",e8953dad:"3768",f84fb341:"3919",b7007dab:"3950",a0ea14c4:"3956","0e384e19":"3976",ba6851eb:"4033","64d9acd1":"4213",ae603a5f:"4290","93f3c2aa":"4291","993d6a8d":"4455","4717d09b":"4525","1df93b7f":"4583",f44adc48:"4643",a5ad27b1:"5120",b0477c6d:"5186",b759477d:"5222",c1fff4ba:"5282","5402810c":"5348","80526ee6":"5480",e81f6410:"5532","9b932233":"5624",ef3b0775:"5634",b9f7b2ab:"5700",aba21aa0:"5742","8f2e4180":"5771","2ad05638":"5864","0657c530":"5960","8d981dc3":"6017","119a2918":"6131",e44e17f8:"6187",d4ac7305:"6208",e2f00550:"6286",ad6bd692:"6439","18672b0b":"6651","2146f16f":"6773","9976ff42":"6828",cc3979e2:"6900",def2ee80:"6928","14eb3368":"6969",a7bd4aaa:"7098","224c8fe8":"7117",eb78b783:"7229","93f75803":"7230",a130ae53:"7330",e2db9f7a:"7341","0debafb6":"7595","5fbc5cf1":"7624","1e29fbdb":"7780",fdcd530c:"7807",a56dc942:"7817",e2538a57:"7883","5985dcf4":"7969","7019eb68":"7987","9fb136ba":"8541","94a47589":"8586","06604d59":"8609",bca784a7:"8626","1c1cdb4e":"8704",f8ae958c:"8838",a94703ab:"9048",aaf8ab99:"9108","533ff15f":"9146",ba738306:"9167","5999894b":"9184",cc2baa30:"9218","509bfc31":"9308",e120dcd9:"9337","5b870ab8":"9378","8d820236":"9440",e82252d2:"9471",e3e59843:"9497","9875b4b5":"9629","5e95c892":"9647","4adc7347":"9736","6bb6da1f":"9891","7923f30a":"9998"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,b)=>{var f=r.o(e,a)?e[a]:void 0;if(0!==f)if(f)b.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((b,d)=>f=e[a]=[b,d]));b.push(f[2]=d);var c=r.p+r.u(a),t=new Error;r.l(c,(b=>{if(r.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var d=b&&("load"===b.type?"missing":b.type),c=b&&b.target&&b.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+c+")",t.name="ChunkLoadError",t.type=d,t.request=c,f[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,b)=>{var f,d,c=b[0],t=b[1],o=b[2],n=0;if(c.some((a=>0!==e[a]))){for(f in t)r.o(t,f)&&(r.m[f]=t[f]);if(o)var i=o(r)}for(a&&a(b);n Account impersonation | Starknet Devnet - + diff --git a/docs/0.0.6/api.html b/docs/0.0.6/api.html index 4ad1816ac..456c18597 100644 --- a/docs/0.0.6/api.html +++ b/docs/0.0.6/api.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/0.0.6/balance.html b/docs/0.0.6/balance.html index a515bfdef..097bc6084 100644 --- a/docs/0.0.6/balance.html +++ b/docs/0.0.6/balance.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/0.0.6/blocks.html b/docs/0.0.6/blocks.html index 5410f053a..4a31ccea8 100644 --- a/docs/0.0.6/blocks.html +++ b/docs/0.0.6/blocks.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/0.0.6/category/running.html b/docs/0.0.6/category/running.html index 2222f925d..c1533caee 100644 --- a/docs/0.0.6/category/running.html +++ b/docs/0.0.6/category/running.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/0.0.6/dump-load-restart.html b/docs/0.0.6/dump-load-restart.html index da849f47e..b4b9bc576 100644 --- a/docs/0.0.6/dump-load-restart.html +++ b/docs/0.0.6/dump-load-restart.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/0.0.6/forking.html b/docs/0.0.6/forking.html index 7f7949337..f806a6ac3 100644 --- a/docs/0.0.6/forking.html +++ b/docs/0.0.6/forking.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/0.0.6/historic-state.html b/docs/0.0.6/historic-state.html index 7b4dc59ab..bf386062d 100644 --- a/docs/0.0.6/historic-state.html +++ b/docs/0.0.6/historic-state.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/0.0.6/intro.html b/docs/0.0.6/intro.html index 6fba308fe..cb72ef51e 100644 --- a/docs/0.0.6/intro.html +++ b/docs/0.0.6/intro.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/0.0.6/lite.html b/docs/0.0.6/lite.html index 14e10405c..ff135b331 100644 --- a/docs/0.0.6/lite.html +++ b/docs/0.0.6/lite.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/0.0.6/postman.html b/docs/0.0.6/postman.html index 74840ac38..54d09f8ef 100644 --- a/docs/0.0.6/postman.html +++ b/docs/0.0.6/postman.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/0.0.6/predeployed.html b/docs/0.0.6/predeployed.html index 29989bd50..099f383b1 100644 --- a/docs/0.0.6/predeployed.html +++ b/docs/0.0.6/predeployed.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/0.0.6/running/cli.html b/docs/0.0.6/running/cli.html index d7b31da79..cbaa30ea9 100644 --- a/docs/0.0.6/running/cli.html +++ b/docs/0.0.6/running/cli.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/0.0.6/running/docker.html b/docs/0.0.6/running/docker.html index 24a2678d5..db5b1b0ac 100644 --- a/docs/0.0.6/running/docker.html +++ b/docs/0.0.6/running/docker.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/0.0.6/running/install.html b/docs/0.0.6/running/install.html index 128510fc4..6baad4bc9 100644 --- a/docs/0.0.6/running/install.html +++ b/docs/0.0.6/running/install.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/0.0.6/server-config.html b/docs/0.0.6/server-config.html index 42c3c8deb..a15342fba 100644 --- a/docs/0.0.6/server-config.html +++ b/docs/0.0.6/server-config.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/0.0.6/starknet-time.html b/docs/0.0.6/starknet-time.html index 8c275d26c..e8b389a48 100644 --- a/docs/0.0.6/starknet-time.html +++ b/docs/0.0.6/starknet-time.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/0.0.7/account-impersonation.html b/docs/0.0.7/account-impersonation.html index 6b9011e2e..338f5f625 100644 --- a/docs/0.0.7/account-impersonation.html +++ b/docs/0.0.7/account-impersonation.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/0.0.7/api.html b/docs/0.0.7/api.html index 2959d6036..4bb9682c8 100644 --- a/docs/0.0.7/api.html +++ b/docs/0.0.7/api.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/0.0.7/balance.html b/docs/0.0.7/balance.html index 61a29b453..00ea4c0f5 100644 --- a/docs/0.0.7/balance.html +++ b/docs/0.0.7/balance.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/0.0.7/blocks.html b/docs/0.0.7/blocks.html index 20bfaa5f5..2a5b1beb2 100644 --- a/docs/0.0.7/blocks.html +++ b/docs/0.0.7/blocks.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/0.0.7/category/running.html b/docs/0.0.7/category/running.html index 5333ae88c..b43db9263 100644 --- a/docs/0.0.7/category/running.html +++ b/docs/0.0.7/category/running.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/0.0.7/dump-load-restart.html b/docs/0.0.7/dump-load-restart.html index cbddf7286..07cb423ff 100644 --- a/docs/0.0.7/dump-load-restart.html +++ b/docs/0.0.7/dump-load-restart.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/0.0.7/forking.html b/docs/0.0.7/forking.html index 27b19aee1..ea675106a 100644 --- a/docs/0.0.7/forking.html +++ b/docs/0.0.7/forking.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/0.0.7/historic-state.html b/docs/0.0.7/historic-state.html index fb98d9a1e..efe4fa3e0 100644 --- a/docs/0.0.7/historic-state.html +++ b/docs/0.0.7/historic-state.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/0.0.7/intro.html b/docs/0.0.7/intro.html index 396998b86..0afa7fcc8 100644 --- a/docs/0.0.7/intro.html +++ b/docs/0.0.7/intro.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/0.0.7/lite.html b/docs/0.0.7/lite.html index 45a5a735e..bab719bec 100644 --- a/docs/0.0.7/lite.html +++ b/docs/0.0.7/lite.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/0.0.7/postman.html b/docs/0.0.7/postman.html index aa7685896..945ed0808 100644 --- a/docs/0.0.7/postman.html +++ b/docs/0.0.7/postman.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/0.0.7/predeployed.html b/docs/0.0.7/predeployed.html index 5e6162714..d3e4de7c1 100644 --- a/docs/0.0.7/predeployed.html +++ b/docs/0.0.7/predeployed.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/0.0.7/running/cli.html b/docs/0.0.7/running/cli.html index 0d701de40..4d209a277 100644 --- a/docs/0.0.7/running/cli.html +++ b/docs/0.0.7/running/cli.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/0.0.7/running/docker.html b/docs/0.0.7/running/docker.html index e3df71a4a..8f3fe4fc4 100644 --- a/docs/0.0.7/running/docker.html +++ b/docs/0.0.7/running/docker.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/0.0.7/running/install.html b/docs/0.0.7/running/install.html index d4d1f03a0..6a11fd8dc 100644 --- a/docs/0.0.7/running/install.html +++ b/docs/0.0.7/running/install.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/0.0.7/server-config.html b/docs/0.0.7/server-config.html index aae1a6708..14682ac22 100644 --- a/docs/0.0.7/server-config.html +++ b/docs/0.0.7/server-config.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/0.0.7/starknet-time.html b/docs/0.0.7/starknet-time.html index 3c9e536b1..0ffe0cbe9 100644 --- a/docs/0.0.7/starknet-time.html +++ b/docs/0.0.7/starknet-time.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/0.1.1/account-impersonation.html b/docs/0.1.1/account-impersonation.html index 9eec020a7..672135036 100644 --- a/docs/0.1.1/account-impersonation.html +++ b/docs/0.1.1/account-impersonation.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/0.1.1/api.html b/docs/0.1.1/api.html index 2c6360da0..a00020d56 100644 --- a/docs/0.1.1/api.html +++ b/docs/0.1.1/api.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/0.1.1/balance.html b/docs/0.1.1/balance.html index 7dfa708f7..03708038c 100644 --- a/docs/0.1.1/balance.html +++ b/docs/0.1.1/balance.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/0.1.1/blocks.html b/docs/0.1.1/blocks.html index 1b5ac7d23..36e906be8 100644 --- a/docs/0.1.1/blocks.html +++ b/docs/0.1.1/blocks.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/0.1.1/category/running.html b/docs/0.1.1/category/running.html index 5e1638b04..7b5015ac7 100644 --- a/docs/0.1.1/category/running.html +++ b/docs/0.1.1/category/running.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/0.1.1/dump-load-restart.html b/docs/0.1.1/dump-load-restart.html index 4aca17010..7b5010bb8 100644 --- a/docs/0.1.1/dump-load-restart.html +++ b/docs/0.1.1/dump-load-restart.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/0.1.1/forking.html b/docs/0.1.1/forking.html index 0895a4862..a25e54e5e 100644 --- a/docs/0.1.1/forking.html +++ b/docs/0.1.1/forking.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/0.1.1/historic-state.html b/docs/0.1.1/historic-state.html index 1fadc5981..9c5945ef9 100644 --- a/docs/0.1.1/historic-state.html +++ b/docs/0.1.1/historic-state.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/0.1.1/intro.html b/docs/0.1.1/intro.html index b759f8d50..1956ec9fb 100644 --- a/docs/0.1.1/intro.html +++ b/docs/0.1.1/intro.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/0.1.1/lite.html b/docs/0.1.1/lite.html index 07a73964e..b48d1546b 100644 --- a/docs/0.1.1/lite.html +++ b/docs/0.1.1/lite.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/0.1.1/postman.html b/docs/0.1.1/postman.html index 5baeb8da7..46ceca499 100644 --- a/docs/0.1.1/postman.html +++ b/docs/0.1.1/postman.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/0.1.1/predeployed.html b/docs/0.1.1/predeployed.html index 0443eaf55..e4ba2dc11 100644 --- a/docs/0.1.1/predeployed.html +++ b/docs/0.1.1/predeployed.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/0.1.1/running/cli.html b/docs/0.1.1/running/cli.html index f6ebf2ad0..25613396d 100644 --- a/docs/0.1.1/running/cli.html +++ b/docs/0.1.1/running/cli.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/0.1.1/running/docker.html b/docs/0.1.1/running/docker.html index 7450449db..eae8ea6a7 100644 --- a/docs/0.1.1/running/docker.html +++ b/docs/0.1.1/running/docker.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/0.1.1/running/install.html b/docs/0.1.1/running/install.html index fef8765a8..a30f81d93 100644 --- a/docs/0.1.1/running/install.html +++ b/docs/0.1.1/running/install.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/0.1.1/server-config.html b/docs/0.1.1/server-config.html index f1197c373..9d85f7d12 100644 --- a/docs/0.1.1/server-config.html +++ b/docs/0.1.1/server-config.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/0.1.1/starknet-time.html b/docs/0.1.1/starknet-time.html index a85ba64c9..5f57fbde2 100644 --- a/docs/0.1.1/starknet-time.html +++ b/docs/0.1.1/starknet-time.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/0.1.2/account-impersonation.html b/docs/0.1.2/account-impersonation.html index 13ddeb0be..d6696e405 100644 --- a/docs/0.1.2/account-impersonation.html +++ b/docs/0.1.2/account-impersonation.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/0.1.2/api.html b/docs/0.1.2/api.html index fe5c04f62..f37311116 100644 --- a/docs/0.1.2/api.html +++ b/docs/0.1.2/api.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/0.1.2/balance.html b/docs/0.1.2/balance.html index e2828d058..d27808f49 100644 --- a/docs/0.1.2/balance.html +++ b/docs/0.1.2/balance.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/0.1.2/blocks.html b/docs/0.1.2/blocks.html index d6c73089f..c4a518514 100644 --- a/docs/0.1.2/blocks.html +++ b/docs/0.1.2/blocks.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/0.1.2/category/running.html b/docs/0.1.2/category/running.html index dde5aae04..a747b1188 100644 --- a/docs/0.1.2/category/running.html +++ b/docs/0.1.2/category/running.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/0.1.2/dump-load-restart.html b/docs/0.1.2/dump-load-restart.html index 7c350e599..07be9c27c 100644 --- a/docs/0.1.2/dump-load-restart.html +++ b/docs/0.1.2/dump-load-restart.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/0.1.2/examples.html b/docs/0.1.2/examples.html index ff9884e40..e6fda86d3 100644 --- a/docs/0.1.2/examples.html +++ b/docs/0.1.2/examples.html @@ -4,7 +4,7 @@ Examples | Starknet Devnet - + diff --git a/docs/0.1.2/forking.html b/docs/0.1.2/forking.html index c82164fb4..597c9e85b 100644 --- a/docs/0.1.2/forking.html +++ b/docs/0.1.2/forking.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/0.1.2/historic-state.html b/docs/0.1.2/historic-state.html index e9996cfe2..eb746dc15 100644 --- a/docs/0.1.2/historic-state.html +++ b/docs/0.1.2/historic-state.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/0.1.2/intro.html b/docs/0.1.2/intro.html index 82ce81efa..4ac508542 100644 --- a/docs/0.1.2/intro.html +++ b/docs/0.1.2/intro.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/0.1.2/lite.html b/docs/0.1.2/lite.html index c830f4fac..56b2862dc 100644 --- a/docs/0.1.2/lite.html +++ b/docs/0.1.2/lite.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/0.1.2/postman.html b/docs/0.1.2/postman.html index 3784e3dbc..5fcb7b0b1 100644 --- a/docs/0.1.2/postman.html +++ b/docs/0.1.2/postman.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/0.1.2/predeployed.html b/docs/0.1.2/predeployed.html index 7e4907382..57c225e31 100644 --- a/docs/0.1.2/predeployed.html +++ b/docs/0.1.2/predeployed.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/0.1.2/running/cli.html b/docs/0.1.2/running/cli.html index 511af5f79..9f6e741e4 100644 --- a/docs/0.1.2/running/cli.html +++ b/docs/0.1.2/running/cli.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/0.1.2/running/docker.html b/docs/0.1.2/running/docker.html index 35a782096..c3d7edd55 100644 --- a/docs/0.1.2/running/docker.html +++ b/docs/0.1.2/running/docker.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/0.1.2/running/install.html b/docs/0.1.2/running/install.html index c0fdcce72..418bf526c 100644 --- a/docs/0.1.2/running/install.html +++ b/docs/0.1.2/running/install.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/0.1.2/server-config.html b/docs/0.1.2/server-config.html index e6f8237de..4c935afcf 100644 --- a/docs/0.1.2/server-config.html +++ b/docs/0.1.2/server-config.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/0.1.2/starknet-time.html b/docs/0.1.2/starknet-time.html index 4637ea9d6..9117f6475 100644 --- a/docs/0.1.2/starknet-time.html +++ b/docs/0.1.2/starknet-time.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/account-impersonation.html b/docs/account-impersonation.html index a35ff3234..304a1fa15 100644 --- a/docs/account-impersonation.html +++ b/docs/account-impersonation.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/api.html b/docs/api.html index 524cddd1d..70c81cc75 100644 --- a/docs/api.html +++ b/docs/api.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/balance.html b/docs/balance.html index 25be59859..38c619162 100644 --- a/docs/balance.html +++ b/docs/balance.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/blocks.html b/docs/blocks.html index ba9520748..3294c5d2a 100644 --- a/docs/blocks.html +++ b/docs/blocks.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/category/running.html b/docs/category/running.html index 4f012723e..95cc6da22 100644 --- a/docs/category/running.html +++ b/docs/category/running.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/dump-load-restart.html b/docs/dump-load-restart.html index e0b12da76..cc934ffb5 100644 --- a/docs/dump-load-restart.html +++ b/docs/dump-load-restart.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/examples.html b/docs/examples.html index f1feab4c9..c1d264617 100644 --- a/docs/examples.html +++ b/docs/examples.html @@ -4,7 +4,7 @@ Examples | Starknet Devnet - + diff --git a/docs/forking.html b/docs/forking.html index 36cafb0df..ce92eca05 100644 --- a/docs/forking.html +++ b/docs/forking.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/gas.html b/docs/gas.html index d39396575..03636f759 100644 --- a/docs/gas.html +++ b/docs/gas.html @@ -4,7 +4,7 @@ Gas price modification | Starknet Devnet - + diff --git a/docs/historic-state.html b/docs/historic-state.html index 7823ecd6c..4754d1aa6 100644 --- a/docs/historic-state.html +++ b/docs/historic-state.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/intro.html b/docs/intro.html index 9043c1585..1f65bb70d 100644 --- a/docs/intro.html +++ b/docs/intro.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/lite.html b/docs/lite.html index 03392ffbb..7dc3efdd5 100644 --- a/docs/lite.html +++ b/docs/lite.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/next/account-impersonation.html b/docs/next/account-impersonation.html index 1cc95684d..8dd789a9c 100644 --- a/docs/next/account-impersonation.html +++ b/docs/next/account-impersonation.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/next/api.html b/docs/next/api.html index 37fa6318b..25fd5048e 100644 --- a/docs/next/api.html +++ b/docs/next/api.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/next/balance.html b/docs/next/balance.html index 1f78c972d..10825f7a2 100644 --- a/docs/next/balance.html +++ b/docs/next/balance.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/next/blocks.html b/docs/next/blocks.html index 3de89e226..4633dca85 100644 --- a/docs/next/blocks.html +++ b/docs/next/blocks.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/next/category/running.html b/docs/next/category/running.html index 1512cf77d..ca885ce3f 100644 --- a/docs/next/category/running.html +++ b/docs/next/category/running.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/next/dump-load-restart.html b/docs/next/dump-load-restart.html index 9b6985879..0c7016dfd 100644 --- a/docs/next/dump-load-restart.html +++ b/docs/next/dump-load-restart.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/next/examples.html b/docs/next/examples.html index 31ae90ac9..853c1cbc1 100644 --- a/docs/next/examples.html +++ b/docs/next/examples.html @@ -4,7 +4,7 @@ Examples | Starknet Devnet - + diff --git a/docs/next/forking.html b/docs/next/forking.html index 77a6f9ea5..adfb8a141 100644 --- a/docs/next/forking.html +++ b/docs/next/forking.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/next/gas.html b/docs/next/gas.html index 3cee3317f..85d113645 100644 --- a/docs/next/gas.html +++ b/docs/next/gas.html @@ -4,7 +4,7 @@ Gas price modification | Starknet Devnet - + diff --git a/docs/next/historic-state.html b/docs/next/historic-state.html index 95f574b04..35b8dfa3f 100644 --- a/docs/next/historic-state.html +++ b/docs/next/historic-state.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/next/intro.html b/docs/next/intro.html index 7d04e51f2..d7d6236a0 100644 --- a/docs/next/intro.html +++ b/docs/next/intro.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/next/lite.html b/docs/next/lite.html index 8d6111a17..814c3a2d3 100644 --- a/docs/next/lite.html +++ b/docs/next/lite.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/next/postman.html b/docs/next/postman.html index 2ce14fde6..6833cdbc2 100644 --- a/docs/next/postman.html +++ b/docs/next/postman.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/next/predeployed.html b/docs/next/predeployed.html index a1f4ad517..079fac71a 100644 --- a/docs/next/predeployed.html +++ b/docs/next/predeployed.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/next/restrictive.html b/docs/next/restrictive.html index d0bd2aa2a..d3b2e9a4c 100644 --- a/docs/next/restrictive.html +++ b/docs/next/restrictive.html @@ -4,7 +4,7 @@ Restrictive mode | Starknet Devnet - + diff --git a/docs/next/running/cli.html b/docs/next/running/cli.html index b4b7b7a8d..d44711b71 100644 --- a/docs/next/running/cli.html +++ b/docs/next/running/cli.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/next/running/docker.html b/docs/next/running/docker.html index feaf0e0b0..0ea3a3bbc 100644 --- a/docs/next/running/docker.html +++ b/docs/next/running/docker.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/next/running/install.html b/docs/next/running/install.html index 3dbce2dbb..c0a3e6c32 100644 --- a/docs/next/running/install.html +++ b/docs/next/running/install.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + @@ -26,8 +26,22 @@

Install
$ cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked

Install with asdf

    -
  • Follow the instructions from the asdf-starknet-devnet repo.
  • +
  • Run the following to add the starknet-devnet plugin
+
$ asdf plugin add starknet-devnet
+
    +
  • Show all installable versions:
  • +
+
$ asdf list-all starknet-devnet
+
    +
  • Install latest version:
  • +
+
$ asdf install starknet-devnet latest
+
    +
  • Install specific version:
  • +
+
$ asdf install starknet-devnet 0.2.0
+

Check asdf guide for more instructions on how to install & manage versions.

Run the installed executable

When cargo install finishes, follow the output in your terminal. If properly configured, you should be able to run Devnet with:

$ starknet-devnet
diff --git a/docs/next/server-config.html b/docs/next/server-config.html index 0e0bd0f72..b01b53671 100644 --- a/docs/next/server-config.html +++ b/docs/next/server-config.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/next/starknet-time.html b/docs/next/starknet-time.html index dc9ef670e..8f52c81b4 100644 --- a/docs/next/starknet-time.html +++ b/docs/next/starknet-time.html @@ -4,13 +4,13 @@ Starknet time | Starknet Devnet - +
Version: Next

Starknet time

Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods /set_time, /increase_time and JSON-RPC methods devnet_setTime, devnet_increaseTime generate a new block. This can be changed for /set_time (devnet_setTime) by setting the optional parameter generate_block to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.

-

All values should be set in Unix time seconds.

+

All values should be set in Unix time seconds. After startup, the time progresses naturally.

Set time

The following sets the exact time and generates a new block:

POST /set_time
{
"time": TIME_IN_SECONDS
}
@@ -23,8 +23,10 @@

Increase time<

Increases the block timestamp by the provided amount and generates a new block. All subsequent blocks will keep this increment.

POST /increase_time
{
"time": TIME_IN_SECONDS
}
JSON-RPC
{
"jsonrpc": "2.0",
"id": "1",
"method": "devnet_increaseTime",
"params": {
"time": TIME_IN_SECONDS
}
}
-

Start time argument

-

Devnet's time can be defined on startup via CLI by providing a positive value to --start-time:

-
$ starknet-devnet --start-time <SECONDS>
+
Increment example

Imagine a block is generated with timestamp T1, some time passes (let's call this interval T_passed), and you call increase_time with T_inc as the argument, which immediately mines a new block at T2. T2 should equal T1 + T_passed + T_inc.

+

Start time

+

Devnet's starting timestamp can be defined via CLI by providing a positive value of Unix time seconds to --start-time:

+
$ starknet-devnet --start-time <SECONDS>
+

If provided, this timestamp shall be used in mining the genesis block. The default value is the current Unix time.

\ No newline at end of file diff --git a/docs/postman.html b/docs/postman.html index f424eaba0..4ffd2bb8d 100644 --- a/docs/postman.html +++ b/docs/postman.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/predeployed.html b/docs/predeployed.html index 551f56d4d..d8f5d1918 100644 --- a/docs/predeployed.html +++ b/docs/predeployed.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/restrictive.html b/docs/restrictive.html index 71620ae1b..305a1e613 100644 --- a/docs/restrictive.html +++ b/docs/restrictive.html @@ -4,7 +4,7 @@ Restrictive mode | Starknet Devnet - + diff --git a/docs/running/cli.html b/docs/running/cli.html index cf43d956e..6a0d5e1f7 100644 --- a/docs/running/cli.html +++ b/docs/running/cli.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/running/docker.html b/docs/running/docker.html index f15cd370f..46913fba4 100644 --- a/docs/running/docker.html +++ b/docs/running/docker.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/running/install.html b/docs/running/install.html index a6afcd1bc..fffc5392e 100644 --- a/docs/running/install.html +++ b/docs/running/install.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + @@ -26,8 +26,22 @@

Install
$ cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked

Install with asdf

    -
  • Follow the instructions from the asdf-starknet-devnet repo.
  • +
  • Run the following to add the starknet-devnet plugin
+
$ asdf plugin add starknet-devnet
+
    +
  • Show all installable versions:
  • +
+
$ asdf list-all starknet-devnet
+
    +
  • Install latest version:
  • +
+
$ asdf install starknet-devnet latest
+
    +
  • Install specific version:
  • +
+
$ asdf install starknet-devnet 0.2.0
+

Check asdf guide for more instructions on how to install & manage versions.

Run the installed executable

When cargo install finishes, follow the output in your terminal. If properly configured, you should be able to run Devnet with:

$ starknet-devnet
diff --git a/docs/server-config.html b/docs/server-config.html index d02b3184c..f12d5c5c6 100644 --- a/docs/server-config.html +++ b/docs/server-config.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/starknet-time.html b/docs/starknet-time.html index 168f6555f..f97a0b10f 100644 --- a/docs/starknet-time.html +++ b/docs/starknet-time.html @@ -4,18 +4,18 @@ Starknet time | Starknet Devnet - +
Version: 0.2.0

Starknet time

Block and state timestamp can be manipulated by setting the exact time or setting the time offset. By default, timestamp methods /set_time, /increase_time and JSON-RPC methods devnet_setTime, devnet_increaseTime generate a new block. This can be changed for /set_time (devnet_setTime) by setting the optional parameter generate_block to false. This skips immediate new block generation, but will use the specified timestamp whenever the next block is supposed to be generated.

-

All values should be set in Unix time seconds.

+

All values should be set in Unix time seconds. After startup, the time progresses naturally.

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
{
"time": TIME_IN_SECONDS
}
JSON-RPC
{
"jsonrpc": "2.0",
"id": "1",
"method": "devnet_setTime",
"params": {
"time": TIME_IN_SECONDS
}
}
-

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
{
"time": TIME_IN_SECONDS,
"generate_block": false
}
JSON-RPC
{
"jsonrpc": "2.0",
"id": "1",
"method": "devnet_setTime",
"params": {
"time": TIME_IN_SECONDS,
"generate_block": false
}
}

Warning: block time can be set in the past which might lead to unexpected behavior!

@@ -23,8 +23,10 @@

Increase time<

Increases the block timestamp by the provided amount and generates a new block. All subsequent blocks will keep this increment.

POST /increase_time
{
"time": TIME_IN_SECONDS
}
JSON-RPC
{
"jsonrpc": "2.0",
"id": "1",
"method": "devnet_increaseTime",
"params": {
"time": TIME_IN_SECONDS
}
}
-

Start time argument

-

Devnet can be started with --start-time CLI argument, where START_TIME_IN_SECONDS should be greater than 0.

-
$ starknet-devnet --start-time <START_TIME_IN_SECONDS>
+
Increment example

Imagine a block is generated with timestamp T1, some time passes (let's call this interval T_passed), and you call increase_time with T_inc as the argument, which immediately mines a new block at T2. T2 should equal T1 + T_passed + T_inc.

+

Start time

+

Devnet's starting timestamp can be defined via CLI by providing a positive value of Unix time seconds to --start-time:

+
$ starknet-devnet --start-time <SECONDS>
+

If provided, this timestamp shall be used in mining the genesis block. The default value is the current Unix time.

\ No newline at end of file diff --git a/index.html b/index.html index 9543ad4dd..48fc531d3 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Home | Starknet Devnet - +