Skip to content

Commit

Permalink
Merge pull request #2 from RealFevr/real-fvr-luis
Browse files Browse the repository at this point in the history
Real fvr luis
  • Loading branch information
Quicksaver authored Nov 15, 2021
2 parents a70143a + 6dad431 commit 04b5f60
Show file tree
Hide file tree
Showing 164 changed files with 16,390 additions and 575,217 deletions.
Binary file removed .DS_Store
Binary file not shown.
15 changes: 1 addition & 14 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
executors:
node:
docker:
- image: circleci/node:8.12.0
- image: cimg/node:16.2.0
- image: trufflesuite/ganache-cli
# environment:
# FOOD: $BAR
Expand All @@ -30,9 +30,6 @@ commands:
- run:
name: install [email protected] globally
command: sudo npm install -g --unsafe-perm=true [email protected]
- run:
name: install repo's node modules
command: npm install
- save_cache:
key: *node_cache_key
paths:
Expand All @@ -44,16 +41,6 @@ jobs:
steps:
- prepare_code
- run: mkdir ~/reports
- run:
name: tests
command: npm run test
environment:
MOCHA_FILE: ~/reports/results.xml
when: always
- store_test_results:
path: ~/reports
- store_artifacts:
path: ~/reports

workflows:
code-checks:
Expand Down
17 changes: 0 additions & 17 deletions .eslintrc

This file was deleted.

26 changes: 26 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"extends": [
"airbnb-base"
],

"globals": {
"window": true
},

"parser": "@babel/eslint-parser",

"root": true,

"rules": {
"camelcase": 0,
"max-len": ["warn", 120, 2, {
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"no-prototype-builtins": 0,
"no-underscore-dangle": 0
}
}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.12.0]
node-version: [14.17.0]
steps:
- uses: actions/checkout@v1
- name: Install Node.js ${{ matrix.node-version }}
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: GitHub pages

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Fool GH Pages?
run: mkdir docs

- name: Build
uses: andstor/jsdoc-action@v1
with:
source_dir: ./src
recurse: true
config_file: docs-src/jsdoc.json
template: better-docs

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./docs
24 changes: 24 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Publish Package

on:
release:
types:
- created

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 8

- name: build
run: npm run build

- uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}

9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
node_modules
/node_modules
node_modules/
.env
package-lock.json
.idea
xunit.xml
build/
/docs
.DS_Store

/built
9 changes: 9 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
/node_modules
.env
.circleci/
.github/
_book/
docs/
.idea

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.12.0
v14.17.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt-get update && apt-get install -y -q --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*

ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 8.12.0
ENV NODE_VERSION 14.17.0

# Install nvm with node and npm
RUN curl https://raw.githubusercontent.com/creationix/nvm/v0.24.1/install.sh | bash \
Expand Down
66 changes: 42 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@


