diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 7d0aee1e..3c447f29 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -53,6 +53,8 @@ - [Dojoup](./toolchain/dojoup.md) - [Sozo](./toolchain/sozo/overview.md) - [Reference](./toolchain/sozo/reference.md) + - [profile](./toolchain/sozo/common-options/profile.md) + - [offline](./toolchain/sozo/common-options/offline.md) - [init](./toolchain/sozo/project-commands/init.md) - [build](./toolchain/sozo/project-commands/build.md) - [test](./toolchain/sozo/project-commands/test.md) @@ -69,7 +71,8 @@ - [Reference](./toolchain/torii/reference.md) - [Graphql](./toolchain/torii/graphql.md) - [Slot](./toolchain/slot/overview.md) - - [Referrence](./toolchain/slot/reference.md) + - [Reference](./toolchain/slot/reference.md) + - [Deployments](./toolchain/slot/deployments-commands/deployments.md) # Deploying diff --git a/src/toolchain/sozo/common-options/offline.md b/src/toolchain/sozo/common-options/offline.md new file mode 100644 index 00000000..713d8cc6 --- /dev/null +++ b/src/toolchain/sozo/common-options/offline.md @@ -0,0 +1,18 @@ +# offline +## use sozo offline + +`--offline` +    Run without accessing the network. +    [env: SOZO_OFFLINE=] + +### USAGE + +```sh +sozo --offline [COMMAND] +``` + +For example + +```sh +sozo --offline build +``` \ No newline at end of file diff --git a/src/toolchain/sozo/common-options/profile.md b/src/toolchain/sozo/common-options/profile.md new file mode 100644 index 00000000..499aaffc --- /dev/null +++ b/src/toolchain/sozo/common-options/profile.md @@ -0,0 +1,41 @@ +## use sozo profiles + +Profiles can be convenient when dealing with multiple environments (dev, staging, prod) + +`--profile` +    Specify profile to use by name. + +`--dev` +    Use dev profile. + +`--release` +    Use release profile. + + +### USAGE + +Multiple profiles can be defined in Scarb.toml + +```sh +[profile.dev.tool.dojo.env] +rpc_url = "http://localhost:5050" +account_address = "0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973" +private_key = "0x1800000000300000180000000000030000000000003006001800006600" + +[profile.staging.tool.dojo.env] +rpc_url = "https://api.cartridge.gg/x/mydojoproject/katana" +account_address = "0x5686a647a9cdd63ade617e0baf3b364856b813b508f03903eb58a7e622d5855" +private_key = "0x33003003001800009900180300d206308b0070db00121318d17b5e6262150b" +``` + +Then used with sozo commands + +```sh +sozo --profile dev migrate +``` + +is equivalent to + +```sh +sozo migrate --rpc-url http://localhost:5050 --account-address 0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973 --private-key 0x1800000000300000180000000000030000000000003006001800006600 +``` diff --git a/src/toolchain/sozo/project-commands/migrate.md b/src/toolchain/sozo/project-commands/migrate.md index 53943f77..e871140b 100644 --- a/src/toolchain/sozo/project-commands/migrate.md +++ b/src/toolchain/sozo/project-commands/migrate.md @@ -50,3 +50,9 @@ sozo migrate --name ohayo --rpc-url http://localhost:5050 ```sh sozo migrate --world 0x123456 ``` + +3. Deploying your World using [profile options](../common-options/profile-options.md) + +```sh +sozo --profile dev migrate +``` \ No newline at end of file diff --git a/src/toolchain/sozo/reference.md b/src/toolchain/sozo/reference.md index ce23c182..60951c9a 100644 --- a/src/toolchain/sozo/reference.md +++ b/src/toolchain/sozo/reference.md @@ -1,5 +1,10 @@ ## sozo reference +### Common options + +- [profile](./common-options/profile.md) +- [offline](./common-options/offline.md) + ### Project Commands - [init](./project-commands/init.md)