@nftchance/plug
unlocks the capability to declare "if this, then that" statements for all EVM blockchain protocols and transactions by bundling the power of intents on top of transaction execution. Without having to change the core logic of the protocols being consumed you can turbocharge your transaction in just a few seconds.
Historicaly, when submitting a blockchain transaction you had to hope it resulted in the outcomes you want. By using Plug that is no longer the case. Now, you can define a set of rules that may include one or many conditions you require to be met for your transaction to be executed. If the conditions haven't been met it simply cannot be executed. This means that suddenly the blockchain opens up to a new world of scheduled and automated interaction that is just as safe and secure as the traditional experience.
Notably, this functionality is powered simply by signing a message that a relay will execute some time in the future. To declare a new intent with Plug you do not have to pay anything. Yet, you still have full control to declare the gas costs you are willing to pay when your transaction conditions have been met and it's executed. You do not need to run a bot or do anything special for this to work, Plug handles everything for you right out of the box.
Plug is powered by a few very simple but powerful concepts:
primitives
├─ fuses - "Conditions you require to bet met before a transaction can execute."
├─ plugs - "A bundle of Fuses accompanied by a transaction declaration."
└─ types - "The consumer of Plugs that routes and validates the state of your declaration."
With just these key pieces you gain access to the conditional, scheduled and generally automated capabilites that have been out of reach for users since the beginning of blockchain development efforts.
Neither the README
of this repository or the submodules are intended for user-focused documentation and instead are a resource for developers. If you would like deeper insight you can explore the official documentation gateway of Plug.
Plug is designed for end-users first, but you as a developer also have the capability to build onchain connectors and application integrations yourself. The key functionality is powered by the following packages (each have their own function):
packages
├─ app - "Browser based node-editor application to interact with the Plug protocol."
├─ core - "Plug framework smart contracts and management utilities."
├─ docs - "In-depth documentation for both end-users and developers."
├─ server - "API backend that powers the server, client interface and sdk when needed."
└─ types - "Automatically generate the types and decoders of your intent framework."
All @nftchance/plug-*
packages have been built with one thing in mind:
using your brain as little as possible.
What this means is that every step of the way, I simply designed around my assumptions as if I was someone with no experience. Due to this, the commands to build
, dev
, lint
, etc. are the same across every package. Of course, some commands are missing from certain packages where they are not relevant. The base set will include:
├─ build - "Compile all the artifacts for production distribution."
├─ dev - "Run the development version of the stack needed to drive the active package."
└─ generate - "Create, update, and manage the static files generated by Plug."
The basic rule is that to build the package you will cd
into it and run pnpm dev
to get up and running. For information beyond that please reference the local package.json
.