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

connector-frontend-cryptopayments-v1.09

v1.0.0

Published

Solidity Hardhat TypeScript Boilerplate

Downloads

3

Readme

Prerequisites

  • Docker
pnpm install
alias escrow="pnpm run -C services/escrow"
escrow build # install solc and other tools in the docker image

Don't forget to copy the .env.example file to a file named .env, and then edit it to fill in the details.

Running all the tests

escrow test
escrow test:trace       # shows logs + calls
escrow test:fresh       # force compile and then run tests
escrow test:coverage    # run tests with coverage reports

Formatters & Linters

You can use the below packages,

  • Solhint
  • ESLint
  • Prettier
  • CSpell
  • ShellCheck
escrow format
escrow lint

Analyzers

You can use the below tools,

  • Slither
  • Mythril
escrow analyze:static path/to/contract
escrow analyze:security path/to/contract
escrow analyze:all path/to/contract

Deploy Contract & Verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Goerli.

In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details.

  • Enter your Etherscan API key
  • Goerli node URL (eg from Alchemy or Infura)
  • The private key of the account which will send the deployment transaction.

With a valid .env file in place, first deploy your contract:

escrow compile
# related to scripts/deploy/<CONTRACT_FILE_NAME>.ts
escrow deploy goerli Escrow    

# related to scripts/deploy.ts
escrow deploy:all goerli

Also, you can add contract(s) manually to your tenderly projects from the output. https://dashboard.tenderly.co/contract/<NETWORK_NAME>/<CONTRACT_ADDRESS>

And then verify it:

escrow verify <DEPLOYED_CONTRACT_ADDRESS> "<CONSTRUCTOR_ARGUMENT(S)>"    # hardhat.config.ts to see all networks

Finder

escrow finder --path contracts/Workshop.sol --name Workshop abi --colorify --compact --prettify    # find contract outputs of specific contract
escrow finder --help    # see all supported outputs (abi, metadata, bytecode and more than 20+ outputs)

Miscellaneous

escrow generate:docs    # generate docs according to the contracts/ folder
escrow generate:flatten ./path/to/contract     # generate the flatten file (path must be "./" prefixed)
escrow generate:abi ./path/to/contract         # generate the ABI file (path must be "./" prefixed)
escrow generate:bin ./path/to/contract         # generate the binary in a hex (path must be "./" prefixed)
escrow generate:metadata ./path/to/contract    # generate the metadata (path must be "./" prefixed)
escrow generate:all-abi
escrow generate:all-bin
escrow generate:all-metadata
escrow share    # share project folder with remix ide
  • Smart contracts hardhat commands
1. yarn deploy-payment --network "<NETWORK_NAME>" #deploy Payment contract
2. yarn deploy-simple-escrow --network "<NETWORK_NAME>" #deploy Escrow contract
3.(OPTIONAL) yarn deploy-token --network "<NETWORK_NAME>" #deploy ERC20 FakeUSDT token for testing escrow

TODO

  • Increase diversity in the Workshop Contract
  • Add Workshop Contract tests
  • Add TSLint as a TypeScript linter