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

@jolt-network/contracts

v0.6.2

Published

A smart contract platofrm to enable cryptoincentivized workers to work for registered contracts that need poking or automated calls of any kind.

Downloads

5

Readme

Jolt network

These docs are in active development by the Jolt community.

Jolt network is a decentralized network of workers created for projects that need external devops and for external teams to find onchain jobs.

Workers

Worker is the term used to refer to an external person/team/bot that executes a job on the Jolt network. This can be as simplistic as calling a transaction, or as complex as requiring extensive off-chain logic. The scope of Jolt network is not to manage these jobs themselves, but to allow contracts to register as jobs for workers, and for workers to register themselves as available to perform jobs. It is up to the individual worker to set up their devops and infrastructure and create their own rules based on what transactions they deem profitable (even though the Jolt network CLI can help considerably in setting up a profitable worker from a predefined set of jobs).

Jobs

Job is the term used to refer to a smart contract that wishes an external entity to perform an action. They would like the action to be performed in "good will" and not have a malicious result. For this reason they register as a job, and workers can then execute on their contract.

Becoming a worker

To become a worker you just need to bond some JOLT to the platform. In order to do so you will have to call bond(uint256) on the Bonder contract. There is a bonding delay before you can activate as a worker. The extent of the delay is decided though governance by the Jolt guild. Once the bonding time has passed, you can call consolidateBond() to officially register as a valid worker.

Registering a job

A job can be any system that requires external execution, the scope of Jolt is not to define or restrict the action taken, but to create an incentive mechanism for all parties involved. There are two core ways to create a job;

Registering a job via governance

If you prefer, you can register as a job by simply submitting a proposal via governance to the Jolt guild, to include the contract as a job. If governance approves, no further steps are required.

Registering a job by becoming a job creator

Job creators are a privileged entity in the platform, since they can create jobs at any time without further validation. Job creators can only be allowed through governance, and the Jolt guild must approve them after carefully considering the details of the application. Most of the time, job creators are platforms that wish to create a certain number of Jolt jobs without much friction.

Job interface

Some contracts require external event execution on some conditions. These normally require a restricted access control list, however these can be difficult for fully decentralized projects to manage, as they lack devops infrastructure.

These interfaces can be broken down into types depending on security considerations.

For no, or low risk executions, you can simply call Master.worker(msg.sender) which will let you know if the given actor is a valid worker in the network.

For high, sensitive, or critical risk executions, you can specify a minimum bond, minimum earned, and minimum worker age required to execute this function. Based on these 3 limits you can define your own trust ratio on these keepers. In general, to create a job one can simply extend from either the Job or JobUpgradeable contract. The contract needs to be passed the Master instance address on the targeted network and override the workable and work function (making sure to apply either the needsExecution or needsExecutionWithRequirements modifier to it, depending on the needs).

You can take a look at a simple example job here.

Job credits

As mentioned above, a job has a set amount of credits that they can award workers with, and any ERC20 token can be awarded as credit. But if you need to add a job to the platform, you can avoid purchasing credit tokens directly. You can instead opt to receive bonus credits by providing liquidity to specific pools, as defined by governance. After having provided liquidity, you can "sell" the LP token to the platform for an amount of JOLT equal to the value of the LP tokens plus a premium. The premium amount is decided by the governance. This is a way to buy up credits at a discount. Keep in mind that credits obtained this way can never be withdrawn from the platform.

With the v1 of Jolt, a frontend will obviously be released to make it a lot easier to interact with the platform.