Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add for SendSubmissionParamsInput::with_message method #26

Merged
merged 2 commits into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/chain_ids.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// This constant represents the solana chain id
/// Check https://chainlist.org/ for other chain ids
/// Check <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand All @@ -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 <https://chainlist.org/> for other chain ids
///
/// Within our network, we use the chain id as the
/// identifier for each network.
Expand Down
4 changes: 2 additions & 2 deletions src/debridge_accounts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 7 additions & 1 deletion src/sending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down Expand Up @@ -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
Expand Down