Skip to content

Commit 0f9c865

Browse files
authored
Merge pull request #306 from lukso-network/ci/spellcheck
ci: add CI workflow to check for grammar errors
2 parents 8d874a6 + 53f1751 commit 0f9c865

17 files changed

+266
-251
lines changed

.github/workflows/spellcheck.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow checks for common grammar and spelling mistake in markdown files.
2+
name: Spellcheck
3+
on: [pull_request]
4+
5+
jobs:
6+
build:
7+
name: Check Grammar and Spelling errors
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout 🛎️
11+
uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
15+
- name: Install ⚙️
16+
run: yarn install --frozen-lockfile
17+
18+
- name: Check spelling errors in code snippets 🔍
19+
uses: codespell-project/actions-codespell@v2
20+
with:
21+
check_filenames: true
22+
ignore_words_list: datas
23+
24+
- name: Output Spellcheck Results 📝
25+
uses: actions/upload-artifact@v3
26+
with:
27+
name: Spellcheck Output
28+
path: spellcheck-output.txt

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The goal of this process is to iterate over the initial idea and refine:
2727
- what are the benefits of the LSP and what are the problems that it solves.
2828
- clarify limitations, security and areas of concerns related to the proposed standard.
2929

30-
### 2. Creating an issue in the LIP reposity
30+
### 2. Creating an issue in the LIP repository
3131

3232
**Before proposing an LSP on this repository via a PR, ideas MUST be thoroughly discussed through an issue.**
3333

@@ -44,7 +44,7 @@ Once consensus is reached in the issue discussion, thoroughly review the LIP tem
4444
3. Add your LIP to your fork of the repository. There is a [template LSP here](lsp-X.md).
4545
4. Submit a Pull Request to LUKSO's [LSPs repository](https://github.com/lukso-network/LIPs).
4646

47-
Your first PR should be a first draft of the final LSP. It must meet the following formatting criterias:
47+
Your first PR should be a first draft of the final LSP. It must meet the following formatting criteria:
4848

4949
- Correct metadata in the header, as described in the [LSP template](lsp-x.md).
5050
- Make sure you include a `discussions-to` header with the URL to a discussion forum or open GitHub issue where people can discuss the LSP as a whole.

LSPs/LSP-0-ERC725Account.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Adopting smart contract accounts over traditional EOAs streamlines blockchain in
6565

6666
- **Dynamic Information Storage**: Unlike EOAs, smart contract accounts can record static information, making them self-explanatory entities that can assist in identity verification for off-chain entities, and enable the decentralized tracking of any information stored such as assets, followers, etc. The information stored can also be standardized, for example [LSP3-Profile-Metadata] for storing profile information, [LSP5-ReceivedAssets] for storing the addresses of received assets, and [LSP10-ReceivedVaults] for storing addresses of received vaults, etc ..
6767

68-
- **Upgradeable Security**: Owners can use a simple EOA for owning the account having basic level of security, or opt for an owner having a multisignature setup, or permissions access control contracts providing advanced layer of security in contorlling the account.
68+
- **Upgradeable Security**: Owners can use a simple EOA for owning the account having basic level of security, or opt for an owner having a multisignature setup, or permissions access control contracts providing advanced layer of security in controlling the account.
6969

7070
- **Inclusive Control**: Users can decide to own the account with a permission based access control contract (e.g: the [LSP6-KeyManager]) which allows owners to assign specific rights to different actors, like granting a party the right to update profile information without providing full transactional authority.
7171

@@ -109,15 +109,15 @@ However, in alignment with the [LSP20-CallVerification] standard, these owner-ex
109109

110110
For example, if the caller address is not the owner, the function will call the `lsp20VerifyCall(..)` on the owner address function to validate the transaction before execution passing the following arguments:
111111

112-
- `requestor`: The address calling the function to be executed.
112+
- `requester`: The address calling the function to be executed.
113113
- `target`: The address of the account.
114114
- `caller`: The address calling the function to be executed.
115115
- `value`: The value sent by the caller to the function called on the account.
116116
- `receivedCalldata`: The calldata sent by the caller to the account.
117117

