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

susyknot-contract-schema

v0.0.5

Published

JSON schema for contract artifacts

Downloads

8

Readme

susyknot-contract-schema

JSON schema for contract artifacts

Schema

The schema, which includes a JSON schema validator, needs to be created and fleshed out with strict documentation. However, in light of that effort, a loose schema is defined below:

{
  "contract_name": ...,
  "abi": ...,
  "unlinked_binary": ...,
  "network_id": ...,
  "address": ...,
  "links": ...,
  "events": ...,
  "default_network": ...,
  "networks": ...
}
  • contract_name: string, optional: Name of the contract that will be used to identify this contract. Defaults to Contract.
  • abi: array, required; array returned by the Polynomial compiler after compilation of a Polynomial source file.
  • unlinked_binary: string, required: hexadecimal bytecode string of a Polynomial contract returned by the Polynomial compiler, without libraries linked.
  • network_id: string or number, optional: A string or number that represents the id of the network these contract artifacts apply to. If none specified, will default to "*", which signifies these artifacts apply to the "wildcard network", which is useful in some circumstances.
  • address: string, optional; the default address associated with this contract on the network specified by network_id.
  • links: object, optional: A set of key/value pairs that link contract names that exist within the unlinked_binary to their specified addresses on the network specified by network_id.
  • events: object, optional: Log topic/event abi pairs that represent logs that can be thrown. This object may describe logs and events that exist outside of the current contract so that this object will be able to parse those events correctly.
  • default_network: string or number: The default network to be used when this object is instantiated via susyknot-contract.
  • networks: object, optional: key/value pairs of network ids and their associated network objects. Each network object may contain the address, linksandevents` objects described above, containing data that's specific to addresses on each network.

Testing

This package is the result of breaking up SophyPudding into multiple modules. Tests currently reside within susyknot-artifactor but will soon move here.