Skip to content

Commit 508c315

Browse files
Update README.md
1 parent 71deb4e commit 508c315

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,19 @@ Decodes Uniswap Universal execute function in accordance with [the Uniswap tehch
5656

5757
---
5858

59-
### [Address Constants](https://github.com/Uniswap/universal-router/blob/7d763cb28c88bb3bce5a30ad2356722f10c4d484/test/integration-tests/shared/constants.ts#L14)
59+
### [Address Constants](https://etherscan.io/address/0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD#code#F26#L17)
6060

6161
NOTE: Uniswap Universal Router uses address constants internally, for example
6262

63-
```Javascript
64-
export const MSG_SENDER: string = '0x0000000000000000000000000000000000000001'
65-
export const ADDRESS_THIS: string = '0x0000000000000000000000000000000000000002'
63+
```solidity
64+
/// @dev Used as a flag for identifying the transfer of ETH instead of a token
65+
address internal constant ETH = address(0);
66+
67+
/// @dev Used as a flag for identifying that msg.sender should be used, saves gas by sending more 0 bytes
68+
address internal constant MSG_SENDER = address(1);
69+
70+
/// @dev Used as a flag for identifying address(this) should be used, saves gas by sending more 0 bytes
71+
address internal constant ADDRESS_THIS = address(2);
6672
```
6773
- '0x0000000000000000000000000000000000000001' represents msg.sender (EOA) address itself
6874
- '0x0000000000000000000000000000000000000002' represents Universal Router Contract address itself

0 commit comments

Comments
 (0)