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 #14

Open
wants to merge 11 commits into
base: main
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Following [Starknet SNIP 18](https://community.starknet.io/t/snip-18-staking-s-f
Staking is a work in progress.

## Dependencies
The project is build with [Turbo repo](https://turbo.build/) and [pnpm](https://pnpm.io/).
The project is built with [Turbo repo](https://turbo.build/) and [pnpm](https://pnpm.io/).
Turbo's installation process will also install the cairo dependencies such as [Scarb](https://docs.swmansion.com/scarb/) and [Starknet foundry](https://foundry-rs.github.io/starknet-foundry/index.html).

## Installation
Expand Down
4 changes: 2 additions & 2 deletions docs/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Examples of unacceptable behavior by participants include:
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit
permission
- Other conduct which could reasonably be considered inappropriate in a professional setting
- Other conduct that could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand All @@ -34,7 +34,7 @@ expected to take appropriate and fair corrective action in response to any insta
behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits,
code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct,
code, wiki edits, issues, and other contributions that are not aligned with this Code of Conduct,
or to ban temporarily or permanently any contributor for other behaviors that they deem
inappropriate, threatening, offensive, or harmful.

Expand Down
16 changes: 8 additions & 8 deletions docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ fn unstake_action(
) -> u128
```
#### description <!-- omit from toc -->
Executes the intent to exit the stake if enough time have passed.
Executes the intent to exit the stake if enough time has passed.
Transfers the funds back to the staker.
Return the amount of tokens transferred back to the staker.
#### emits <!-- omit from toc -->
Expand All @@ -534,8 +534,8 @@ Return the amount of tokens transferred back to the staker.
6. [FINAL\_STAKER\_INDEX\_ALREADY\_SET](#final_staker_index_already_set)
#### pre-condition <!-- omit from toc -->
1. Staking contract is unpaused.
2. Staker exist and requested to unstake.
3. Enough time have passed from the unstake intent call.
2. Staker exists and requested to unstake.
3. Enough time has passed from the unstake intent call.
#### access control <!-- omit from toc -->
Any address can execute.
#### logic <!-- omit from toc -->
Expand Down Expand Up @@ -645,7 +645,7 @@ fn remove_from_delegation_pool_action(
)
```
#### description <!-- omit from toc -->
Execute the intent to remove funds from pool if enough time have passed.
Execute the intent to remove funds from pool if enough time has passed.
Transfers the funds to the pool contract.
#### emits <!-- omit from toc -->
1. [Remove From Delegation Pool Action](#remove-from-delegation-pool-action)
Expand All @@ -656,7 +656,7 @@ Transfers the funds to the pool contract.
#### pre-condition <!-- omit from toc -->
1. Staking contract is unpaused.
2. Removal intent request with the given `identifier` have been sent before.
3. Enough time have passed since the intent request.
3. Enough time has passed since the intent request.
#### access control <!-- omit from toc -->
Any address can execute.
#### logic <!-- omit from toc -->
Expand Down Expand Up @@ -1258,7 +1258,7 @@ fn exit_delegation_pool_action(
) -> u128
```
#### description <!-- omit from toc -->
Executes the intent to exit the stake if enough time have passed. Transfers the funds back to the pool member.
Executes the intent to exit the stake if enough time has passed. Transfers the funds back to the pool member.
Return the amount of tokens transferred back to the pool member.
#### emits <!-- omit from toc -->
1. [Pool Member Reward Claimed](#pool-member-reward-claimed)
Expand All @@ -1269,8 +1269,8 @@ Return the amount of tokens transferred back to the pool member.
3. [INTENT\_WINDOW\_NOT\_FINISHED](#intent_window_not_finished)
4. [CONTRACT\_IS\_PAUSED](#contract_is_paused)
#### pre-condition <!-- omit from toc -->
1. Pool member exist and requested to unstake.
2. Enough time have passed from the delegation pool exit intent call.
1. Pool member exists and requested to unstake.
2. Enough time has passed from the delegation pool exit intent call.
#### access control <!-- omit from toc -->
Any address can execute.
#### logic <!-- omit from toc -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import "starkware/solidity/interfaces/ContractInitializer.sol";
/**
This contract contains the code commonly needed for a contract to be deployed behind
an upgradability proxy.
It perform the required semantics of the proxy pattern,
It performs the required semantics of the proxy pattern,
but in a generic manner.
Instantiation of the Governance and of the ContractInitializer, that are the app specific
part of initialization, has to be done by the using contract.
part of initialization has to be done by the using contract.
*/
abstract contract ProxySupport is MGovernance, BlockDirectCall, ContractInitializer {
using Addresses for address;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ library RolesLib {
}

if (securityRolesInitialized()) {
// If SecurityAdmin initialized,
// If SecurityAdmin is initialized,
// then provisionalSecAdmin must already be a `SecurityAdmin`.
// If it's not initilized - initialize it.
// If it's not initialized - initialize it.
require(
AccessControl.hasRole(SECURITY_ADMIN, provisionalSecAdmin),
"SECURITY_ROLES_ALREADY_INITIALIZED"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ contract MintManager is IMintManager, Identity, ProxySupportImpl, PeriodMintLimi
}

/**
Unegister an eligible token minter.
Unregister an eligible token minter.
Callable only by the app governor or a security agent/admin.
*/
function revokeTokenMinter(address token, address minter) external onlySecurityRole {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IStarknetMessaging is IStarknetMessagingEvents {

/**
Sends a message to an L2 contract.
This function is payable, the payed amount is the message fee.
This function is payable, the paid amount is the message fee.

Returns the hash of the message and the nonce of the message.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ library Strings {
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// Inspired by OraclizeAPI's implementation - MIT license
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

if (value == 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ library Math {
// `msb(a) <= a < 2*msb(a)`.
// We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.
// This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.
// Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a
// Using an algorithm similar to the msb computation, we are able to compute `result = 2**(k/2)` which is a
// good first aproximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1;
uint256 x = a;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub mod RewardSupplier {
unclaimed_rewards: Amount,
// The amount of tokens requested from L1.
l1_pending_requested_amount: Amount,
// The amount of tokens that is requested from L1 in a single message.
// The amount of tokens that are requested from L1 in a single message.
base_mint_amount: Amount,
minting_curve_dispatcher: IMintingCurveDispatcher,
staking_contract: ContractAddress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ fn test_claim_rewards() {
cfg.reward_supplier.minting_curve_contract = minting_curve_contract;
// Use the reward supplier contract state to claim rewards.
let mut state = initialize_reward_supplier_state_from_cfg(:token_address, :cfg);
// Fund the the reward supplier contract.
// Fund the reward supplier contract.
fund(sender: cfg.test_info.owner_address, recipient: test_address(), :amount, :token_address);
// Update the unclaimed rewards for testing purposes.
state.unclaimed_rewards.write(amount);
Expand Down