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

yul-log

v0.5.1

Published

A Unified Toolchain for Yul+ Smart Contracts

Downloads

15

Readme

📦 Yul Log 📦

Yul Log is a package designed to serve as an easy to use unified toolchain for writing and using Yul+ Contracts. It's named after the dessert, partially to fit with Truffle's theme.

Yul Log reads from a directory called "Yul+ Contracts" within the local context, and expects only files with the .yulp extension inside. It will then compile your contracts and put the artifacts in ./artifacts/contracts for hardhat, and for truffle it will transpile them to Yul and put them in your contracts directory, then use truffle to compile it down to useable artifacts.

Currently Truffle is supported and Hardhat is close by, alternatively you can just utilize the default created artifacts inside of your own framework. If you want to check out how to use Yul log with truffle check out my truffle box and if you have any questions or issues just raise an issue on this repo!

Installation

Simply install with node via

npm install -g yul-log

(sudo may be required depending on settings for a global installation)

After installing the package, run the following command to set up the development environment.

yul-log init

Now you are all set up and can write .yulp files inside of the Yul+ Contracts directory.

Commands

yul-log

This will compile .yulp contracts inside of a "Yul+ Contracts" Directory in the current context into a special json file with the following format into a "./build" folder inside the current context

{
    "_format": "Yul+ Artifact Format v0.0.1",
    "contractName" : filename,
    "abi" : abi,
    "bytecode" : bytecode,
    "deployedBytecode" : deployedBytecode,
}

You can then use this json file however you would like in your current project.

yul-log truffle

This will compile .yulp contracts inside of a "Yul+ Contracts" Directory at the root of the project into truffle artifacts, which can then be treated like regular truffle contracts when testing. Note that if you are using truffle make sure the following is in your truffle-config.js

      solc: {
      version: "0.8.10",    // Fetch exact version from solc-bin (default: truffle's version)
      language : "Yul",
      // docker: true,        // Use "0.5.1" you've installed locally with docker (default: false)
        settings: {          // See the solidity docs for advice about optimization and evmVersion
        optimizer: {
          enabled: true,
          runs: 200
        },

so that you can compile Yul, as this will be used to compile the transpiled Yul, giving you more control over options and optimizations. After compiling the contract into truffle artifacts, you can run truffle test to run tests with truffle as normal.

yul-log hardhat

This will compile .yulp contracts inside of a "Yul+ Contracts" Directory at the root of the project into hardhat solidity artifacts (Use sig"" to remain compatible). Command is still very much a WIP, however it will generate a partial artifact that fits with a hardhat Solidity artifact, and can be treated similarly. However this isn't fully supported at the moment so expect issues and frequent manual fixes.