118118
The expected outcome is for the `bytes4` returned value to match the first `bytes3` of the function selector of `lsp20VerifyCall` for the operation to proceed. Specifically, if the fourth byte of the call is `0x01`, the function MUST call `lsp20VerifyCallResult` after execution of the function passing the following arguments:
119119

120-
- `callHash`: The `keccak256` hash of the parameters of `lsp20VerifyCall(address,address,address,uint256,bytes)` parameters packed-encoded (concatened).
120+
- `callHash`: The `keccak256` hash of the parameters of `lsp20VerifyCall(address,address,address,uint256,bytes)` parameters packed-encoded (concatenated).
121121

122122
- `callResult`: the result of the function being called on the account.
123123
- if the function being called returns some data, the `callResult` MUST be the value returned by the function being called as abi-encoded `bytes`.
@@ -131,7 +131,7 @@ The function designated to be called by the pending owner is:
131131

132132
- `acceptOwnership()`
133133

134-
The same logic applies to `acceptOwnership` function, expcet that it should be either called by the pending owner or an address allowed by the pending owner. In case the caller is not the pending owner, the verification should happen according to the [LSP20-CallVerification] on the address of the pending owner.
134+
The same logic applies to `acceptOwnership` function, except that it should be either called by the pending owner or an address allowed by the pending owner. In case the caller is not the pending owner, the verification should happen according to the [LSP20-CallVerification] on the address of the pending owner.
135135

