Skip to content

Commit

Permalink
Add pre-commit formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
hkalodner committed Aug 10, 2019
1 parent 6c9eed4 commit 042dfc0
Show file tree
Hide file tree
Showing 51 changed files with 21,440 additions and 2,533 deletions.
162 changes: 81 additions & 81 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,86 +2,86 @@ version: 2
jobs:
build:
docker:
- image: offchainlabs/build-base:0.1.2
- image: offchainlabs/build-base:0.1.2
working_directory: /home/user/arbitrum
steps:
- run: mv /home/user/arbitrum/vconan/ /home/user/vconan/
- checkout
- run:
name: build all
command: |
mv /home/user/vconan/ /home/user/arbitrum/vconan/
yarn
yarn 'install:validator'
yarn 'install:ci'
- run:
name: test arb-avm-cpp
command: |
ctest .
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info --output-file coverage.info '*/.conan/*' '/usr/*' '*/tests/*' '*/external/*'
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -f coverage.info -cF arb_avm_cpp
cd .. && rm -rf ci
working_directory: /home/user/arbitrum/packages/arb-avm-cpp/ci
- run:
name: test arb-avm-go
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_avm_go
working_directory: /home/user/arbitrum/packages/arb-avm-go
- run:
name: test arb-bridge-eth
command: |
ganache-cli -p 7545 &
truffle migrate --reset --compile-all
kill $!
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_bridge_eth
working_directory: /home/user/arbitrum/packages/arb-bridge-eth
- run:
name: test arb-compiler-evm
command: |
coverage run --source=arbitrum/ setup.py test
cd tests/sol-syscall
truffle migrate --reset --compile-all --network arbitrum
coverage run --source=../../arbitrum/ truffle_runner.py compiled.json
cd ../..
coverage combine .coverage tests/sol-syscall/.coverage
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_compiler_evm
working_directory: /home/user/arbitrum/packages/arb-compiler-evm
- run:
name: test arb-provider-ethers
command: |
yarn jest --coverage
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_ethers
working_directory: /home/user/arbitrum/packages/arb-provider-ethers
- run:
name: test arb-provider-go
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_go
working_directory: /home/user/arbitrum/packages/arb-provider-go
- run:
name: test arb-provider-truffle
command: |
yarn jest --coverage --pass-with-no-tests
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_truffle
working_directory: /home/user/arbitrum/packages/arb-provider-truffle
- run:
name: test arb-provider-web3
command: |
yarn jest --coverage --pass-with-no-tests
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_web3
working_directory: /home/user/arbitrum/packages/arb-provider-web3
- run:
name: test arb-util
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_util
working_directory: /home/user/arbitrum/packages/arb-util
- run:
name: test arb-validator
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_validator
working_directory: /home/user/arbitrum/packages/arb-validator
- run: mv /home/user/arbitrum/vconan/ /home/user/vconan/
- checkout
- run:
name: build all
command: |
mv /home/user/vconan/ /home/user/arbitrum/vconan/
yarn
yarn 'install:validator'
yarn 'install:ci'
- run:
name: test arb-avm-cpp
command: |
ctest .
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info --output-file coverage.info '*/.conan/*' '/usr/*' '*/tests/*' '*/external/*'
lcov --list coverage.info
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -f coverage.info -cF arb_avm_cpp
cd .. && rm -rf ci
working_directory: /home/user/arbitrum/packages/arb-avm-cpp/ci
- run:
name: test arb-avm-go
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_avm_go
working_directory: /home/user/arbitrum/packages/arb-avm-go
- run:
name: test arb-bridge-eth
command: |
ganache-cli -p 7545 &
truffle migrate --reset --compile-all
kill $!
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_bridge_eth
working_directory: /home/user/arbitrum/packages/arb-bridge-eth
- run:
name: test arb-compiler-evm
command: |
coverage run --source=arbitrum/ setup.py test
cd tests/sol-syscall
truffle migrate --reset --compile-all --network arbitrum
coverage run --source=../../arbitrum/ truffle_runner.py compiled.json
cd ../..
coverage combine .coverage tests/sol-syscall/.coverage
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_compiler_evm
working_directory: /home/user/arbitrum/packages/arb-compiler-evm
- run:
name: test arb-provider-ethers
command: |
yarn jest --coverage
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_ethers
working_directory: /home/user/arbitrum/packages/arb-provider-ethers
- run:
name: test arb-provider-go
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_go
working_directory: /home/user/arbitrum/packages/arb-provider-go
- run:
name: test arb-provider-truffle
command: |
yarn jest --coverage --pass-with-no-tests
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_truffle
working_directory: /home/user/arbitrum/packages/arb-provider-truffle
- run:
name: test arb-provider-web3
command: |
yarn jest --coverage --pass-with-no-tests
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_provider_web3
working_directory: /home/user/arbitrum/packages/arb-provider-web3
- run:
name: test arb-util
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_util
working_directory: /home/user/arbitrum/packages/arb-util
- run:
name: test arb-validator
command: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
bash <(curl -s https://codecov.io/bash) -R /home/user/arbitrum -cF arb_validator
working_directory: /home/user/arbitrum/packages/arb-validator
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
exclude: |
(?x)(
^packages/arb-avm-cpp/external/keccak/|
^packages/arb-bridge-eth/installed_contracts/
)
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.6
- repo: git://github.com/doublify/pre-commit-clang-format
rev: master

hooks:
- id: clang-format
- repo: git://github.com/dnephin/pre-commit-golang
rev: master
hooks:
- id: go-fmt
- repo: https://github.com/prettier/prettier
rev: "" # Use the sha or tag you want to point at
hooks:
- id: prettier
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![CircleCI](https://circleci.com/gh/OffchainLabs/arbitrum.svg?style=svg)](https://circleci.com/gh/OffchainLabs/arbitrum) [![codecov](https://codecov.io/gh/OffchainLabs/arbitrum/branch/master/graph/badge.svg)](https://codecov.io/gh/OffchainLabs/arbitrum)

Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private. Arbitrum interoperates closely with Ethereum, so Ethereum developers can easily cross-compile their contracts to run on Arbitrum. Arbitrum achieves these goals through a unique combination of incentives, network protocol design, and virtual machine architecture.
Arbitrum is a Layer 2 cryptocurrency platform that makes smart contracts scalable, fast, and private. Arbitrum interoperates closely with Ethereum, so Ethereum developers can easily cross-compile their contracts to run on Arbitrum. Arbitrum achieves these goals through a unique combination of incentives, network protocol design, and virtual machine architecture.

Want to learn more? Join the team on [Discord](https://discord.gg/ZpZuw7p), follow the [developer guide](https://developer.offchainlabs.com), and read the [white paper](https://offchainlabs.com/arbitrum.pdf)!

Expand All @@ -18,7 +18,7 @@ Arbitrum technologies are patent pending. This repository is offered under the A

Clone the monorepo to get started:

``` bash
```bash
git clone -b master --depth=1 -c advice.detachedHead=false https://github.com/OffchainLabs/arbitrum.git
cd arbitrum
yarn
Expand Down
14 changes: 13 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,19 @@ coverage:
project:
default: off
build:
flags: [arb_avm_cpp, arb_avm_go, arb_bridge_eth, arb_compiler_evm, arb_provider_ethers, arb_provider_go, arb_provider_truffle, arb_provider_web3, arb_util, arb-validator]
flags:
[
arb_avm_cpp,
arb_avm_go,
arb_bridge_eth,
arb_compiler_evm,
arb_provider_ethers,
arb_provider_go,
arb_provider_truffle,
arb_provider_web3,
arb_util,
arb-validator,
]

flags:
arb_avm_cpp:
Expand Down
28 changes: 17 additions & 11 deletions demos/election/README.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,52 @@

# Election - DAPP Tutorial

Build your first decentralized application, or Dapp, on the Ethereum Network with this tutorial!

**Full Free Video Tutorial:**
https://youtu.be/3681ZYbDSSk


Follow the steps below to download, install, and run this project.

## Dependencies

Install these prerequisites to follow along with the tutorial. See free video tutorial or a full explanation of each prerequisite.
- NPM: https://nodejs.org
- Truffle: https://github.com/trufflesuite/truffle
- Ganache: http://truffleframework.com/ganache/
- Metamask: https://metamask.io/

- NPM: https://nodejs.org
- Truffle: https://github.com/trufflesuite/truffle
- Ganache: http://truffleframework.com/ganache/
- Metamask: https://metamask.io/

## Step 1. Clone the project

`git clone https://github.com/dappuniversity/election`

## Step 2. Install dependencies

```
$ cd election
$ npm install
```

## Step 3. Start Ganache
Open the Ganache GUI client that you downloaded and installed. This will start your local blockchain instance. See free video tutorial for full explanation.

Open the Ganache GUI client that you downloaded and installed. This will start your local blockchain instance. See free video tutorial for full explanation.

## Step 4. Compile & Deploy Election Smart Contract

`$ truffle migrate --reset`
You must migrate the election smart contract each time your restart ganache.

## Step 5. Configure Metamask

See free video tutorial for full explanation of these steps:
- Unlock Metamask
- Connect metamask to your local Etherum blockchain provided by Ganache.
- Import an account provided by ganache.

- Unlock Metamask
- Connect metamask to your local Etherum blockchain provided by Ganache.
- Import an account provided by ganache.

## Step 6. Run the Front End Application

`$ npm run dev`
Visit this URL in your browser: http://localhost:3000

If you get stuck, please reference the free video tutorial.

7,130 changes: 7,128 additions & 2 deletions demos/election/dist/css/bootstrap.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit 042dfc0

Please sign in to comment.