2.15.0 • Published 2 years ago

@plushfamily/plush-protocol-contracts v2.15.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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}

2.15.0

2 years ago

2.13.0

2 years ago

2.14.0

2 years ago

2.12.0

2 years ago

2.12.1

2 years ago

2.11.0

2 years ago

2.10.0

2 years ago

2.9.0

2 years ago

2.8.3

2 years ago

2.3.8

2 years ago

2.8.2

2 years ago

2.3.7

2 years ago

2.8.4

2 years ago

2.3.9

2 years ago

2.5.0

2 years ago

2.4.0

2 years ago

2.7.0

2 years ago

2.3.4

2 years ago

2.6.0

2 years ago

2.3.3

2 years ago

2.8.1

2 years ago

2.3.6

2 years ago

2.8.0

2 years ago

2.3.5

2 years ago

2.3.10

2 years ago

2.3.1

2 years ago