https://github.com/carlosalegreur/inputcontrol-smartcontract-testing
In this repo you will find the tests and a simple implementation of my other repo => InputControl-SmartContract-DesignPattern
https://github.com/carlosalegreur/inputcontrol-smartcontract-testing
Last synced: 4 months ago
JSON representation
In this repo you will find the tests and a simple implementation of my other repo => InputControl-SmartContract-DesignPattern
- Host: GitHub
- URL: https://github.com/carlosalegreur/inputcontrol-smartcontract-testing
- Owner: CarlosAlegreUr
- License: mit
- Created: 2023-01-15T14:52:16.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-17T09:42:13.000Z (almost 2 years ago)
- Last Synced: 2024-12-31T09:19:07.250Z (5 months ago)
- Language: Solidity
- Homepage:
- Size: 217 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [**Input Control Contract**](https://github.com/CarlosAlegreUr/InputControl-SmartContract-DesignPattern)
---
## Tests for the **different InputControl implementations**.
- π Check the contracts' code [here](https://github.com/CarlosAlegreUr/InputControl-SmartContract-DesignPattern)
- π¦ Check the npm repo [here](https://www.npmjs.com/package/input-control-contract)> π **Note**: If you further elaborate, develop, or test, kindly consider [mentioning me](https://github.com/CarlosAlegreUr) in your work or opening PRs to this repo.
## Types of **InputControls implementations** πͺ
Types Legend βΉοΈ
### Input Control (IC)
#### Owned:
- Inheritance (ICI)
- Composite (ICC)#### Public:
- Public (ICP)
---
## **Input Control Current Tests' State** π‘
> **`Legend`**:
>
> π’ => High coverage, but there's always room for improvement!
>
> π΅ => Needs revision, but has high or near high coverage.
>
> π‘ => Currently being updated.
>
> π΄ => Yet to be started.---
| InputControl Implementation | Unit Testing | Fuzz Testing | Invariant Testing | Testnet testing | Audited |
| :-------------------------: | :----------: | :----------: | :---------------: | :-------------: | :-----: |
| ICI | π΅ | π΄ | π΄ | π΄ | π΄ |
| ICC | π΅ | π΅ | π΄ | π΄ | π΄ |
| ICP | π’ | π’ | π‘ | π΄ | π΄ |---
## Last Changes π°
- π All code has been **refactored**: Admin based (centralized) or non-admin based (decentralized public infrastructure) versions.
- β New updated **foundry tests** created.---
## **FUTURE IMPROVEMENTS** π
- Write tests for hash with `bytes32(0)` value. Whether for inputs or permission ids.
- **Test in testnet**.
- Protect against **DoS attacks** by abusing the contract's storage in the public version.
- **Self-audit** with automated tools.
- **Third-party Audit/s**.
- Old hardhat tests might be updated to the refactored code.
- Add new **feature**. Now, if granted new input permissions, old ones get overwritten. Design it so users can modify existing ones without overwriting.---
## Contact π¨
Carlos Alegre UrquizΓΊ - [[email protected]](mailto:[email protected])
---
## **Buy me a CryptoCoffee** β
Buy me a crypto coffee in ETH, MATIC, or BNB βπ§β (or any token if you fancy)
`0x2365bf29236757bcfD141Fdb5C9318183716d866`---
## **License** π
Distributed under the MIT License. See [LICENSE](https://github.com/CarlosAlegreUr/InputControl-SmartContract-DesignPattern/blob/main/LICENSE) in the repository for more details.