@cruna/protocol
Advanced tools
Comparing version 1.0.0-beta.0 to 1.0.0-beta.2
{ | ||
"name": "@cruna/protocol", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.2", | ||
"description": "The Cruna protocol", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -89,2 +89,12 @@ # Cruna Protocol: The Future of Secure Digital Asset Management | ||
## Smart Contract Upgradeability | ||
While smart contract upgradeability is beneficial, it poses security risks, such as the potential for deploying malicious updates. To prevent this, all contracts, including the Manager and any associated plugins, are immutable, safeguarding against unauthorized alterations. | ||
Despite this, user-driven upgrades are essential. To achieve this, Cruna Protocol utilizes the approach outlined in ERC-6551. This involves deploying a new proxy contract for each token ID, connected to the protocol's Manager. This Manager, controlled by the NFT, empowers the token ID holder with ownership rights. | ||
Crucially, the Manager can integrate plugins—additional smart contracts—that are also upgradeable exclusively by the NFT owner. This ensures that when a new trusted version of the Manager or a plugin is released, the NFT owner can independently upgrade, accessing new features and security enhancements. | ||
Thus, the Cruna Protocol guarantees that no unilateral contract upgrades occur. Only the NFT owner has the authority to initiate updates for the Manager and its plugins, balancing robust security with user autonomy and flexibility. | ||
## What's Next for Cruna Vault? | ||
@@ -118,6 +128,6 @@ | ||
Cruna is in alpha stage, and to use it you must specify the version you want to install. Right now, the only available version is `1.0.0-alpha.3`. Install it with | ||
Cruna is in beta stage, and to use it you must specify the version you want to install. Install it with | ||
```sh | ||
npm install @cruna/protocol@1.0.0-alpha.3 @openzeppelin/contracts erc6551 | ||
npm install @cruna/protocol@1.0.0-beta.0 @openzeppelin/contracts erc6551 | ||
``` | ||
@@ -127,5 +137,5 @@ or similar commands using Yarn or Pnpm, and use in your Solidity smart contracts, for example, as | ||
``` | ||
import {ManagedNFT} from "@cruna/protocol/contracts/protected/ManagedNFT.sol"; | ||
import {ManagedERC721} from "@cruna/protocol/contracts/manager/ManagedERC721.sol"; | ||
contract MySuperToken is ManagedNFT { | ||
contract MySuperToken is ManagedERC721 { | ||
@@ -137,3 +147,3 @@ constructor( | ||
address managerProxy_ | ||
) ManagedNFT("My Super Token", "MST", registry_, guardian_, signatureValidator_, managerProxy_) {} | ||
) ManagedERC721("My Super Token", "MST", registry_, guardian_, signatureValidator_, managerProxy_) {} | ||
} | ||
@@ -146,2 +156,10 @@ ``` | ||
**1.0.0-beta.2** | ||
- Fix typo in CrunaRegistry function name | ||
- Reorganize folders and files | ||
- Add function to check if plugins needs to be reset on vault transfer | ||
**1.0.0-beta.1** | ||
- Improve the function `authorizePluginToTransfer` so that it disallows only temporarily a plugin to transfer the NFT | ||
**1.0.0-beta.0** | ||
@@ -193,3 +211,3 @@ - Add views to manager to be able to see which plugins are active, disabled, etc. | ||
``` | ||
38 passing | ||
40 passing | ||
@@ -199,31 +217,36 @@ -----------------------------|----------|----------|----------|----------|----------------| | ||
-----------------------------|----------|----------|----------|----------|----------------| | ||
factory/ | 100 | 55.36 | 100 | 95.83 | | | ||
factory/ | 100 | 55.36 | 100 | 95.92 | | | ||
IVaultFactory.sol | 100 | 100 | 100 | 100 | | | ||
VaultFactory.sol | 100 | 55.36 | 100 | 95.83 | 75,127 | | ||
VaultFactory.sol | 100 | 55.36 | 100 | 95.92 | 79,131 | | ||
interfaces/ | 100 | 100 | 100 | 100 | | | ||
IBoundContract.sol | 100 | 100 | 100 | 100 | | | ||
IERC6454.sol | 100 | 100 | 100 | 100 | | | ||
IERC6982.sol | 100 | 100 | 100 | 100 | | | ||
IManagedERC721.sol | 100 | 100 | 100 | 100 | | | ||
manager/ | 92.42 | 61.54 | 95.71 | 91.59 | | | ||
manager/ | 98.1 | 73.85 | 100 | 98.88 | | | ||
Actor.sol | 100 | 70 | 100 | 100 | | | ||
Guardian.sol | 100 | 50 | 100 | 70 | 22,33,38 | | ||
IManager.sol | 100 | 100 | 100 | 100 | | | ||
ManagedERC721.sol | 100 | 58 | 100 | 95.65 | 170,182 | | ||
Manager.sol | 87.39 | 60 | 90 | 88.43 |... 300,301,302 | | ||
ManagerBase.sol | 96 | 85.71 | 100 | 100 | | | ||
IManagerBase.sol | 100 | 100 | 100 | 100 | | | ||
Manager.sol | 98.25 | 72.64 | 100 | 98.44 | 131,323 | | ||
ManagerBase.sol | 96.15 | 85.71 | 100 | 100 | | | ||
ManagerProxy.sol | 100 | 100 | 100 | 100 | | | ||
plugins/ | 100 | 100 | 100 | 100 | | | ||
IPlugin.sol | 100 | 100 | 100 | 100 | | | ||
plugins/inheritance/ | 100 | 72.37 | 100 | 97.7 | | | ||
plugins/inheritance/ | 100 | 72.37 | 100 | 97.73 | | | ||
IInheritancePlugin.sol | 100 | 100 | 100 | 100 | | | ||
InheritancePlugin.sol | 100 | 72.37 | 100 | 97.67 | 84,180 | | ||
InheritancePlugin.sol | 100 | 72.37 | 100 | 97.7 | 92,187 | | ||
InheritancePluginProxy.sol | 100 | 100 | 100 | 100 | | | ||
utils/ | 100 | 75 | 100 | 100 | | | ||
token/ | 97.44 | 58 | 93.75 | 93.62 | | | ||
IManagedERC721.sol | 100 | 100 | 100 | 100 | | | ||
ManagedERC721.sol | 97.44 | 58 | 93.75 | 93.62 | 60,175,187 | | ||
utils/ | 91.67 | 58.33 | 90.91 | 77.78 | | | ||
CrunaRegistry.sol | 100 | 100 | 100 | 100 | | | ||
FlexiProxy.sol | 100 | 100 | 100 | 100 | | | ||
Guardian.sol | 85.71 | 50 | 75 | 63.64 | 22,28,37,42 | | ||
IBoundContract.sol | 100 | 100 | 100 | 100 | | | ||
ICrunaRegistry.sol | 100 | 100 | 100 | 100 | | | ||
IFlexiProxy.sol | 100 | 100 | 100 | 100 | | | ||
IGuardian.sol | 100 | 100 | 100 | 100 | | | ||
IVersioned.sol | 100 | 100 | 100 | 100 | | | ||
SignatureValidator.sol | 100 | 75 | 100 | 100 | | | ||
Versioned.sol | 100 | 100 | 100 | 100 | | | ||
-----------------------------|----------|----------|----------|----------|----------------| | ||
All files | 95.1 | 63.21 | 97.32 | 93.77 | | | ||
All files | 98.4 | 67.28 | 98.29 | 96.58 | | | ||
-----------------------------|----------|----------|----------|----------|----------------| | ||
@@ -230,0 +253,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
93190
27
265