Skip to content

Commit

Permalink
Merge pull request #101 from akolotov/flattening-for-erc-to-native
Browse files Browse the repository at this point in the history
Flattening for erc20-to-native contracts
  • Loading branch information
akolotov authored Oct 23, 2018
2 parents 25d7f80 + 8605f89 commit 0c2fe21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions contracts/upgradeable_contracts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Solidity contracts implemeting core bridge functionality.

**Do not forget to update the flattening script when a new bridge mode is being implemented**
11 changes: 10 additions & 1 deletion flatten.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
#!/usr/bin/env bash

rm -rf flats/*
if [ -d flats ]; then
rm -rf flats
fi

mkdir -p flats/native_to_erc20
mkdir -p flats/erc20_to_erc20
mkdir -p flats/erc20_to_native

./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/native_to_erc20/ForeignBridgeNativeToErc.sol > flats/native_to_erc20/ForeignBridgeNativeToErc_flat.sol
./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/native_to_erc20/HomeBridgeNativeToErc.sol > flats/native_to_erc20/HomeBridgeNativeToErc_flat.sol

./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/erc20_to_erc20/HomeBridgeErcToErc.sol > flats/erc20_to_erc20/HomeBridgeErcToErc_flat.sol
./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/erc20_to_erc20/ForeignBridgeErcToErc.sol > flats/erc20_to_erc20/ForeignBridgeErcToErc_flat.sol

./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/erc20_to_native/HomeBridgeErcToNative.sol > flats/erc20_to_native/HomeBridgeErcToNative_flat.sol
./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/erc20_to_native/ForeignBridgeErcToNative.sol > flats/erc20_to_native/ForeignBridgeErcToNative_flat.sol

./node_modules/.bin/truffle-flattener contracts/upgradeability/EternalStorageProxy.sol > flats/EternalStorageProxy_flat.sol
./node_modules/.bin/truffle-flattener contracts/upgradeable_contracts/BridgeValidators.sol > flats/BridgeValidators_flat.sol
./node_modules/.bin/truffle-flattener contracts/ERC677BridgeToken.sol > flats/ERC677BridgeToken_flat.sol

0 comments on commit 0c2fe21

Please sign in to comment.