4.0.0 β€’ Published 9 months ago

input-control-contract v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago


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ΓΊ - calegreu@gmail.com


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.

3.1.1

11 months ago

3.1.0

11 months ago

3.0.0

11 months ago

4.0.0

9 months ago

2.0.0

11 months ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago