mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
contracts: Add Solidity Linter to Travis (#376)
This commit is contained in:
parent
bfaa248b39
commit
7a1f5869c2
16
.soliumrc.json
Normal file
16
.soliumrc.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"extends": "solium:recommended",
|
||||
"plugins": [
|
||||
"security"
|
||||
],
|
||||
"rules": {
|
||||
"quotes": [
|
||||
"error",
|
||||
"double"
|
||||
],
|
||||
"indentation": [
|
||||
"error",
|
||||
4
|
||||
]
|
||||
}
|
||||
}
|
21
.travis.yml
21
.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/
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user