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

shyft_tetrix

v1.0.12

Published

- client - server

Downloads

25

Readme

Why TetriX?

There are three main concerns Ethereum developers have when designing smart contracts: security, accuracy, and cost. We sought to tackle the problem of cost by creating a tool that automates the reordering of state variables during contract instantiation in order to lower transaction costs. We ensured efficient memory allocation by reorganizing your state variables to take up the minimal amount of storage slots necessary.

Getting Started

Tetrix is available as the tetrix package on npm

Tetrix can be used on any single-contract solidity file. You can optimize contract construction cost with it, but you can also view details about your contract such as ABI, bytecode, opcode and assembly.

Prerequisites

To install Tetrix, make sure package.json has been initiated in your project folder.

More info on how to initiate package.json go Here

Installing

To use latest stable version of Tetrix you can install it via npm:

$ npm install tetrix-sol 

Usage on the Command-Line

Compile Contract and Deploy to Local Virtual Blockchain

To use Tetrix, execute:

$ Tetrix YOUR_SOL_FILE_PATH.sol

View Contract Detail

In package.json, include a new script in scripts:

"scripts": {
  "tetrixGUI": "webpack --config node_modules/tetrix/webpack.config.js && node node_modules/tetrix/server/server.js"
},

then, execute:

$ npm run tetrixGUI

Key Features

Optimize Contract State Variables Memory Allocation

  • Rearranges the Smart Contract state variables in order to allocate the least memory slot possible on the blockchain to optimize gas usage.
    • Parse through user Smart Contract and detect state variables
    • Arrange variables based on a 32Bytes memory slot.

Create Personal Blockchain Development Environment

  • Compiles user's Smart Contract using Solidity Compiler for retrieving accurate contract information.
  • Deploys user's Smart Contract with trufflesuite/ganache to avoid the need for paying for the main Ethereum Blockchain

Front-End Display of Smart Contract Information

  • Client-side local hosted server (PORT 8080)

Built With

  • React - Used for Front-end Single Page Application
  • React-Router - Route Management in a Single Page Application
  • Ganache - Local Personal Blockchain Environment
  • Web3 - Ethereum Javascript API
  • Solc - Javascript Solidity Compiler
  • Express - Web Framework for node.
  • Webpack - Bundler for javascripts/React

Contributing

Found a bug? Have a suggestion? Feel free to submit issues!

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License

Acknowledgments

  • Support from other open source developers
  • And the entire Ethereum developer community