Skip to content

Commit

Permalink
Merge pull request #91 from synapsecns/chisq/adapter-uniswap
Browse files Browse the repository at this point in the history
Adapter/uniswap -> Adapter/base
  • Loading branch information
aureliusbtc committed Mar 5, 2022
2 parents 70409d0 + 8aa89e1 commit 55e4802
Show file tree
Hide file tree
Showing 195 changed files with 141,221 additions and 5,151 deletions.
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Synapse is a decentralized community. If you have any questions on contributing,

Please make sure you adhere to the following guidelines:

- Code should adhere to the official [Solidity Guidelines](https://docs.soliditylang.org/en/v0.6.2/style-guide.html
- Commit messages shuld be descriptive of what they modify
- Pull requests need to be based against the `master` branch
- Code should adhere to the official [Solidity Guidelines](https://docs.soliditylang.org/en/v0.8.11/style-guide.html)
- Commit messages should be descriptive of what they modify
- Pull requests need to be based against the `master` branch
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,3 @@ This repository contains smart contracts for Synapse Protocol. The repository us
## What is Synapse?
Synapse is a cross-chain layer ∞ protocol powering frictionless interoperability between blockchains.
By providing decentralized, permissionless transactions between any L1, sidechain, or L2 ecosystem, Synapse powers integral blockchain activities such as asset transfers, swaps, and generalized messaging with cross-chain functionality - and in so doing enables new primitives based off of its cross-chain architecture.




Contains synapse contracts

- [![Coverage Status](https://coveralls.io/repos/github/synapsecns/synapse-contracts/badge.svg?branch=master)](https://coveralls.io/github/synapsecns/synapse-contracts?branch=master)
14 changes: 10 additions & 4 deletions contracts/amm/SwapCalculator.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ contract SwapCalculator {
uint256 public immutable numTokens;
uint256 public swapFee;

IERC20[] internal poolTokens;
uint256[] private tokenPrecisionMultipliers;

uint8 private constant POOL_PRECISION_DECIMALS = 18;
Expand Down Expand Up @@ -108,17 +109,22 @@ contract SwapCalculator {
function _setPoolTokens(ISwap _pool) internal returns (uint256) {
for (uint8 i = 0; true; i++) {
try _pool.getToken(i) returns (IERC20 token) {
IERC20Decimals _token = IERC20Decimals(address(token));
tokenPrecisionMultipliers.push(
10**uint256(POOL_PRECISION_DECIMALS - _token.decimals())
);
_addPoolToken(token, i);
} catch {
break;
}
}
return tokenPrecisionMultipliers.length;
}

function _addPoolToken(IERC20 token, uint8) internal virtual {
IERC20Decimals _token = IERC20Decimals(address(token));
tokenPrecisionMultipliers.push(
10**uint256(POOL_PRECISION_DECIMALS - _token.decimals())
);
poolTokens.push(token);
}

/**
* @notice Get fee applied to each token when adding
* or removing assets weighted differently from the pool
Expand Down
284 changes: 0 additions & 284 deletions contracts/bridge/BridgeConfig.sol

This file was deleted.

Loading

0 comments on commit 55e4802

Please sign in to comment.