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

@peronio/core

v2.0.1

Published

This repository contains the Core contracts used by Peronio. Make sure to read the prerequisites carefully in order to set Peronio up locally.

Downloads

3

Readme

Peronio

Lint Tests Status CodeQL Status Discord

Peronio Core Contracts

This repository contains the Core contracts used by Peronio. Make sure to read the prerequisites carefully in order to set Peronio up locally.

Prerequisites

Although not technically required, having direnv installed will greatly simplify the set up process. Please check the provided link for installation in *nix and Mac OSs.

Installation

We'll assume you're working within the /some/path/to directory.

Clone & Checkout

Clone the repository normally and cd into it:

$ git clone https://github.com/peronio-ar/core
Cloning into 'core'...
remote: Enumerating objects: 123, done.
remote: Counting objects: 100% (123/123), done.
remote: Compressing objects: 100% (456/456), done.
remote: Total 123 (delta 789), reused 789 (delta 10), pack-reused 2
Receiving objects: 100% (123/123), 456.78 KiB | 9.01 MiB/s, done.
Resolving deltas: 100% (789/789), done.
$ cd core

If direnv is installed, you'll see:

direnv: error /some/path/to/core/.envrc is blocked. Run $(direnv allow) to approve its content

Simply do:

direnv allow

to make it go away and enable the nvm and environmental variables automation mechanism.

NodeJS

Now, ensure you have the correct version of NodeJS installed by doing:

$ nvm install
Found '/some/path/to/core/.nvmrc' with version <v16.14.0>
Downloading and installing node v16.14.0...
Downloading https://nodejs.org/dist/v16.14.0/node-v16.14.0-linux-x64.tar.xz...
Computing checksum with sha256sum
Checksums matched!
Now using node v16.14.0 (npm v8.3.1)

Alternatively, if you already had the correct NodeJS version installed, you'll get:

$ nvm install
Found '/some/path/to/core/.nvmrc' with version <v16.14.0>
v16.14.0 is already installed.
Now using node v16.14.0 (npm v8.3.1)

In case you do NOT have direnv installed, you'll need to issue nvm use from within the working directory each time you cd into it so as to let nvm pick up the correct version from the .nvmrc file; direnv will do this automagically for you if installed.

Yarn

Now, make sure you have yarn installed:

$ npm install -g yarn

added 1 package, and audited 2 packages in 756ms

found 0 vulnerabilities

Environmental Variables

Lastly, copy the environmental variables sample file and edit to taste:

cp .env.example .env

It's important that you overwrite the ETHERSCAN_API_KEY environment variable with a suitable Etherscan API Key.

If you want the variables declared therein to be immediately available to you, you'll need to export them manually.

In case you do NOT have direnv installed, you'll need to re-export the environmental variables in .env each time you want them to become available; direnv will do this automagically for you if installed.

If you have direnv, simply do cd ..; cd - and that should re-load all exports and nvm configuration in one fell swoop.

Dependencies

We're now ready to install all dependencies, simply do:

$ yarn
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 12.65s.

Typechain Declarations

Typechain declarations are automatically generated after installation.

Usage

If everything installed correctly, you should now have a working environment with the correct NodeJS version installed, all dependencies up-to-date, typechain declarations freshly generated, and the relevant environmental variables exported.

Running the Tests

Running the provided tests is as simple as:

$ yarn test
yarn run v1.22.19
$ hardhat test
No need to generate any newer typings.

Peronio
...

Remember: you must have the chain fork running for this to work!

Deploying

Deploying Peronio is as simple as:

$ yarn deploy
yarn run v1.22.17
$ hardhat deploy
Nothing to compile
No need to generate any newer typings.
-- Hardhat network
Increase MATIC
Swapping MATIC into USDC
Deploying Peronio
deploying "Peronio" (tx: 0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef)...: deployed at 0x78a486306D15E7111cca541F2f1307a1cFCaF5C4 with 7654321 gas
Initializing Peronio
Deploying Migrator
deploying "Migrator" (tx: 0x23456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01)...: deployed at 0xfe672A4b063b1895b2f6531a78a69c014614B2D8 with 9876543 gas
Deploying Uniswap
Deploying AutoCompound
deploying "AutoCompounder" (tx: 0x456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123)...: deployed at 0x3210FeDcBa9876543210fEdCbA9876543210FeDc with 111098 gas
Setting REWARD Role to AutoCompounder (0x3210FeDcBa9876543210fEdCbA9876543210FeDc)
$ hardhat run scripts/publish.ts --network matic
Done in 76.54s.