open-index/open-npm huggingface dataset:
npm package: @moneyonchain/flow
Description: -   Node v10 (tested with v10.18.1) -   Truffle v5.1.12 -   Solc v0.5.16 -   Ganache-cli v6.8.2
Latest version: 1.5.1-beta.8

### Requirements

-   Node v10 (tested with v10.18.1)
-   Truffle v5.1.12
-   Solc v0.5.16
-   Ganache-cli v6.8.2

### Initial configuration for development

`node-gyp` is required for `npm install` to work correctly

```shell
$ npm install node-gyp
```

Install node dependencies

```shell
$ npm install
```

### Compilation and testing

To compile contracts

```shell
$ npx truffle compile
```

To run unit tests (ganache-cli should be previously running)

```shell
$ npx truffle test
```

### Deploy and Migration

To deploy only Buffer/Splitter (without drippers)
Add a custom network with the following parameters:

```json
moc_liveOnlyBuffers: {
    networkCheckTimeout: 1000000,
    provider: () => {
        return new HDWalletProvider([process.env.PRIVATE_KEY], "http://rsknodes:4446"); // change for your production node
    },
    network_id: "*",       // Any network (default: none)
    skipDryRun: true,
    flow: {
        governor_addr: "0x322c4302b80ceEBD8e975b0415Eb5BC010DDFf0d", //governor address
        buffers: [{
            name: "RBTC",
            token: "0x0000000000000000000000000000000000000000", // token address for RIF, or 0x00 for RBTC
            threshold: 1754172,// liquidation threshold, see GasUsage.md
            outputs: [
                "0xf69287F5Ca3cC3C6d3981f2412109110cB8af076", // multisig address
                "0xE02f9AE8fe5Da307b6C7cd928AEa380392f5a395", // moc os collateral address
            ],
            splits: [80, 20], // output percentages, 80%-> multisig, 20%->Bucket0.
            thresholds: [1403337.6, 350834.4] // output thresholds, see GasUsage.md
        },{
            name: "RIF",
            token: "0x19f64674D8a5b4e652319F5e239EFd3bc969a1FE", // token address for RIF, or 0x00 for RBTC
            threshold: 168307086316,// liquidation threshold, see GasUsage.md
            outputs: [
                "0xf69287F5Ca3cC3C6d3981f2412109110cB8af076", // multisig address
                "0x4512f4C1d984bbf8B7f7404EddFb1881cFA79EfD", // moc os collateral address
            ],
            splits: [50, 50], // output percentages, 50%-> multisig, 50%->Bucket0.
            thresholds: [84153543158, 84153543158] // output thresholds, see GasUsage.md
        }],
        drippers: [] // To Deploy only Buffer/Splitter leave empty.
    }
}
```

```shell
$ truffle migrate --network moc_liveOnlyBuffers
```

### Gas calculations

The gas calculation from the contract depends on the buffer destination. For details on how to simulate gas used see [GasUsage](./GasUsage.md).
npm package: @moneyonchain/vesting
Description: Vesting smart contract code
Latest version: 1.5.1-beta.1

# MOC Vesting

The vesting machine.

## Loading vesting machines

To load the vesting machines run: `npx truffle exec scripts/createMachines.js payments.json`

An example of the format of payments.json can be found in: `payments_example.json`
npm package: @moneyonchain/voting
Description: Money On Chain Voting System
Latest version: 1.5.1-beta.1

# MOC Shared

Moc Voting smart contract, used to change platform parameters by voting with the MOCs stake.

## Tooling

This repo uses `solhint` and `eslint` linters to check errors in solidity and js code respectively.

To format the code `prettier` and `prettier-plugin-solidity` are used.

