TruebitProtocol / interactive-coin-offerings

A crowdsale mechanism optimizing price discovery information for buyers
93 stars 22 forks source link

Remove Build Folder from Commits #28

Open cbdotguru opened 6 years ago

cbdotguru commented 6 years ago

What is it?

Stop committing the build folder as referenced in #24 by @gustavoguimaraes

Problem

Build folder pollutes the repo

Solution

Adopt the following pattern for using libraries:

Create a config file with a Json as such:

{
  Ethereum: {
    address: {
      Library: '0x859e7E76cAeDe3b642FC84862809f60c055cb731',
      AnotherLibrary: '0x1e2F058C43ac8965938F6e9CA286685A3E63F24E',
    }
  }
}

and access it as:

const config = require('../node_modules/config') // using the config library here
const LibraryAddress = config.get('Ethereum.address.Library')

const Library = artifacts.require('./Library.sol')
const library = Library.at(LibraryAddress)

Steps to implement

cbdotguru commented 6 years ago

@joshuahannan we need to look into suggesting this in our repo for devs at least until EthPM is up.