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

@sarcophagus-org/sarcophagus-v2-contracts

v0.17.2

Published

[![Discord](https://img.shields.io/discord/753398645507883099?color=768AD4&label=discord)](https://discord.com/channels/753398645507883099/) [![Twitter](https://img.shields.io/twitter/follow/sarcophagusio?style=social)](https://twitter.com/sarcophagusio)

Downloads

49

Readme

Sarcophagus Core V2

Discord Twitter

Sarcophagus is a decentralized Dead Man's Switch built on Ethereum and Arweave.

Overview

This repository contains the smart contracts (and corresponding deployment scripts) that power version 2 of the Sarcophagus system. Version 1 of Sarcophagus can be found here Sarcophgus V1.

Local Development Guide

Clone the repository and install the dependencies

git clone [email protected]:sarcophagus-org/sarcophagus-v2-contracts.git
cd sarcophagus-v2-contracts
nvm use
npm install

# run tests to ensure that things are in working order
npm run test 

# deploy contracts to local hardhat network
npm run start # or npx hardhat node

Configure the environment

cp .env.example .env
  • Populate GOERLI_PROVIDER with a valid provider url. Infura offers free tier endpoints.

Launch the console

  • Launch the console on a specific network with
npx hardhat console --network localhost
# or for goerli
npx hardhat console --network goerli
  • Load the smart contracts into the console’s HRE by calling loadContracts()
    • the function will retrieve the diamond address from ./deployments//Diamond.json
    • you may optionally pass in a diamond address
  • Connect a funded signer so that contract calls are made with an account that can pay gas and SARCO fees
    • on the localhost network you don’t need to do anything because the default signer is already funded with ether and SARCO
    • on goerli you’ll need to connect a signer by supplying the private key for an account that owns goerli ether and goerli SARCO
    • call connectSigner('<funded private key>')
loadContracts(/* optional: diamond address */)
connectSigner(/* required: funded private key */)

NPM Package

The core contracts in this repository are published in an NPM package for easy use within other repositories.

To install the npm package, run:

npm i @sarcophagus-org/sarcophagus-v2-contracts

Updating

Update the version at the top of package.json. Increment the third number (PATCH version) for bugfixes, the second number (MINOR version) for backwards compatible functionality additions, and the first number (MAJOR version) for breaking API changes.

npm i
npm run prepublish
npm publish

Commit updated version to git

Deploying / Upgrading Diamond Pattern on Goerli

If the upgrade is run by a signer that is not the original diamond deployer, a new set of facets will be deployed

  • Update the package.json file’s version number with the abi version that will be published for the deployment
  • In your .env file, set
    • GOERLI_PROVIDER to a valid goerli rpc node url
    • SARCO_TOKEN_ADDRESS_GOERLI to the address of the SarcoToken contract on Goerli: 0x4633b43990b41B57b3678c6F3Ac35bA75C3D8436
    • GOERLI_DEPLOYER_PRIVATE_KEY to the address of the original deployer. If this is a new deployment:
      • Update the "name" of the diamond proxy in the deploy file (await diamond.deploy("Diamond").
      • note that on a new deployment, the json deployment files under deployments/goerli/ will be updated with new contract addresses
  • run npx hardhat deploy --network goerli
  • publish the ABI package
npm i
npm run prepublish
npm publish
  • update the web-app and archaeologist node to reference the new ABI package