![alt tag](https://uploads-ssl.webflow.com/5fc917a7914bf7aa30cae033/5ff4e84c73f45881c8b9cd85_Logo-purple-dark-background-p-500.png)
=========
# ![alt tag](https://uploads-ssl.webflow.com/5fc917a7914bf7aa30cae033/5ff4e84c73f45881c8b9cd85_Logo-purple-dark-background-p-500.png)

![Python](https://img.shields.io/badge/python-v2.7+-blue.svg)
![Build Status](https://github.com/bepronetwork/bepro-js/actions/workflows/build.yml/badge.svg
)
![Build Status](https://github.com/bepronetwork/bepro-js/actions/workflows/build.yml/badge.svg)
![Dependencies](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg)
[![GitHub issues](https://img.shields.io/github/issues/bepronetwork/bepro-js.svg)](https://GitHub.com/bepronetwork/bepro-js/issues/)
![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)


## Introductions

Build the future of DeFi Gaming

## Installation
Expand All @@ -27,6 +23,7 @@ $ npm i bepro-js
Before try to install, make sure your working directory has `Python 2` and the recommended `NVM` version setted on. To do, so:

1. Setting of Python 2:

```bash
// Install it via bash terminal globally
$ sudo apt install python2
Expand All @@ -53,12 +50,13 @@ $ npm config set python python
```

2. Setting of Node:

```bash
// Install NVM recommended version for bepro-js
$ nvm install 8.12.0
$ nvm install 14.17.0

// Set it on the working directory
$ nvm alias default v8.12.0
$ nvm alias default v14.17.0

// Use the settled as default
$ nvm use default
Expand Down Expand Up @@ -86,23 +84,24 @@ sudo curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
##### Docker Compose:

For linux:

```shell script
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
```

For Mac or Windows take a look on: [official guides](https://docs.docker.com/compose/install/#install-compose).

### Running containers

You can use docker-compose directly, or the nifty ``make`` that comes bundled.

You can use docker-compose directly, or the nifty `make` that comes bundled.

#### Build images

```shell script
make build
```

#### Starting containers in background:
#### Starting containers in background:

```shell script
make up
Expand Down Expand Up @@ -132,7 +131,6 @@ make down
docker-compose up
```


## Usage

https://bepronetwork.github.io/bepro-js/
Expand All @@ -142,29 +140,49 @@ https://bepronetwork.github.io/bepro-js/
/* Note : WEB3_LINK should be get from Infura/Quicknode or any other Web3 Provider - ETH, BSC, Moonbeam and others are supported */

import moment from 'moment';
import { Application } from 'bepro-js';

/* 1 - Instantiate the App with the Infura/Web3 Connection */
let app = new Application({opt : {web3Connection : 'WEB3_LINK'}});

/* 2 - Connect the App to the Metamask Web3 Injected wallet*/
import {
Application, DexStorage, ERC20Contract, StakingContract,
ERC20TokenLock, ERC721Collectibles, ERC721Standard
} from 'bepro-js';

/* 1.1 - Instantiate the App for Metamask functionality (MAINNET) */
let app = new Application({ opt : { web3Connection : 'WEB3_LINK' } });

/* 1.2 - Instantiate StakingContract Object or any other in a similar way (Staking, ERC20 etc..) */
// - MAINNET
let staking = new StakingContract({ contractAddress : null, /* Contract Address (optional) */
opt : { web3Connection : 'WEB3_LINK' } });
// - TEST net e.g. Rinkeby
let stakingTest = new StakingContract({ test : true, contractAddress : /* Contract Address (optional) */ });

/* 2 - Connect the App/Contract to the Metamask Web3 Injected wallet*/
await app.login();
/* or instantiate with the provided web3Connection */
await app.start()

/* 3 - Generate a Object (Staking, ERC20 etc..) */
let staking = app.getStakingContract({contractAddress : /* Contract Address (optional) */});
await staking.login();
/* or instantiate with the provided web3Connection, for tests it was already done at object creation */
await app.start();
await staking.start();

/* 4 - Assert all object data */
await staking.__assert();
await stakingTest.__assert();
/* or deploy the contract*/
await staking.deploy();
await stakingTest.deploy();

/* 5 - Access other Methods */
await staking.availableTokens();
await stakingTest.availableTokens();

```

Application can be initialized with a web3 provider directly, but all connection login is assumed to be on the consumer side in this case; i.e. no need to call start() or login(), that logic should be handled separately within the provider itself or by the consumer.

```javascript
let app = new Application({ opt: { provider: window.ethereum } });
```

## Contribution

Contributions are welcomed but we ask to red existing code guidelines, specially the code format. Please review [Contributor guidelines][1]

## License
Expand Down
30 changes: 30 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"presets": [
"@babel/preset-env"
],
"plugins": [
[
"@babel/plugin-transform-runtime",
{
"corejs": 3
}
],
"transform-remove-console",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-syntax-import-meta",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-json-strings",
[
"@babel/plugin-proposal-decorators",
{
"legacy": true
}
],
"@babel/plugin-proposal-function-sent",
"@babel/plugin-proposal-export-namespace-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-throw-expressions"
],
"sourceMaps": true,
"retainLines": true
}
Loading

0 comments on commit 04b5f60

Please sign in to comment.