Skip to content

Commit

Permalink
Set solcjs as default compiler (#716)
Browse files Browse the repository at this point in the history
* Set solcjs as default compiler
If you want to use native solc, set the environemnt variable POLYMATH_NATIVE_SOLC as true.

* Removed native solc from travis

* Removed native solc version query from travis
  • Loading branch information
maxsam4 authored Jun 14, 2019
1 parent 95be076 commit 2673164
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ extract/
extract.py
extract.zip
/test-results
.env
8 changes: 0 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,9 @@ jobs:
include:
- stage: Test
install:
- echo -ne '\n' | sudo add-apt-repository ppa:ethereum/ethereum
- sudo apt-get update
- sudo apt-get install -y dpkg
- sudo apt-get install -y solc
- curl -L -o solc https://github.com/ethereum/solidity/releases/download/v0.5.8/solc-static-linux
- sudo mv solc /usr/bin/solc
- sudo chmod +x /usr/bin/solc
- yarn install
before_script:
- truffle version
- solc --version
script: npm run test
notifications:
slack:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
},
"homepage": "https://github.com/PolymathNetwork/polymath-core#readme",
"dependencies": {
"dotenv": "^8.0.0",
"openzeppelin-solidity": "2.2.0",
"truffle": "^5.0.4",
"truffle-hdwallet-provider": "^1.0.4",
Expand Down
14 changes: 11 additions & 3 deletions truffle-config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
require('babel-register');
require('babel-polyfill');
require('dotenv').config();
const fs = require('fs');
const NonceTrackerSubprovider = require("web3-provider-engine/subproviders/nonce-tracker")

const HDWalletProvider = require("truffle-hdwallet-provider");

let ver;
if (process.env.POLYMATH_NATIVE_SOLC) {
ver = "native";
} else {
ver = "0.5.8";
}

module.exports = {
networks: {
development: {
Expand Down Expand Up @@ -59,11 +67,11 @@ module.exports = {
},
compilers: {
solc: {
version: "native",
version: ver,
settings: {
optimizer: {
enabled: true,
runs: 200
enabled: true,
runs: 200
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,11 @@ dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"

dotenv@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.0.0.tgz#ed310c165b4e8a97bb745b0a9d99c31bda566440"
integrity sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg==

drbg.js@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b"
Expand Down

0 comments on commit 2673164

Please sign in to comment.