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

@plushfamily/plush-protocol-contracts

v2.15.0

Published

The project contains the development environment and the source code of the Plush protocol

Downloads

9

Readme

Description

This repository contains the Plush Protocol contracts and the development environment of Plush Protocol.

Import this library to connect your contracts to the Plush ecosystem.

Overview

Installation

npm install @plushfamily/plush-protocol-contracts

Description of protocol contracts

  • PlushApps - the main contract of the ecosystem. It contains the addresses of the current applications of the ecosystem.
  • PlushAccounts - using to simplify transactions in the ecosystem and the storage of application tokens.
  • PlushController - the main contract of a third-party application. Used to connect app to the Plush ecosystem.
  • Plush - ERC-20 ecosystem token (PLSH).
  • WrappedPlush - wrapped ERC-20 ecosystem token (wPLSH).
  • LifeSpan - ERC-721 LifeSpan token (LIFESPAN).
  • PlushGetLifeSpan - self-minting of LifeSpan token (LIFESPAN).
  • PlushFaucet - ERC-20 ecosystem token faucet (PLSH).

Using

Protocol importing

Once installed, you can use the contracts in the library by importing them:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@plushfamily/plush-protocol-contracts/contracts/templates/apps/PlushController.sol";

contract PlushForestController is PlushController {}

Example of importing a controller.

Connecting third-party app to the Plush ecosystem

To add your application to the ecosystem, you need to write the address of the deployed controller contract in a special form (the form will be published later).

Example of connecting a third-party application to the Plush ecosystem: Plush Studio Contracts

Development of the Plush Protocol

We will be glad if you join the protocol development!

Project structure

arguments directory with current contract addresses for each of the environments.

contracts directory with source code of contracts

scripts directory with scripts for deploying and upgrading contracts

hardhat.config.ts hardhat configuration

Preparation for development

First you need to make sure that the Node.js platform is installed.

Recommended using the 16 version NodeJS!

Link to download: download Node.js

Next, you need to install the yarn package manager: npm install --global yarn

Before starting the project, you need to install all project dependencies: yarn install

Configuration

Create .env file:

NETWORK = mumbai
API_URL = "https://eth-mumbai.alchemyapi.io/v2/x-L3PRORMY7KyYFFMH9Gny4YD4sDxe5T" # EXAMPLE
PRIVATE_KEY = "ETH_PRIVATE_KEY"
ETHERSCAN_API_KEY = "ETHERSCAN_KEY"
POLYGONSCAN_API_KEY = "POLYGONSCAN_KEY"
DEFENDER_TEAM_API_KEY="KEY"
DEFENDER_TEAM_API_SECRET_KEY="KEY"

You can use any Blockchain provider : Alchemy, Infura, etc.

Support networks:

  1. Goerli – goerli
  2. Mumbai – mumbai
  3. Mainnet ETH – mainnet
  4. Polygon mainnet – polygon
  5. Local – local # for Ganache

Where to get the required keys

Get api keys on Etherscan and Polygonscan websites To request an upgrade contracts, you need to use a OpenZeppelin Defender.

Deploying contracts

To deploy contract use: npx hardhat run scripts/deploy/.../{FileName}

Upgrading contracts

To deploy contract use: npx hardhat run scripts/upgrade/.../{FileName}