From 2a8804657fbb186168b7ad7660425a8fa59f28ab Mon Sep 17 00:00:00 2001 From: cyphersnake Date: Fri, 14 Apr 2023 15:15:39 +0400 Subject: [PATCH 1/2] docs: add for `SendSubmissionParamsInput::with_message` method During the discussion, it turned out that we did not have a high-level description for the concept. I left a simple one, however, as soon as the description appears in the gitbook we have added a link here Close #24 --- src/sending.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sending.rs b/src/sending.rs index 392ca80..02c381d 100644 --- a/src/sending.rs +++ b/src/sending.rs @@ -13,9 +13,9 @@ use crate::{ INIT_EXTERNAL_CALL_DISCRIMINATOR, SEND_DISCRIMINATOR, }, errors::InvokeError, + flags::SetReservedFlag, hash::HashAdapter, keys::{AssetFeeInfoPubkey, BridgePubkey, ChainSupportInfoPubkey}, - flags::SetReservedFlag, Error, Pubkey, SolanaKeccak256, BPS_DENOMINATOR, DEBRIDGE_ID, SOLANA_CHAIN_ID, }; @@ -86,6 +86,12 @@ impl SendSubmissionParamsInput { /// Create submission params for sending message to other chain /// + /// This path is the default path for sending an authorised message + /// on the EVM network. If your case is simple, this is probably the + /// method you need. + /// + /// For everything else, please use [`SendSubmissionParamsInput::with_external_call`] + /// /// # Arguments /// * `external_call` - instructions sending in target chain /// * `execution_fee` - amount of execution fee From ffa12344787163812d0f2c4f160d2955fc898b3f Mon Sep 17 00:00:00 2001 From: cyphersnake Date: Fri, 14 Apr 2023 15:20:12 +0400 Subject: [PATCH 2/2] ci: add cargo-doc --- .github/workflows/rust.yml | 16 ++++++++++++++-- src/chain_ids.rs | 16 ++++++++-------- src/debridge_accounts.rs | 4 ++-- 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 86e64e7..ef2c281 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --all --verbose + args: --all --doc --verbose + + - name: Doc + uses: actions-rs/cargo@v1 + with: + command: doc + args: --no-deps build_example: @@ -84,7 +90,13 @@ jobs: uses: actions-rs/cargo@v1 with: command: test - args: --manifest-path=example-program/Cargo.toml --verbose + args: --manifest-path=example-program/Cargo.toml --doc --verbose + + - name: Doc + uses: actions-rs/cargo@v1 + with: + command: doc + args: --no-deps linting_ts_example: name: Linting TS example diff --git a/src/chain_ids.rs b/src/chain_ids.rs index 7b274b1..f633ab5 100644 --- a/src/chain_ids.rs +++ b/src/chain_ids.rs @@ -1,5 +1,5 @@ /// This constant represents the solana chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -9,7 +9,7 @@ pub const SOLANA_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the eth chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -18,7 +18,7 @@ pub const ETHEREUM_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the bnb chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -27,7 +27,7 @@ pub const BNB_CHAIN_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the heco chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -37,7 +37,7 @@ pub const HECO_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the polygon chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -47,7 +47,7 @@ pub const POLYGON_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the arbitrum chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -57,7 +57,7 @@ pub const ARBITRUM_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the avalanche chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. @@ -67,7 +67,7 @@ pub const AVALANCHE_CHAIN_ID: [u8; 32] = [ ]; /// This constant represents the fantom chain id -/// Check https://chainlist.org/ for other chain ids +/// Check for other chain ids /// /// Within our network, we use the chain id as the /// identifier for each network. diff --git a/src/debridge_accounts.rs b/src/debridge_accounts.rs index e80ab21..d80fc4b 100644 --- a/src/debridge_accounts.rs +++ b/src/debridge_accounts.rs @@ -68,8 +68,8 @@ impl Discriminator for SubmissionAccount { /// Internal information about chain support and commissions within it /// # Variants -/// * [`ChainSupportInfoVariant::NotSupported`] - this chain not supported -/// * [`ChainSupportInfoVariant::Supported`] - this chain supported and we have `fixed_fee` & `transfer_fee` values for it +/// * [`ChainSupportInfo::NotSupported`] - this chain not supported +/// * [`ChainSupportInfo::Supported`] - this chain supported and we have `fixed_fee` & `transfer_fee` values for it #[derive(BorshSerialize, BorshDeserialize, Clone, Debug)] pub enum ChainSupportInfo { NotSupported,