Skip to content

Commit

Permalink
rename token symbol and hash, tested deploy on solo/testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
laalaguer committed Jul 21, 2021
1 parent 90425a8 commit 91f0d59
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
32 changes: 21 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,37 @@ This is a fork of several repositories from https://github.com/Uniswap/

All tests passed.

## Disclaimer
Redistributions of source code must retain this list of conditions and the following disclaimer.

Neither the name of VeChain (VeChain Foundation) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# For Developers
```bash
/uniswap-lib # util libraries
/uniswap-v2-core # core contracts for assets
/uniswap-v2-periphery # surrounding contract for user interface
```

```bash
make install # install dependencies.
make compile # Compile all contracts.
make test # Run all the tests.
```

# Notice on branches in this repo:
# Branches in this repo:

## `main` branch

Specific tweaks:
- Change variable names of LP token `symbol` and `name`.
- `CREATE2` hash.
What is changed:
- Change variable names of LP token `symbol` and `name`. (uniswap-v2-core/contracts/UniswapV2ERC20.sol)
- `CREATE2` hash. (uniswap-v2-periphery/contracts/libraries/UniswapV2Library.sol)

What remains:
- `chainId()` OPCODE call remains the same
- Compiler option `istanbul` remains the same.

This will **NOT** enable to be run on VeChain now because the EVM doesn't support it, yet.

But eventually it is the unified set of code that is deployed on VeChain after the EVM support `istanbul` is in place.

# Below Should NOT Be Used

## `testnet` branch
Based on `main` branch.

Expand All @@ -50,3 +53,10 @@ Specific tweaks:
- Compiler change same as `testnet` branch.
- `CREATE2` hash change of respective files.
- Test cases changes same as on `testnet` branch.

## Disclaimer
Redistributions of source code must retain this list of conditions and the following disclaimer.

Neither the name of VeChain (VeChain Foundation) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4 changes: 2 additions & 2 deletions uniswap-v2-core/contracts/UniswapV2ERC20.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import './libraries/SafeMath.sol';
contract UniswapV2ERC20 is IUniswapV2ERC20 {
using SafeMath for uint;

string public constant name = 'Vexchange V2';
string public constant symbol = 'VEX-V2';
string public constant name = 'TinySwap';
string public constant symbol = 'TINY';
uint8 public constant decimals = 18;
uint public totalSupply;
mapping(address => uint) public balanceOf;
Expand Down
4 changes: 2 additions & 2 deletions uniswap-v2-core/test/UniswapV2ERC20.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ describe('UniswapV2ERC20', () => {

it('name, symbol, decimals, totalSupply, balanceOf, DOMAIN_SEPARATOR, PERMIT_TYPEHASH', async () => {
const name = await token.name()
expect(name).to.eq('Vexchange V2')
expect(await token.symbol()).to.eq('VEX-V2')
expect(name).to.eq('TinySwap')
expect(await token.symbol()).to.eq('TINY')
expect(await token.decimals()).to.eq(18)
expect(await token.totalSupply()).to.eq(TOTAL_SUPPLY)
expect(await token.balanceOf(wallet.address)).to.eq(TOTAL_SUPPLY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ library UniswapV2Library {
hex'ff',
factory,
keccak256(abi.encodePacked(token0, token1)),
hex'05ba850c4e77c36f1c3ba318277bb0beac894c06ed8ea1d8a8bba003b1e88da3' // init code hash
hex'e90c5eee4c17b35f49e920fdc550dd853e3347dd9070c6ad06899101ddf4e2a6' // init code hash
))));
}

Expand Down

0 comments on commit 91f0d59

Please sign in to comment.