To avoid clashes between `eslint` and `prettier` we use `eslint-config-prettier` to disable
some `eslint` rules. For more details see: [integrating-with-linters](https://prettier.io/docs/en/integrating-with-linters.html#recommended-configuration) 

Finally `husky` executes `lint-staged` during the pre-commit and `lint-staged` runs the linters and
formatters over the code.
npm package: @moneypot/caas
Description: (_caas_ = "controller as a server", a silly but hopefully memorable name.)
Latest version: 100.0.1

# @moneypot/caas

(_caas_ = "controller as a server", a silly but hopefully memorable name.)

This library implements a controller server that manages users and balances across any number of Moneypot casinos.

You can use it to quickly create your own controller.

Example implementations:

1. <https://github.com/moneypot/wheel-controller/>: A wheel of fortune game ([frontend](https://github.com/moneypot/wheel-experience/))
2. <https://github.com/moneypot/dice-controller/>: A dice game ([frontend](https://github.com/moneypot/dice-experience/))

## Manual

View our docs: https://moneypot.com/docs/caas

## Install

```sh
$ npm install @moneypot/caas
```

## Usage

```typescript
import { defaultPlugins, ServerOptions, startAndListen } from "@moneypot/caas";
import path from "path";

const options: ServerOptions = {
  // Name of the postgres schemas you're exposing to the GraphQL API (if any)
  extraPgSchemas: ["app"],
  plugins: [
    ...defaultPlugins,
    // And any custom plugins you've written
  ],
  // Where to save the GraphQL schema (derived from your database + plugins)
  exportSchemaSDLPath: path.join(import.meta.dirname, "../schema.graphql"),
  // Where your database migration files are located (if any)
  userDatabaseMigrationsPath: path.join(import.meta.dirname, "../pg-versions"),
};

startAndListen(options)
  .then(({ port }) => {
    console.log(`Listening on ${port}`);
  })
  .catch(console.error);
```

## Development

To work on this library , there's a mini project in the `./demo` directory that uses `@moneypot/caas` as a lib.

```sh
createdb caas_demo
```

Ensure this role exists:

```sql
CREATE ROLE app_postgraphile LOGIN PASSWORD 'pass';
```

Create `.env`:

```ini
DATABASE_URL="postgres://app_postgraphile:pass@localhost/caas_demo"
SUPERUSER_DATABASE_URL="postgres://app_superuser:pass@localhost/caas_demo"
GRAPHILE_ENV=development
NODE_ENV=development
```

Run the demo:

```sh
cd demo
npm install
npm run dev
```

The caas-demo server should be running at <http://localhost:8888/graphql>.

### Dashboard development

To work on the `./dashboard` react app, ensure that caas-demo is running.

Terminal 1: Run demo controller inside this repo's `demo` dir:

```sh
cd demo
npm run dev
# Listening on :8888
```

Terminal 2: Run dashboard project pointed at demo controller

```
cd dashboard
npm install
VITE_GRAPHQL_URL=http://localhost:8888/graphql npm run dev
```

Now visit the localhost url that it prints out.

(The `VITE_GRAPHQL_URL` override is necessary since the dashboard defaults to `window.location.origin + "/graphql"` as its api endpoint since it usually runs bundled with the caas server.)

## Change log

- 1.0.0: Initial release.
npm package: @moneypot/experience-react-sdk
Description: React SDK for building games for MoneyPot
Latest version: 0.1.32

# @moneypot/experience-react-sdk

Once this project reaches 1.0.0, it will begin semver where breaking changes, like the store data structure, will be noted in the changelog and the major version will be bumped.

A React toolkit for building experiences (game front-ends) for the MoneyPot ecosystem that talk to a @moneypot/hub server.

The goal is to put common logic in this SDK so that your React experience can focus on unique game logic instead of boilerplate code.
npm package: @moneypot/frontend-utils
Description: A collection of utility functions useful for building MoneyPot frontend games.
Latest version: 0.0.5

# @moneypot/frontend-utils

A collection of utility functions useful for building MoneyPot frontend games.

The goal of this package is to make things easy for you by extracting common frontend logic.

If you don't want the dependency, feel free to copy and paste any of these functions into your own codebase or even fork this package to make your own reusable library.