diff --git a/.soliumrc.json b/.soliumrc.json new file mode 100644 index 0000000000..f856398932 --- /dev/null +++ b/.soliumrc.json @@ -0,0 +1,16 @@ +{ + "extends": "solium:recommended", + "plugins": [ + "security" + ], + "rules": { + "quotes": [ + "error", + "double" + ], + "indentation": [ + "error", + 4 + ] + } +} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 7d08a69fe3..8749fa7042 100644 --- a/.travis.yml +++ b/.travis.yml @@ -52,7 +52,7 @@ matrix: install: true # Skip install go packages. script: - # Ensure everything builds + # Ensure everything builds. - | bazel \ --bazelrc=.travis-bazelrc \ @@ -68,11 +68,24 @@ matrix: # Check that BUILD files are formatted correctly. - ./check_gazelle.sh - # Check that target visibility is correct.. + # Check that target visibility is correct. - ./check_visibility.sh # Shutdown must be last. - - bazel shutdown - + - bazel shutdown + notifications: email: false + + - language: node_js + os: linux + env: + - solidity + node_js: + - "lts/*" + before_install: + - npm install -g solium + install: true # Skip npm install. + script: + # Check solidity linter. + - solium -d contracts/ diff --git a/contracts/validator_registration.sol b/contracts/validator_registration.sol index 5dbe5648b0..04cd5ab014 100644 --- a/contracts/validator_registration.sol +++ b/contracts/validator_registration.sol @@ -25,8 +25,14 @@ contract ValidatorRegistration { ) public payable { - require(msg.value == VALIDATOR_DEPOSIT); - require(!usedPubkey[_pubkey]); + require( + msg.value == VALIDATOR_DEPOSIT, + "Incorrect validator deposit" + ); + require( + !usedPubkey[_pubkey], + "Public key already used" + ); usedPubkey[_pubkey] = true;