136136
> Read more about the [Rational behind using LSP20-CallVerifiaction](#lsp20-callverification-usage) in the LSP0-ERC725Account standard.
137137

LSPs/LSP-1-UniversalReceiver.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ _Returns:_ `bytes` which can be used to encode response values.
7878
event UniversalReceiver(address indexed from, uint256 indexed value, bytes32 indexed typeId, bytes receivedData, bytes returnedValue);
7979
```
8080

81-
This event MUST be emitted when the `universalReceiver` function is succesfully executed.
81+
This event MUST be emitted when the `universalReceiver` function is successfully executed.
8282

8383
_Values:_
8484

@@ -100,10 +100,10 @@ UniversalReceiver delegation allows to forward the `universalReceiver(..)` call
100100

101101
The ability to react to upcoming actions with a logic hardcoded within the `universalReceiver(..)` function comes with limitations, as only a fixed functionality can be coded or the [`UniversalReceiver`](#universalreceiver-1) event be fired.
102102

103-
This section explains a way to forward the call to the `universalReceiver(..)` function to an external smart contract to extend and change funcitonality over time.
103+
This section explains a way to forward the call to the `universalReceiver(..)` function to an external smart contract to extend and change functionality over time.
104104

105105
The delegation works by simply forwarding a call to the `universalReceiver(..)` function to a delegated smart contract calling the `universalReceiverDelegate(..)` function on the external smart contract.
106-
As the external smart contract doesn't know about the inital `msg.sender` and the `msg.value`, this specification proposes to add these values as arguments. This allows the external contract to know the full context of the initial `universalReceiver` call and react accordingly.
106+
As the external smart contract doesn't know about the initial `msg.sender` and the `msg.value`, this specification proposes to add these values as arguments. This allows the external contract to know the full context of the initial `universalReceiver` call and react accordingly.
107107

108108
### Specification
109109

@@ -181,7 +181,7 @@ An implementation can be found in the [lukso-network/lsp-smart-contracts] reposi
181181

182182
### UniversalReceiver Example:
183183

184-
After transfering token from `TokenABC` to `MyWallet`, the owner of `MyWallet` contract can know, by looking at the emitted UniversalReceiver event, that the `typeId` is `_TOKEN_RECEIVING_HASH`.
184+
After transferring token from `TokenABC` to `MyWallet`, the owner of `MyWallet` contract can know, by looking at the emitted UniversalReceiver event, that the `typeId` is `_TOKEN_RECEIVING_HASH`.
185185

186186
Enabling the owner to know the token sender address and the amount sent by looking into the `data`.
187187

@@ -300,8 +300,8 @@ contract UniversalReceiverDelegate is ERC165, ILSP1 {
300300
301301
function universalReceiverDelegate(address caller, uint256 value, bytes32 typeId, bytes memory data) public returns (bytes memory) {
302302
// Any logic could be written here:
303-
// - Interfact with DeFi protocol contract to sell the new tokens received automatically.
304-
// - Register the token received on other registery contract.
303+
// - Interact with DeFi protocol contract to sell the new tokens received automatically.
304+
// - Register the token received on other registry contract.
305305
// - Allow only tokens with `_TOKEN_RECEIVING_HASH` hash and reject the others.
306306
// - revert; so in this way the wallet will have the option to reject any token.
307307
}

LSPs/LSP-11-BasicSocialRecovery.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ _Requirements:_
182182
function selectNewController(address addressSelected) external
183183
```
184184

185-
Select an address to be a potentiel controller address if he reaches the guardian threshold and provide the correct plainSecret. MUST fire the [SelectedNewController](#selectednewcontroller) event.
185+
Select an address to be a potential controller address if he reaches the guardian threshold and provide the correct plainSecret. MUST fire the [SelectedNewController](#selectednewcontroller) event.
186186

187187
_Parameters:_
188188

@@ -252,7 +252,7 @@ MUST be emitted when changing the secret hash.
252252
event SelectedNewController(uint256 indexed currentRecoveryCounter, address indexed guardian, address indexed addressSelected);
253253
```
254254

255-
MUST be emitted when a guardian select a new potentiel controller address for the linked target.
255+
MUST be emitted when a guardian select a new potential controller address for the linked target.
256256

257257
#### RecoveryProcessSuccessful
258258

LSPs/LSP-12-IssuedAssets.md

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
lip: 12
33
title: Issued Assets
4-
author: Fabian Vogelsteller <fabian@lukso.network>
4+
author: Fabian Vogelsteller <fabian@lukso.network>
55
discussions-to: https://discord.gg/E2rJPP4
66
status: Draft
77
type: LSP
@@ -10,21 +10,23 @@ requires: LSP2
1010
---
1111

1212
## Simple Summary
13+
1314
This standard describes a set of [ERC725Y](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) data key values to store addresses of issued assets by an [ERC725X](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) smart contract.
1415

1516
## Abstract
16-
This data key value standard describes a set of data keys that can be added to an [ERC725Y](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) smart contract to describe issued assets:
1717

18+
This data key value standard describes a set of data keys that can be added to an [ERC725Y](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-725.md) smart contract to describe issued assets:
1819

1920
- `LSP12IssuedAssets[]` is an [LSP2 array](./LSP-2-ERC725YJSONSchema.md) of addresses.
2021
- `LSP12IssuedAssetsMap` is a dynamic address mapping, which contains:
2122
- an [ERC165 interface ID](https://eips.ethereum.org/EIPS/eip-165) to easily identify the standard used by the mapped asset smart contract
2223
- and the index in the `LSP12IssuedAssets[]` array.
2324

24-
The data key `LSP12IssuedAssetsMap` exists so that smart contracts can detect if an address is present in the array (e.g. as done in the [LSP1-UniversalReceiverDelegate](./LSP-1-UniversalReceiver.md)).
25+
The data key `LSP12IssuedAssetsMap` exists so that smart contracts can detect if an address is present in the array (e.g. as done in the [LSP1-UniversalReceiverDelegate](./LSP-1-UniversalReceiver.md)).
2526

2627
## Motivation
27-
This standard allows any smart contract to state that it issued a certain asset. The asset itself MUST reference the issuer smart contract as well, for it be verifable issued. This allows other smart contracts to link the authenticity of an asset to a specific issuer. See also [LSP4 - DigitalAsset Metadata](./LSP-4-DigitalAsset-Metadata.md) for the `owner` and `LSP4Creators[]`.
28+
29+
This standard allows any smart contract to state that it issued a certain asset. The asset itself MUST reference the issuer smart contract as well, for it be verifiable issued. This allows other smart contracts to link the authenticity of an asset to a specific issuer. See also [LSP4 - DigitalAsset Metadata](./LSP-4-DigitalAsset-Metadata.md) for the `owner` and `LSP4Creators[]`.
2830

2931
A full verification flow for an asset should contain a check on the asset and the issuer smart contract. If we use an asset using [LSP4 - DigitalAsset Metadata](./LSP-4-DigitalAsset-Metadata.md) and a [LSP0 - ERC725Account](./LSP-0-ERC725Account.md) as the issuer. The flow should looks as follows:
3032

@@ -37,19 +39,17 @@ Every contract that supports the ERC725Account SHOULD have the following data ke
3739

3840
### ERC725Y Data Keys
3941

40-
4142
#### LSP12IssuedAssets[]
4243

4344
An array of issued smart contract assets, like tokens (_e.g.: [LSP7 Digital Assets](./LSP-7-DigitalAsset)_) and NFTs (_e.g.: [LSP8 Identifiable Digital Assets](./LSP-8-IdentifiableDigitalAsset)_).
4445

45-
4646
```json
4747
{
48-
"name": "LSP12IssuedAssets[]",
49-
"key": "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
50-
"keyType": "Array",
51-
"valueType": "address",
52-
"valueContent": "Address"
48+
"name": "LSP12IssuedAssets[]",
49+
"key": "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
50+
"keyType": "Array",
51+
"valueType": "address",
52+
"valueContent": "Address"
5353
}
5454
```
5555

@@ -60,18 +60,19 @@ For more info about how to access each index of the `LSP12IssuedAssets[]` array,
6060
References issued smart contract assets, like tokens (_e.g.: [LSP7 Digital Assets](./LSP-7-DigitalAsset)_) and NFTs (_e.g.: [LSP8 Identifiable Digital Assets](./LSP-8-IdentifiableDigitalAsset)_). This data key exists so that smart contracts can detect whether the address of an asset is present in the `LSP12IssuedAssets[]` array without looping all over it on-chain. Moreover, it helps to identify at which index in the `LSP12IssuedAssets[]` the asset address is located for easy access and to change or remove this specific asset from the array. Finally, it also allows the detection of the interface supported by the asset.
6161

6262
The data value MUST be constructed as follows: `bytes4(standardInterfaceId) + uint128(indexNumber)`. Where:
63+
6364
- `standardInterfaceId` = the [ERC165 interface ID](https://eips.ethereum.org/EIPS/eip-165) of the standard that the token or asset smart contract implements (if the ERC165 interface ID is unknown, `standardInterfaceId = 0xffffffff`).
6465
- `indexNumber` = the index in the [`LSP12IssuedAssets[]` Array](#LSP12Issuedassets)
6566

6667
Value example: `0x5fcaac27000000000000000c` (interfaceId: `0x5fcaac27` for a [LSP7](./LSP-7-DigitalAsset.md) token, index position `0x000000000000000c = 12`).
6768

6869
```json
6970
{
70-
"name": "LSP12IssuedAssetsMap:<address>",
71-
"key": "0x74ac2555c10b9349e78f0000<address>",
72-
"keyType": "Mapping",
73-
"valueType": "(bytes4,uint128)",
74-
"valueContent": "(Bytes4,Number)"
71+
"name": "LSP12IssuedAssetsMap:<address>",
72+
"key": "0x74ac2555c10b9349e78f0000<address>",
73+
"keyType": "Mapping",
74+
"valueType": "(bytes4,uint128)",
75+
"valueContent": "(Bytes4,Number)"
7576
}
7677
```
7778

@@ -80,24 +81,26 @@ Value example: `0x5fcaac27000000000000000c` (interfaceId: `0x5fcaac27` for a [LS
8081
## Implementation
8182

8283
ERC725Y JSON Schema `LSP12IssuedAssets`:
84+
8385
```json
8486
[
85-
{
86-
"name": "LSP12IssuedAssets[]",
87-
"key": "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
88-
"keyType": "Array",
89-
"valueType": "address",
90-
"valueContent": "Address"
91-
},
92-
{
93-
"name": "LSP12IssuedAssetsMap:<address>",
94-
"key": "0x74ac2555c10b9349e78f0000<address>",
95-
"keyType": "Mapping",
96-
"valueType": "(bytes4,uint128)",
97-
"valueContent": "(Bytes4,Number)"
98-
}
87+
{
88+
"name": "LSP12IssuedAssets[]",
89+
"key": "0x7c8c3416d6cda87cd42c71ea1843df28ac4850354f988d55ee2eaa47b6dc05cd",
90+
"keyType": "Array",
91+
"valueType": "address",
92+
"valueContent": "Address"
93+
},
94+
{
95+
"name": "LSP12IssuedAssetsMap:<address>",
96+
"key": "0x74ac2555c10b9349e78f0000<address>",
97+
"keyType": "Mapping",
98+
"valueType": "(bytes4,uint128)",
99+
"valueContent": "(Bytes4,Number)"
100+
}
99101
]
100102
```
101103

102104
## Copyright
105+
103106
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).

LSPs/LSP-14-Ownable2Step.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ MUST emit a [`OwnershipTransferredStarted`](#ownershiptransferstarted) event onc
9393
- `typeId`: `keccak256('LSP14OwnershipTransferStarted')` > `0xee9a7c0924f740a2ca33d59b7f0c2929821ea9837ce043ce91c1823e9c4e52c0`
9494
- `data`: The data sent SHOULD be abi encoded and contain the [current owner](#owner) (`address`) and the [pending owner](#pendingowner) (`address`) respectively.
9595

96-
The Type ID associated with this hook COULD be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Example where the LSP14 type ID is overriden can be found in [LSP0](LSP-0-ERC725Account.md#transferownership) and [LSP9](LSP-9-Vault.md#transferownership) standards.
96+
The Type ID associated with this hook COULD be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Example where the LSP14 type ID is overridden can be found in [LSP0](LSP-0-ERC725Account.md#transferownership) and [LSP9](LSP-9-Vault.md#transferownership) standards.
9797

9898
#### acceptOwnership
9999

@@ -123,7 +123,7 @@ MUST emit a [`OwnershipTransferred`](https://eips.ethereum.org/EIPS/eip-173#spec
123123
- `typeId`: `keccak256('LSP14OwnershipTransferred_RecipientNotification')` > `0xe32c7debcb817925ba4883fdbfc52797187f28f73f860641dab1a68d9b32902c`
124124
- `data`: The data sent SHOULD be abi encoded and contain the [previous owner](#owner) (`address`) and the new owner (`address`) respectively.
125125

126-
The Type IDs associated with these hooks can be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Examples where the LSP14 type IDs are overriden can be found in the [LSP0](LSP-0-ERC725Account.md#acceptownerhsip) and [LSP9](LSP-9-Vault.md#acceptownership) standards.
126+
The Type IDs associated with these hooks can be altered in a contract that inherits from LSP14. This allows for more straightforward identification of the contract whose ownership is being transferred. Examples where the LSP14 type IDs are overridden can be found in the [LSP0](LSP-0-ERC725Account.md#acceptownerhsip) and [LSP9](LSP-9-Vault.md#acceptownership) standards.
127127

128128
#### renounceOwnership
129129

@@ -142,7 +142,7 @@ MUST emit [`OwnershipTransferred`](https://eips.ethereum.org/EIPS/eip-173#specif
142142

143143
- MUST be called only by the `owner()` only.
144144
- The second call MUST happen AFTER the delay of 100 blocks and within the next 100 blocks from the first `renounceOwnership(..)` call.
145-
- If 200 blocks have passed, the `renounceOwnership(..)` call phase SHOULD reset the process, and a new one will be initated.
145+
- If 200 blocks have passed, the `renounceOwnership(..)` call phase SHOULD reset the process, and a new one will be initiated.
146146

147147
**LSP1 Hooks:**
148148

0 commit comments

Comments
 (0)