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

@edgefund/core

v0.0.4

Published

EdgeFund Core contracts and tests

Downloads

6

Readme

EdgeFund Core Contract Repository

logo

Travis Coverage Status Twitter Follow

This repository contains the core smart contracts used on the EdgeFund platform, including tests and truffle local development tools.

Prerequisites

In order to run these contracts you need to have the following installed and configured.

  • nodejs & npm
  • truffle
  • Docker (Optional)

It is assumed you are already familiar with nodejs and npm. To install truffle please run the following command:

npm install -g truffle

Once you have truffle installed globally you need to install the local prerequisites, you can do this simply by running:

npm install

Now you should have everything you need and be ready to start compiling and testing the contracts.

Running the contracts

Before you can run the tests for the contracts they need to be compiled. To compile the contracts run the following command:

truffle compile

They also need to be migrated to the ganache-cli blockchain. To do this run the following command:

truffle migrate

Setting up a local test blockchain

In order to run the tests we need to have a blockchain against which to run them. Thankfully ganache-cli allows us to run a local 'mock' blockchain which we can manipulate in order to forward time, mine a predictable amount of blocks and so on. This level of control allows us to have predictable conditions under which to run our tests.

Setup a local ganache-cli server

Now that you have truffle installed globally, you can startup a local test blockchain by running the following:

truffle develop

You will need to open a new terminal window after this point, to be able to run further commands, but to allow the test server to remain running. If you close the window where this command was run, your test suite will not be able to find the test server.

Setting up a ganache-cli blockchain in Docker

Simply run the following command:

docker run -d -p 8545:8545 trufflesuite/ganache-cli:latest -a 10 -h 0.0.0.0

This will start-up a docker container which runs the blockchain, exposing it on port 8545. So make sure your truffle.js configuration matches this port.

Running the Tests

Once the contracts are compiled and your server is started, you can run the tests by running:

truffle test