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

fix typos #122

Merged
merged 1 commit into from
Dec 8, 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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Unreleased
## [3.0.0] - 2023-11-08
### Added
- Defined data types including:
- basic types like `ChainId`,`Nonce`, `AccountId`, `SubAccoundId`, `TokenId` and so on;
- basic types like `ChainId`,`Nonce`, `AccountId`, `SubAccountId`, `TokenId` and so on;
- transaction types:`ChangePubkey`, `Deposit`, `Withdraw`, `ForcedExit`, `FullExit`, `OrderMatching`, `Transfer`;
- contract transaction types: `AutoDeleveraging`, `ContractMatching`, `Funding`, `Liquidation`;
- the builder to build the transaction types;
Expand Down
2 changes: 1 addition & 1 deletion bindings/sdk/src/ffi.udl
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ interface ZkLinkSigner {
};


// ============================ iterface ============================
// ============================ interface ============================

[Error]
enum SignError {
Expand Down
2 changes: 1 addition & 1 deletion signers/src/eth_signer/eip712/eip712.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ where
pub primary_type: String,
/// Signing domain metadata. The signing domain is the intended context for the signature (e.g.
/// the dapp, protocol, etc. that it's intended for). This data is used to construct the domain
/// seperator of the message.
/// separator of the message.
pub domain: EIP712Domain,
/// The message to be signed.
pub message: M,
Expand Down
4 changes: 2 additions & 2 deletions types/src/basic_types/float_convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl FloatConversions {
return Err(Error::TooBigInteger);
}

// The algortihm is as follows: calculate minimal exponent
// The algorithm is as follows: calculate minimal exponent
// such that integer <= max_mantissa * exponent_base ^ exponent,
// then if this minimal exponent is 0 we can choose mantissa equals integer and exponent equals 0
// else we need to check two variants:
Expand Down Expand Up @@ -151,7 +151,7 @@ impl FloatConversions {
return Err(Error::TooBigInteger);
}

// The algortihm is as follows: calculate minimal exponent
// The algorithm is as follows: calculate minimal exponent
// such that integer <= max_mantissa * exponent_base ^ exponent,
// then mantissa is calculated as integer divided by exponent_base ^ exponent and rounded up
let mut exponent: usize = 0;
Expand Down
2 changes: 1 addition & 1 deletion types/src/basic_types/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub const ACCOUNT_ID_BIT_WIDTH: usize = 32;
pub const SUB_ACCOUNT_ID_BIT_WIDTH: usize = 8;
pub const PRICE_BIT_WIDTH: usize = 120;
pub const MIN_PRICE: u128 = 1;
/// deciamls of price in order will be improved with TOKEN_MAX_PRECISION(18)
/// decimals of price in order will be improved with TOKEN_MAX_PRECISION(18)
/// the bit width of price in pubdata is PRICE_BIT_WIDTH(120)
/// so the max price of price that order can submit is
/// (2 ** 120 - 1) / 10 ^18 = 1329227995784915872
Expand Down
8 changes: 4 additions & 4 deletions types/src/tx_type/order_matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,12 +213,12 @@ pub struct OrderMatching {
/// 8000, 2
/// buy (price, amount)
/// 7000, 3
/// when a user buy 3 BTC for price 10000, dex will submit two OrderMathcing
/// when a user buy 3 BTC for price 10000, dex will submit two OrderMatching
/// maker: 8000, 2 <-> taker: 10000, 3
/// maker: 10000, 4 <-> taker: 10000, 3
/// if all is well, all OrderMathcing will be executed in sequence
/// but when the balance of maker (8000, 2) is not enough, the first OrderMathcing will be failed
/// and the second OrderMathcing will be still success, the second maker (10000, 4) will be trade for 3 BTC
/// if all is well, all OrderMatching will be executed in sequence
/// but when the balance of maker (8000, 2) is not enough, the first OrderMatching will be failed
/// and the second OrderMatching will be still success, the second maker (10000, 4) will be trade for 3 BTC
/// but the result may be not dex want to see
/// dex can set `expect_base_amount` and `expect_quote_amount` to limit the maximum trade amount
/// maker: 8000, 2, <-> taker: 10000, 3 <-> expect_base_amount 2 => the maximum of BTC traded will be 2
Expand Down
Loading