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

@hexpayday/stake-manager

v2.0.0

Published

[![Tests](https://github.com/hexpay-day/stake-manager/actions/workflows/test.yml/badge.svg)](https://github.com/hexpay-day/stake-manager/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/hexpay-day/stake-manager/badge.svg?b

Downloads

11

Readme

Stake Manager

Tests Coverage Status

build the contracts

yarn run build

NOTE: sometimes tests fail if your network connection is a little slow at the time and are running for the first time after a fresh install or deleting the cache

run tests

yarn run foundry:test
yarn run test
yarn run test --trace-error # with error traces

Verification

Verification should occur with git hash f1180beb5322796abeaa5fd2371afb3f6a880d62 to have the correct bytecode for contract 0x209b1C66cB0Ea99DC2d4Ad13C35859DD1c258988 on Ethereum mainnet.

Run Traces

npx hardhat trace --hash 0xdeadbeef... # tx hash

Local Development

to run a node locally, simply run

npx hardhat node

then, in another terminal, you can run the local-development script to fund your deploy mnemonic (env: DEPLOY_MNEMONIC)

./local-development

in the case of the hexpay.day developers, they may wish to provide the following series of envs and run the local development script as noted above in order to test in a browser

# where stakes will be ended / managed from
TEST_ADDRESS=0xE971e07BF9917e91DFbeD9165f2ea8e6FF876880
# where contracts will be deployed from
# must be first address of `DEPLOY_MNEMONIC`
DEPLOY_ADDRESS=0x73CaB6c9EDA8aBc28099aF9F5dBd100Aa998Ae72

Auditors

The contracts that need to be reviewed are in the contracts folder and excludes the interfaces and test folders. The reference folder contains 3 contracts: HEX.sol, HEDRON and HSIM, and COMM. The contracts folder is ~2400 sloc. The reference contract HEX.sol is ~1640 SLOC. The HEDRON and HSIM contracts are ~2700 sloc combined. The COMM contract is ~1200 sloc.

NOTE: the contracts in this repo do not care about any tokens except for the ones listed above and the maximus perpetuals (custodial contract for a hex stake). That being said, it would be great if you familiarized yourself with the quirks of these 3 token contracts as they do break common practices.

Metrics for the repo can be generated by running yarn run metrics.

# ethereum
npx hardhat --network external write:existing:end-bundle:base --wait --mev
# if the above command fails, then run
npx hardhat --network external write:existing:end-bundle:base --wait

# pulsechain
npx hardhat --network external write:existing:end-bundle:base --wait