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: fix spelling issues #2731

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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 packages/hebao_v1/addresses/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## How to find pretty addresses

Simply run `node findaddr.js find [chunk]` to find the best address in that chunk. Currenlty 12 chunks are being explored.
Simply run `node findaddr.js find [chunk]` to find the best address in that chunk. Currently 12 chunks are being explored.

## How to use found addresses

Expand Down
6 changes: 3 additions & 3 deletions packages/hebao_v1/test/testGuardians.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ contract("GuardiansModule-Guardian", (accounts: string[]) => {
const owner = ctx.owners[0];
const { wallet } = await createWallet(ctx, owner);

// The first two guardian is added WA (so cannot be cancelled)
// The first two guardian is added WA (so cannot be canceled)
await addGuardianChecked(owner, wallet, ctx.guardians[0]);
await addGuardianChecked(owner, wallet, ctx.guardians[1]);

Expand Down Expand Up @@ -143,7 +143,7 @@ contract("GuardiansModule-Guardian", (accounts: string[]) => {
// Skip forward `guardianPendingPeriod` seconds
await advanceTimeAndBlockAsync(guardianPendingPeriod);

// Make sure the cancelled guardian isn't a guardian
// Make sure the canceled guardian isn't a guardian
assert(
!(await ctx.securityStore.isGuardian(
wallet,
Expand Down Expand Up @@ -205,7 +205,7 @@ contract("GuardiansModule-Guardian", (accounts: string[]) => {
// Skip forward `guardianPendingPeriod` seconds
await advanceTimeAndBlockAsync(guardianPendingPeriod);

// Make sure the cancelled guardian is still a guardian
// Make sure the canceled guardian is still a guardian
assert(
await ctx.securityStore.isGuardian(wallet, ctx.guardians[0], false),
"should be guardian"
Expand Down
2 changes: 1 addition & 1 deletion packages/hebao_v1/util/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export async function getEventsFromContract(contract: any, blockIdx: number) {
}

// This works differently from truffleAssert.eventEmitted in that it also is able to
// get events emmitted in `deep contracts` (i.e. events not emmitted in the contract
// get events emitted in `deep contracts` (i.e. events not emitted in the contract
// the function got called in).
export async function assertEventsEmitted(
contract: any,
Expand Down
4 changes: 2 additions & 2 deletions packages/loopring_v3/DESIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ Nevertheless, if the operator pays the protocol fee, why have different protocol

### AMM

It is possible to enable Automated Market-Maker (AMM) functionality on an account. This is done by setting the AMM virtual balances of at least two tokens to non-zero (using [AMM Update](#AMM-Update) transactions). Once that is the done, the operator can create any orders between those tokens, without any signature or other explicit approval of the account owner, as long as the price for the order is equal or better (from the AMM's point of view) than the price required by the AMM price curve. From the protocol's point of view, AMM swaps are the same as trades between different orders, but instead of approved with a signature from the account owner, it is approved by the curve set by the account owner. The fee paid by the AMM account for the trade to the operator is enforced to be 0. The virtual balances will be updated with the same fill amounts as the actual balances.
It is possible to enable Automated Market-Maker (AMM) functionality on an account. This is done by setting the AMM virtual balances of at least two tokens to non-zero (using [AMM Update](#AMM-Update) transactions). Once that is done, the operator can create any orders between those tokens, without any signature or other explicit approval of the account owner, as long as the price for the order is equal or better (from the AMM's point of view) than the price required by the AMM price curve. From the protocol's point of view, AMM swaps are the same as trades between different orders, but instead of approved with a signature from the account owner, it is approved by the curve set by the account owner. The fee paid by the AMM account for the trade to the operator is enforced to be 0. The virtual balances will be updated with the same fill amounts as the actual balances.

The curve enforced in the protocol is the uniswap curve `x*y = k` and is defined as follows in the protocol:

Expand Down Expand Up @@ -455,7 +455,7 @@ If the operator does not process the deposit after `MAX_AGE_DEPOSIT_UNTIL_WITHDR
Depending on the specific token, the gas cost to the user is around 60,000 gas/deposit. There are several ways not to let users pay this gas cost:

- We only require users to approve the ERC20 token for the exchange (this method does not work for ETH). We can then use an agent that uses an on-chain signature of the user to make the actual deposit.
- A simple forwarder contract is used that can only deposit funds available inside the contract for a specific user. This contract can be deployed using `CREATE2` with a deterministic address. Once the user receives this address, the user can then do a simple transfer to this smart contract's address as usual. Anyone willing to pay the gas cost (in exchange for a fee paid by the user) can create the contract and deposit the funds (remember that how and to who is hardcoded inside the generated smart contract so this is always safe and trustless). Afterward, the smart contract can directly be destroyed to recoup the deployment gas cost partly.
- A simple forwarder contract is used that can only deposit funds available inside the contract for a specific user. This contract can be deployed using `CREATE2` with a deterministic address. Once the user receives this address, the user can then do a simple transfer to this smart contract's address as usual. Anyone willing to pay the gas cost (in exchange for a fee paid by the user) can create the contract and deposit the funds (remember how and to who is hardcoded inside the generated smart contract so this is always safe and trustless). Afterward, the smart contract can directly be destroyed to recoup the deployment gas cost partly.

Both methods allow the user to pay for the deposit in any token (on layer 1 or layer 2).

Expand Down