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

input-control-contract

v4.0.0

Published

InputControl allows you to specify the order and value of inputs that users can send to your functions. It can be used as global public infrastructure or in a private way

Downloads

14

Readme



InputControl Contract 📜


It allows you to specify the order and value of inputs that users can send to your functions. It can be used as global public infrastructure or in a private way.


💽 Testing repo with implementation examples

💽 NPM repo


Index 📌


🤖 General Usecase Explanation 🤖

InputControl lets you set the order in which, and the value of, the inputs users can send to your functions.

Example: Imagine you want a user to invoke a function thrice—first with an input value of 1, next with 2, and finally, 3. InputControl ensures these values are used in the specified sequence. Alternatively, with the unordered option, users can provide these inputs in any order they prefer.

In broader terms, it grants permissions to users for securely (with consent) calling any function affecting a state you own on the blockchain. It acts as a platform for agreements akin to third-party function calls or consensus-driven functions involving multiple participants.

By merging it with other contracts in development, such as CallOrderControl and InteractionControl, or even using it standalone, InputControl can be a primary component for public infrastructure. This strategy can speed up development for projects requiring the features of InputControl, as outlined in the "Problems Addressed 🙀" section.


Problems Addressed 🙀

InputControl addresses several challenges. While the list below mentions 2 of them, more use-cases await discovery. Further work is ongoing on CallOrderControl and InteractionControl, which could revolutionize the orchestration of complex contract interactions involving multiple parties. Still, the focus has primarily been on InputControl since I couldn't think of real use-cases for the other Control contracts. Explore them here:

  1. Decentralized Matchmaking: Imagine a decentralized gaming platform where players wager and compete. Guaranteeing both parties initiate the match and secure funds can be intricate. InputControl can manage the complexities of any game logic agreement.

  2. Decentralized NFT Upgrades: Envision an NFT collection requiring a token URI update. Exclusively allowing the updateURI() function to be callable by you might strain trust with your client. With InputControl, you can externalize the function, letting the client call it with a known, correct token URI—promoting transparency without sacrificing integrity. Imagine a NFT game implements upgrades but doesn't want the backend to handle them in a centralized way. It enables the user to do it without any user making their NFT overpowered by faking a superior upgrade. The InputControl contract would make that possible.


How to use

InputControl's versatility comes in different implementations tailored for particular use-cases:

  • InputControl by Inheritance (ICI): Best for single contracts.
  • InputControl by Composition (ICC): Perfect for private systems with multiple contracts, especially when a single contract's code results in a "too big to be deployed" error.
  • InputControl by Public (ICP): A global contract for public use. With intentions to launch across many EVM-compatible blockchains, it provides decentralized input control management for any interested contract.

How to use IC from your contracts 🧑‍🔧


Last Changes 📰

  • 🔄 All code has been refactored: Admin based (centralized) or non-admin based (decentralized public infrastructure) versions.

Contributing 💻

Open issues or PRs in the testing repo.

If further independent development occurs, a mention of me in your work would be much appreciated 😄


Contact 📨

Carlos Alegre Urquizú - [email protected]


Buy me a CryptoCoffee

Support me with ETH, MATIC, BNB, or any token of your choice ☕🧐☕

0x2365bf29236757bcfD141Fdb5C9318183716d866


License 📜

Distributed under the MIT License. View LICENSE in the repository for further details.