diff --git a/.github/workflows/iroha2-dev-nightly.yml b/.github/workflows/iroha2-dev-nightly.yml index 1b7b5d6237e..9cfee5a0726 100644 --- a/.github/workflows/iroha2-dev-nightly.yml +++ b/.github/workflows/iroha2-dev-nightly.yml @@ -41,11 +41,11 @@ jobs: with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push iroha2:dev-nightly image + - name: Build and push iroha:testnet-2.0.0-rc.1-nightly image uses: docker/build-push-action@v6 with: push: true - tags: hyperledger/iroha:dev-nightly-${{ github.sha }} + tags: hyperledger/iroha:testnet-2.0.0-rc.1-nightly-${{ github.sha }} labels: commit=${{ github.sha }} build-args: TAG=dev # This context specification is required diff --git a/.github/workflows/iroha2-dev-pr-static.yml b/.github/workflows/iroha2-dev-pr-static.yml index e276eebe678..edf13a6b903 100644 --- a/.github/workflows/iroha2-dev-pr-static.yml +++ b/.github/workflows/iroha2-dev-pr-static.yml @@ -2,7 +2,7 @@ name: I2::Dev::Static on: pull_request: - branches: [ main ] + branches: [testnet/2.0.0-rc.1] paths: - '**.rs' - '**.json' diff --git a/.github/workflows/iroha2-dev-pr-title.yml b/.github/workflows/iroha2-dev-pr-title.yml index 1541f3f2516..4d821609853 100644 --- a/.github/workflows/iroha2-dev-pr-title.yml +++ b/.github/workflows/iroha2-dev-pr-title.yml @@ -2,7 +2,7 @@ name: I2::Dev::Title on: pull_request_target: - branches: [main] + branches: [testnet/2.0.0-rc.1] types: [opened, edited, synchronize, reopened] permissions: @@ -46,4 +46,4 @@ jobs: uses: marocchino/sticky-pull-request-comment@v2 with: header: pr-title-lint-error - delete: true \ No newline at end of file + delete: true diff --git a/.github/workflows/iroha2-dev-pr-wasm.yml b/.github/workflows/iroha2-dev-pr-wasm.yml index ab682d7f657..cfd04aed71b 100644 --- a/.github/workflows/iroha2-dev-pr-wasm.yml +++ b/.github/workflows/iroha2-dev-pr-wasm.yml @@ -2,7 +2,7 @@ name: I2::Dev::Wasm on: pull_request: - branches: [main] + branches: [testnet/2.0.0-rc.1] paths: - '.github/workflows/iroha2-dev-pr-wasm.yaml' diff --git a/.github/workflows/iroha2-dev-pr.yml b/.github/workflows/iroha2-dev-pr.yml index b451f9a0d06..59306e668ce 100644 --- a/.github/workflows/iroha2-dev-pr.yml +++ b/.github/workflows/iroha2-dev-pr.yml @@ -2,7 +2,7 @@ name: I2::Dev::Tests on: pull_request: - branches: [main] + branches: [testnet/2.0.0-rc.1] paths: - '**.rs' - '**.json' @@ -160,12 +160,12 @@ jobs: uses: docker/setup-buildx-action@v2 with: install: true - - name: Build and push iroha2:dev image + - name: Build and push iroha:testnet-2.0.0-rc.1 image uses: docker/build-push-action@v6 if: always() with: push: true - tags: docker.soramitsu.co.jp/iroha2/iroha2:dev-${{ github.event.pull_request.head.sha }} + tags: docker.soramitsu.co.jp/iroha2/iroha:testnet-2.0.0-rc.1-${{ github.event.pull_request.head.sha }} labels: commit=${{ github.sha }} build-args: TAG=dev file: Dockerfile.glibc @@ -214,7 +214,7 @@ jobs: file: Dockerfile.glibc tags: | hyperledger/iroha:local - hyperledger/iroha:dev + hyperledger/iroha:testnet-2.0.0-rc.1 cache-from: type=gha cache-to: type=gha,mode=max - name: Test docker-compose.single.yml diff --git a/.github/workflows/iroha2-dev.yml b/.github/workflows/iroha2-dev.yml index e59be25c7f8..50a704164a7 100644 --- a/.github/workflows/iroha2-dev.yml +++ b/.github/workflows/iroha2-dev.yml @@ -2,7 +2,7 @@ name: I2::Dev::Publish on: push: - branches: [main] + branches: [testnet/2.0.0-rc.1] env: CARGO_TERM_COLOR: always @@ -58,24 +58,24 @@ jobs: registry: docker.soramitsu.co.jp username: ${{ secrets.HARBOR_USERNAME }} password: ${{ secrets.HARBOR_TOKEN }} - - name: Build and push iroha2:dev image + - name: Build and push iroha:testnet-2.0.0-rc.1 image uses: docker/build-push-action@v6 with: context: . file: Dockerfile.glibc push: true tags: | - hyperledger/iroha:dev - docker.soramitsu.co.jp/iroha2/iroha:dev + hyperledger/iroha:testnet-2.0.0-rc.1 + docker.soramitsu.co.jp/iroha2/iroha:testnet-2.0.0-rc.1 labels: commit=${{ github.sha }} cache-from: type=gha cache-to: type=gha,mode=max - name: Copy artifacts from iroha image run: | mkdir -p ${{ env.ARTIFACTS_DIR }} - docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/iroha > ${{ env.ARTIFACTS_DIR }}/iroha - docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/irohad > ${{ env.ARTIFACTS_DIR }}/irohad - docker run --rm --entrypoint cat hyperledger/iroha:dev ${{ env.BIN_PATH }}/kagami > ${{ env.ARTIFACTS_DIR }}/kagami + docker run --rm --entrypoint cat hyperledger/iroha:testnet-2.0.0-rc.1 ${{ env.BIN_PATH }}/iroha > ${{ env.ARTIFACTS_DIR }}/iroha + docker run --rm --entrypoint cat hyperledger/iroha:testnet-2.0.0-rc.1 ${{ env.BIN_PATH }}/irohad > ${{ env.ARTIFACTS_DIR }}/irohad + docker run --rm --entrypoint cat hyperledger/iroha:testnet-2.0.0-rc.1 ${{ env.BIN_PATH }}/kagami > ${{ env.ARTIFACTS_DIR }}/kagami - name: Generate schema run: cargo run --bin kagami -- schema > ${{ env.ARTIFACTS_DIR }}/schema.json - name: Archive artifacts diff --git a/.github/workflows/iroha2-doc-links.yml b/.github/workflows/iroha2-doc-links.yml index d9bc2bbf242..12acf2e1292 100644 --- a/.github/workflows/iroha2-doc-links.yml +++ b/.github/workflows/iroha2-doc-links.yml @@ -6,7 +6,7 @@ name: I2::Doc::Links on: pull_request: - branches: [main, stable, lts] + branches: [testnet/2.0.0-rc.1] paths: - '**/*.md' - '**/*.txt' diff --git a/.github/workflows/iroha2-no-incorrect-image.yml b/.github/workflows/iroha2-no-incorrect-image.yml index a1c2b311be4..c9a3cc4589e 100644 --- a/.github/workflows/iroha2-no-incorrect-image.yml +++ b/.github/workflows/iroha2-no-incorrect-image.yml @@ -2,9 +2,7 @@ name: I2::CI::check_for_incorrect_images on: push: - branches: - - main - - stable + branches: [testnet/2.0.0-rc.1] jobs: check: @@ -17,9 +15,5 @@ jobs: - uses: actions/checkout@v4 - name: Install dependencies run: pip install -r .github/scripts/ci_test/requirements.txt --no-input - - name: Check containers on iroha2 stable branch - if: github.base_ref == 'stable' - run: python .github/scripts/ci_test/ci_image_scan.py --allow iroha2:stable -- docker-compose*.yml - - name: Check containers on iroha2 main branch - if: github.base_ref == 'main' - run: python .github/scripts/ci_test/ci_image_scan.py --allow iroha2:dev -- docker-compose*.yml + - name: Check containers + run: python .github/scripts/ci_test/ci_image_scan.py --allow iroha:testnet-2.0.0-rc.1 -- docker-compose*.yml diff --git a/.github/workflows/iroha2-pr-ui.yml b/.github/workflows/iroha2-pr-ui.yml index 207efffe35f..2212ec79f8e 100644 --- a/.github/workflows/iroha2-pr-ui.yml +++ b/.github/workflows/iroha2-pr-ui.yml @@ -2,7 +2,7 @@ name: I2::Tests::UI on: pull_request: - branches: [main, stable, lts] + branches: [testnet/2.0.0-rc.1] paths: - 'crates/*_derive/**.rs' - 'crates/*_macro*/**.rs' diff --git a/Cargo.lock b/Cargo.lock index 65c495e40e1..072e229c783 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3036,6 +3036,7 @@ dependencies = [ "log", "num-traits", "serde", + "serde_json", "serde_with", "strum 0.25.0", "thiserror", diff --git a/README.md b/README.md index 6223a42c4e4..1cda3a67ea0 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Prerequisites: - (Optional) Build the latest Iroha image: ```bash - docker build . -t hyperledger/iroha2:dev + docker build . -t hyperledger/iroha:dev ``` If you skip this step, the Iroha container will be built using the latest available image. @@ -181,7 +181,7 @@ Iroha stores blocks and snapshots in the `storage` directory, which is created a Multiple instances of Iroha peer and client binaries can be run on the same physical machine and in the same working directory. However, we recommend to give each instance a clean new working directory. -The provided `docker-compose` file showcases a minimum viable network and the general methods of using the `hyperledger/iroha2:dev` docker image for deploying a network of peers. +The provided `docker-compose` file showcases a minimum viable network and the general methods of using the `hyperledger/iroha:dev` docker image for deploying a network of peers. ## Further Reading diff --git a/crates/iroha/src/config.rs b/crates/iroha/src/config.rs index f01d904d28f..0be77dc5a8a 100644 --- a/crates/iroha/src/config.rs +++ b/crates/iroha/src/config.rs @@ -3,7 +3,7 @@ use core::str::FromStr; use std::{path::Path, time::Duration}; -use derive_more::Display; +use derive_more::{Constructor, Display, From}; use error_stack::ResultExt; use eyre::Result; use iroha_config_base::{read::ConfigReader, toml::TomlSource}; @@ -51,7 +51,7 @@ impl FromStr for WebLogin { } /// Basic Authentication credentials -#[derive(Clone, Deserialize, Serialize, Debug)] +#[derive(Clone, Deserialize, Serialize, Debug, Constructor, PartialEq, Eq)] pub struct BasicAuth { /// Login for Basic Authentication pub web_login: WebLogin, @@ -59,6 +59,26 @@ pub struct BasicAuth { pub password: SecretString, } +#[derive(Debug, Display, From)] +#[allow(missing_docs)] +pub struct BasicAuthParseError(String); + +impl std::error::Error for BasicAuthParseError {} + +impl FromStr for BasicAuth { + type Err = BasicAuthParseError; + + fn from_str(s: &str) -> Result { + let Some((login, password)) = s.split_once(':') else { + return Err(format!("`login:password` expected, got {s}").into()); + }; + Ok(Self { + web_login: login.parse().expect("should have no colons"), + password: SecretString::new(password.into()), + }) + } +} + /// Complete client configuration #[derive(Clone, Debug, Serialize)] #[allow(missing_docs)] @@ -103,6 +123,37 @@ mod tests { use super::*; + #[test] + fn parse_basic_auth() { + let items = [ + ( + ":", + Some(BasicAuth::new( + "".parse().unwrap(), + SecretString::new(String::new()), + )), + ), + ( + "login:password", + Some(BasicAuth::new( + "login".parse().unwrap(), + SecretString::new("password".into()), + )), + ), + ( + "login:pass:word", + Some(BasicAuth::new( + "login".parse().unwrap(), + SecretString::new("pass:word".into()), + )), + ), + ("login password", None), + ]; + for (str, opt) in items { + assert_eq!(str.parse::().ok(), opt) + } + } + #[test] fn web_login_ok() { let _ok: WebLogin = "alice".parse().expect("input is valid"); diff --git a/crates/iroha/src/config/user.rs b/crates/iroha/src/config/user.rs index e87c6d38b6a..01a78d5cd7f 100644 --- a/crates/iroha/src/config/user.rs +++ b/crates/iroha/src/config/user.rs @@ -18,9 +18,11 @@ use crate::{ #[derive(Clone, Debug, ReadConfig)] #[allow(missing_docs)] pub struct Root { + #[config(env = "CHAIN")] pub chain: ChainId, #[config(env = "TORII_URL")] pub torii_url: WithOrigin, + #[config(env = "BASIC_AUTH")] pub basic_auth: Option, #[config(nested)] pub account: Account, @@ -125,19 +127,31 @@ impl Root { #[derive(Debug, Clone, ReadConfig)] #[allow(missing_docs)] pub struct Account { + #[config(env = "ACCOUNT_DOMAIN")] pub domain: DomainId, + #[config(env = "ACCOUNT_PUBLIC_KEY")] pub public_key: WithOrigin, + #[config(env = "ACCOUNT_PRIVATE_KEY")] pub private_key: WithOrigin, } #[derive(Debug, Clone, ReadConfig)] #[allow(missing_docs)] pub struct Transaction { - #[config(default = "super::DEFAULT_TRANSACTION_TIME_TO_LIVE.into()")] + #[config( + env = "TRANSACTION_TIME_TO_LIVE_MS", + default = "super::DEFAULT_TRANSACTION_TIME_TO_LIVE.into()" + )] pub time_to_live_ms: WithOrigin, - #[config(default = "super::DEFAULT_TRANSACTION_STATUS_TIMEOUT.into()")] + #[config( + env = "TRANSACTION_STATUS_TIMEOUT_MS", + default = "super::DEFAULT_TRANSACTION_STATUS_TIMEOUT.into()" + )] pub status_timeout_ms: WithOrigin, - #[config(default = "super::DEFAULT_TRANSACTION_NONCE")] + #[config( + env = "TRANSACTION_NONCE", + default = "super::DEFAULT_TRANSACTION_NONCE" + )] pub nonce: bool, } @@ -151,12 +165,28 @@ mod tests { #[test] fn parses_all_envs() { - let env = MockEnv::from([("TORII_URL", "http://localhost:8080")]); + let env = MockEnv::from([ + ("CHAIN", "00000000-0000-0000-0000-000000000000"), + ("TORII_URL", "http://localhost:8080"), + ("BASIC_AUTH", "mad_hatter:ilovetea"), + ("ACCOUNT_DOMAIN", "wonderland"), + ( + "ACCOUNT_PUBLIC_KEY", + "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03", + ), + ( + "ACCOUNT_PRIVATE_KEY", + "802620CCF31D85E3B32A4BEA59987CE0C78E3B8E2DB93881468AB2435FE45D5C9DCD53", + ), + ("TRANSACTION_TIME_TO_LIVE_MS", "100_000"), + ("TRANSACTION_STATUS_TIMEOUT_MS", "15_000"), + ("TRANSACTION_NONCE", "false"), + ]); - let _ = ConfigReader::new() + let _root = ConfigReader::new() .with_env(env.clone()) .read_and_complete::() - .expect_err("there are missing fields, but that of no concern"); + .expect("should be able to be configured only from env vars"); assert_eq!(env.unvisited(), HashSet::new()); assert_eq!(env.unknown(), HashSet::new()); diff --git a/crates/iroha/src/secrecy.rs b/crates/iroha/src/secrecy.rs index ed6f5f10499..27ed656d0cc 100644 --- a/crates/iroha/src/secrecy.rs +++ b/crates/iroha/src/secrecy.rs @@ -4,8 +4,8 @@ use std::fmt; use derive_more::Constructor; use serde::{Deserialize, Serialize, Serializer}; -/// SecretString epresents a sensitive secret string. -#[derive(Clone, Deserialize, Constructor)] +/// String sensitive to printing and serialization +#[derive(Clone, Deserialize, Constructor, PartialEq, Eq)] pub struct SecretString(String); impl SecretString { diff --git a/crates/iroha_config_base/Cargo.toml b/crates/iroha_config_base/Cargo.toml index ce42c694476..0f0eb60f185 100644 --- a/crates/iroha_config_base/Cargo.toml +++ b/crates/iroha_config_base/Cargo.toml @@ -16,6 +16,7 @@ iroha_config_base_derive = { path = "../iroha_config_base_derive" } drop_bomb = { workspace = true } serde = { workspace = true, features = ["derive"] } serde_with = { workspace = true, features = ["macros", "std"] } +serde_json = { workspace = true } thiserror = { workspace = true } num-traits = "0.2.19" toml = { workspace = true } diff --git a/crates/iroha_config_base/src/util.rs b/crates/iroha_config_base/src/util.rs index 956b8245eae..58c2704cc57 100644 --- a/crates/iroha_config_base/src/util.rs +++ b/crates/iroha_config_base/src/util.rs @@ -1,6 +1,6 @@ //! Various utilities -use std::{path::PathBuf, time::Duration}; +use std::{path::PathBuf, str::FromStr, time::Duration}; use derive_more::Display; use drop_bomb::DropBomb; @@ -26,6 +26,14 @@ impl From for DurationMs { } } +impl FromStr for DurationMs { + type Err = serde_json::Error; + + fn from_str(s: &str) -> Result { + serde_json::from_str(s.replace('_', "").as_str()) + } +} + /// A number of bytes #[derive(Debug, Copy, Clone, Deserialize, Serialize)] pub struct Bytes(pub T); @@ -251,4 +259,12 @@ mod tests { assert_eq!(value.get(), Duration::from_millis(10_500)); } + + #[test] + fn parse_duration_ms() { + assert_eq!( + "10_500".parse::().ok(), + Some(DurationMs::from(Duration::from_millis(10_500))) + ); + } } diff --git a/crates/iroha_data_model/src/lib.rs b/crates/iroha_data_model/src/lib.rs index eab5c382d76..2deb09e1f31 100644 --- a/crates/iroha_data_model/src/lib.rs +++ b/crates/iroha_data_model/src/lib.rs @@ -222,6 +222,14 @@ mod model { } } + impl core::str::FromStr for ChainId { + type Err = ParseError; + + fn from_str(s: &str) -> Result { + Ok(s.into()) + } + } + /// Sized container for all possible identifications. #[derive( Debug, diff --git a/crates/iroha_kagami/src/genesis/generate.rs b/crates/iroha_kagami/src/genesis/generate.rs index 227b7395ec6..2497f6264f9 100644 --- a/crates/iroha_kagami/src/genesis/generate.rs +++ b/crates/iroha_kagami/src/genesis/generate.rs @@ -7,7 +7,7 @@ use clap::{Parser, Subcommand}; use color_eyre::eyre::WrapErr as _; use iroha_data_model::{isi::InstructionBox, parameter::Parameters, prelude::*}; use iroha_executor_data_model::permission::{ - domain::CanRegisterDomain, parameter::CanSetParameters, + domain::CanRegisterDomain, parameter::CanSetParameters, peer::CanManagePeers, }; use iroha_genesis::{GenesisBuilder, RawGenesisTransaction, GENESIS_DOMAIN_ID}; use iroha_test_samples::{gen_account_in, ALICE_ID, BOB_ID, CARPENTER_ID}; @@ -145,13 +145,52 @@ pub fn generate_default( grant_permission_to_register_domains.into(), ]; - for isi in instructions { + for isi in instructions + .into_iter() + .chain(extension_from_test_genesis()) + { builder = builder.append_instruction(isi); } Ok(builder.build_raw()) } +/// For testnet only +fn extension_from_test_genesis() -> impl Iterator { + use iroha_executor_data_model::permission::{ + asset::CanMintAssetWithDefinition, domain::CanUnregisterDomain, + executor::CanUpgradeExecutor, role::CanManageRoles, + }; + + let rose_definition_id = "rose#wonderland".parse::().unwrap(); + let grant_modify_rose_permission = Grant::account_permission( + CanMintAssetWithDefinition { + asset_definition: rose_definition_id.clone(), + }, + ALICE_ID.clone(), + ); + let grant_manage_peers_permission = Grant::account_permission(CanManagePeers, ALICE_ID.clone()); + let grant_manage_roles_permission = Grant::account_permission(CanManageRoles, ALICE_ID.clone()); + let grant_unregister_wonderland_domain = Grant::account_permission( + CanUnregisterDomain { + domain: "wonderland".parse().unwrap(), + }, + ALICE_ID.clone(), + ); + let grant_upgrade_executor_permission = + Grant::account_permission(CanUpgradeExecutor, ALICE_ID.clone()); + + [ + grant_modify_rose_permission, + grant_manage_peers_permission, + grant_manage_roles_permission, + grant_unregister_wonderland_domain, + grant_upgrade_executor_permission, + ] + .into_iter() + .map(Into::into) +} + fn generate_synthetic( builder: GenesisBuilder, genesis_public_key: PublicKey, diff --git a/crates/iroha_test_network/src/config.rs b/crates/iroha_test_network/src/config.rs index eef0ca09c1e..b9098de4dd9 100644 --- a/crates/iroha_test_network/src/config.rs +++ b/crates/iroha_test_network/src/config.rs @@ -3,19 +3,10 @@ use std::path::Path; use iroha_config::base::toml::WriteExt; -use iroha_data_model::{ - asset::AssetDefinitionId, - isi::{Grant, Instruction}, - peer::PeerId, - ChainId, -}; -use iroha_executor_data_model::permission::{ - asset::CanMintAssetWithDefinition, domain::CanUnregisterDomain, executor::CanUpgradeExecutor, - peer::CanManagePeers, role::CanManageRoles, -}; +use iroha_data_model::{isi::Instruction, peer::PeerId, ChainId}; use iroha_genesis::{GenesisBlock, RawGenesisTransaction}; use iroha_primitives::unique_vec::UniqueVec; -use iroha_test_samples::{ALICE_ID, SAMPLE_GENESIS_ACCOUNT_KEYPAIR}; +use iroha_test_samples::SAMPLE_GENESIS_ACCOUNT_KEYPAIR; use toml::Table; pub fn chain_id() -> ChainId { @@ -49,33 +40,6 @@ pub fn genesis( .unwrap_or_else(|err| panic!("failed to parse {}\n{err}", json_path.display())); let mut builder = genesis.into_builder(); - let rose_definition_id = "rose#wonderland".parse::().unwrap(); - let grant_modify_rose_permission = Grant::account_permission( - CanMintAssetWithDefinition { - asset_definition: rose_definition_id.clone(), - }, - ALICE_ID.clone(), - ); - let grant_manage_peers_permission = Grant::account_permission(CanManagePeers, ALICE_ID.clone()); - let grant_manage_roles_permission = Grant::account_permission(CanManageRoles, ALICE_ID.clone()); - let grant_unregister_wonderland_domain = Grant::account_permission( - CanUnregisterDomain { - domain: "wonderland".parse().unwrap(), - }, - ALICE_ID.clone(), - ); - let grant_upgrade_executor_permission = - Grant::account_permission(CanUpgradeExecutor, ALICE_ID.clone()); - for isi in [ - grant_modify_rose_permission, - grant_manage_peers_permission, - grant_manage_roles_permission, - grant_unregister_wonderland_domain, - grant_upgrade_executor_permission, - ] { - builder = builder.append_instruction(isi); - } - for isi in extra_isi { builder = builder.append_instruction(isi); } diff --git a/defaults/genesis.json b/defaults/genesis.json index a859de841cf..aa1886012ee 100644 --- a/defaults/genesis.json +++ b/defaults/genesis.json @@ -149,6 +149,65 @@ "destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" } } + }, + { + "Grant": { + "Permission": { + "object": { + "name": "CanMintAssetWithDefinition", + "payload": { + "asset_definition": "rose#wonderland" + } + }, + "destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" + } + } + }, + { + "Grant": { + "Permission": { + "object": { + "name": "CanManagePeers", + "payload": null + }, + "destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" + } + } + }, + { + "Grant": { + "Permission": { + "object": { + "name": "CanManageRoles", + "payload": null + }, + "destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" + } + } + }, + { + "Grant": { + "Permission": { + "object": { + "name": "CanUnregisterDomain", + "payload": { + "domain": "wonderland" + } + }, + "destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" + } + } + }, + { + "Grant": { + "Permission": { + "object": { + "name": "CanUpgradeExecutor", + "payload": null + }, + "destination": "ed0120CE7FA46C9DCE7EA4B125E2E36BDB63EA33073E7590AC92816AE1E861B7048B03@wonderland" + } + } } ], "wasm_dir": "libs", diff --git a/docs/source/references/client.template.toml b/docs/source/references/client.template.toml index 4c520e380d0..d1f360973d4 100644 --- a/docs/source/references/client.template.toml +++ b/docs/source/references/client.template.toml @@ -1,19 +1,28 @@ +## `CHAIN` env var overwrites # chain = -## Might be set via `TORII_URL` env var +## `TORII_URL` env var overwrites # torii_url = +## `BASIC_AUTH` env var overwrites +## Example: +## BASIC_AUTH="login:password" [basic_auth] # login = # password = [account] +## `ACCOUNT_DOMAIN` env var overwrites # domain = +## `ACCOUNT_PUBLIC_KEY` env var overwrites # public_key = +## `ACCOUNT_PRIVATE_KEY` env var overwrites # private_key = [transaction] +## `TRANSACTION_TIME_TO_LIVE_MS` env var overwrites # time_to_live_ms = 100_000 +## `TRANSACTION_STATUS_TIMEOUT_MS` env var overwrites # status_timeout_ms = 100_000 -## Nonce is TODO describe what it is +## `TRANSACTION_NONCE` env var overwrites # nonce = false