npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bepro-js-v1

v1.2.11

Published

![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) ![Dependencies](https://img.shields.io/badge/dependencies-up%20to%20date-brightgreen.svg) [![G

Downloads

4

Readme

alt tag

Python Build Status Dependencies GitHub issues Contributions welcome License

Introductions

Build the future of DeFi Gaming

Installation

bepro-js is available as npm package.

// with npm
$ 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:
// Install it via bash terminal globally
$ sudo apt install python2

// Check the installed version.
// Must shown Python 2.7.18rc1 on terminal to the install be OK
$ python2 --version

// Verify Python 2.7 path
$ ls /usr/bin/python*

// Set Python 2 as alternative 1
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 1

// Confirm Python 2 as alternative priority 1
$ sudo update-alternatives --config python

// Confirm the procedure.
// Must shown Python 2.7.18rc1 on terminal to the install be OK
$ python --version

// On the working directory, run the cmd below to set Python locally
$ npm config set python python
  1. Setting of Node:
// Install NVM recommended version for bepro-js
$ nvm install 14.17.0

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

// Use the settled as default
$ nvm use default

Now, your work directory is able to install and run bepro-js.

Docker support

Requirements

  • Docker CE - 19.03.3+
  • Docker Compose - 1.19.0+

How to install or upgrade docker and docker-compose?

Docker:
sudo curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh

Notice:If you already have Docker installed, this script can cause trouble. If you installed the current Docker package using this script and are using it again to update Docker. Or use official installation instructions: Mac, Windows, Ubuntu, Other.

Docker Compose:

For linux:

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.

Running containers

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

Build images

make build

Starting containers in background:

make up

Start npm watch:

make watch

Run tests

make test

Stop containers

make down

Using docker-compose instead of make

docker-compose up

Usage

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, 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();
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();

Contribution

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

License

MIT

Notes

The usage of ETH in all methods or params means using the native currency of that blockchain, example BSC in Binance Chain would still be nominated as ETH