Skip to content

Commit dd539e0

Browse files
eee4017hydai
authored andcommitted
[Example] Fix grammar in README.md
1 parent 9de0cb5 commit dd539e0

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

example/uniswap-v2/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ We could use solc to compile solidity into YUL IR.
99
solc --ir UniswapV2ERC20.sol > UniswapV2ERC20.yul
1010
```
1111

12-
However, the compiled ir has deployment code. This test does not contain runtime test, so you need to remove the deployment code manually.
13-
It could be done by extract `object "UniswapV2ERC20_431_deployed"` into a single YUL file.
12+
However, the compiled IR has deployment code. This test does not contain a runtime test, so you need to remove the deployment code manually.
13+
It could be done by extracting` object "UniswapV2ERC20_431_deployed"` into a single YUL file.
1414

1515
A preprocessed `UniswapV2ERC20.yul` is included in the folder, you could use the file directly.
1616

@@ -118,18 +118,18 @@ return: 1
118118

119119
## Testing other Uniswap Interfaces
120120

121-
If we want to test Factory/Pair Interface, we need to setup a chain to initialize tokens.
122-
However, the testing environment cannot support contract deployment, so we cannot test the full function of the interface.
121+
If we want to test Factory/Pair Interface, we need to set up a chain to initialize tokens.
122+
However, the testing environment cannot support contract deployment, so we cannot test the full functionality of the interface.
123123

124-
Some interfaces inherented from ERC20 and some basic function could still be tested with this environment.
124+
Some interfaces inherited from ERC20 and some basic functions could still be tested with this environment.
125125

126126
```
127127
python uniswap-test.py --input UniswapV2Pair.wasm
128128
```
129129

130130
### Uniswap V2 Factory
131131

132-
After ERC20 tokens are deployed at some address, say `tokenA` is deployed at `addressA` and `tokenB` is deployed at `addressB` , we could create pair with Uniswap V2 Factory. We could call `createPair` API to create a pair of tokens.
132+
After ERC20 tokens are deployed at some address, say `tokenA` is deployed at `addressA` and `tokenB` is deployed at `addressB`, we could create pair with Uniswap V2 Factory. We could call `createPair` API to create a pair of tokens.
133133

134134
```
135135
function createPair(address tokenA, address tokenB) external returns (address pair);
@@ -142,20 +142,20 @@ function getPair(address tokenA, address tokenB) external view returns (address
142142
function allPairs(uint) external view returns (address pair);
143143
```
144144

145-
With the above process with could test the correctness of Uniswap V2 Factory.
145+
The above process could test the correctness of Uniswap V2 Factory.
146146

147-
For more testing process, please checkout [UniswapV2Factory test script](https://github.com/Uniswap/v2-core/blob/master/test/UniswapV2Factory.spec.ts)
147+
For more testing processes, please checkout [UniswapV2Factory test script](https://github.com/Uniswap/v2-core/blob/master/test/UniswapV2Factory.spec.ts)
148148

149149

150150

151151
### Uniswap V2 Pair
152152

153-
After we validate Uniswap V2 Factory, we could then validate Uniswap V2 Pair, which is the main interface of Uniswap. Pairs serve as automated market makers and keep track of pool token balances. List 5 test below,
153+
After we validate Uniswap V2 Factory, we could then validate Uniswap V2 Pair, which is the main interface of Uniswap. Pairs serve as automated market makers and keep track of pool token balances. List 5 tests below,
154154

155155
1. Mint `function mint(address to) external returns (uint liquidity);`
156156
+ Creates pool tokens to some address
157157
2. Swap token `function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;`
158-
+ Two direction of swapping
158+
+ Two directions of swapping
159159
+ pay for the withdrawn ERC20 tokens with the corresponding pair tokens
160160
+ return the withdrawn ERC20 tokens along with a small fee
161161
3. burn `function burn(address to) external returns (uint amount0, uint amount1);`
@@ -166,4 +166,5 @@ After we validate Uniswap V2 Factory, we could then validate Uniswap V2 Pair, wh
166166
+ price1CumulativeLast = Token_0 / Token_1
167167
+ To calculate the correct price, please check [utilities.ts:encodePrice](https://github.com/Uniswap/v2-core/blob/master/test/shared/utilities.ts#L97), it divide the liquidity of 2 toekns
168168

169-
For more testing process, please checkout [UniswapV2Pair test script](https://github.com/Uniswap/v2-core/blob/master/test/UniswapV2Pair.spec.ts)
169+
For more testing processes, please checkout [UniswapV2Pair test script](https://github.com/Uniswap/v2-core/blob/master/test/UniswapV2Pair.spec.ts)
170+

0 commit comments

Comments
 (0)