@bloxchain/contracts 1.0.0-alpha.2 → 1.0.0-alpha.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +7 -7
  2. package/abi/BaseStateMachine.abi.json +798 -753
  3. package/abi/EngineBlox.abi.json +566 -576
  4. package/abi/GuardController.abi.json +1546 -2095
  5. package/abi/GuardControllerDefinitions.abi.json +416 -0
  6. package/abi/IDefinition.abi.json +57 -47
  7. package/abi/RuntimeRBAC.abi.json +901 -959
  8. package/abi/RuntimeRBACDefinitions.abi.json +265 -81
  9. package/abi/SecureOwnable.abi.json +1522 -2581
  10. package/abi/SecureOwnableDefinitions.abi.json +174 -164
  11. package/components/README.md +8 -0
  12. package/core/access/RuntimeRBAC.sol +253 -270
  13. package/core/access/interface/IRuntimeRBAC.sol +55 -84
  14. package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +97 -4
  15. package/core/base/BaseStateMachine.sol +198 -108
  16. package/core/base/interface/IBaseStateMachine.sol +153 -153
  17. package/core/execution/GuardController.sol +156 -131
  18. package/core/execution/interface/IGuardController.sol +146 -120
  19. package/core/execution/lib/definitions/GuardControllerDefinitions.sol +207 -45
  20. package/core/lib/EngineBlox.sol +2636 -2322
  21. package/{interfaces → core/lib/interfaces}/IDefinition.sol +49 -49
  22. package/{interfaces → core/lib/interfaces}/IEventForwarder.sol +5 -3
  23. package/{utils → core/lib/utils}/SharedValidation.sol +69 -22
  24. package/core/pattern/Account.sol +84 -0
  25. package/core/security/SecureOwnable.sol +180 -146
  26. package/core/security/interface/ISecureOwnable.sol +105 -104
  27. package/core/security/lib/definitions/SecureOwnableDefinitions.sol +818 -786
  28. package/package.json +5 -5
  29. package/standards/README.md +12 -0
  30. package/standards/behavior/ICopyable.sol +34 -0
  31. package/standards/hooks/IOnActionHook.sol +21 -0
  32. package/abi/AccountBlox.abi.json +0 -5799
  33. package/abi/BareBlox.abi.json +0 -1284
  34. package/abi/RoleBlox.abi.json +0 -4209
  35. package/abi/SecureBlox.abi.json +0 -3828
  36. package/abi/SimpleRWA20.abi.json +0 -5288
  37. package/abi/SimpleRWA20Definitions.abi.json +0 -191
  38. package/abi/SimpleVault.abi.json +0 -4951
  39. package/abi/SimpleVaultDefinitions.abi.json +0 -269
  40. package/core/research/BloxchainWallet.sol +0 -306
  41. package/core/research/erc20-blox/ERC20Blox.sol +0 -140
  42. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +0 -185
  43. package/interfaces/IOnActionHook.sol +0 -79
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/@bloxchain/contracts.svg)](https://www.npmjs.com/package/@bloxchain/contracts)
4
4
  [![License: MPL-2.0](https://img.shields.io/badge/License-MPL--2.0-blue.svg)](https://opensource.org/licenses/MPL-2.0)
5
- [![Solidity](https://img.shields.io/badge/Solidity-0.8.33-blue.svg)](https://soliditylang.org/)
5
+ [![Solidity](https://img.shields.io/badge/Solidity-0.8.34-blue.svg)](https://soliditylang.org/)
6
6
 
7
7
  Bloxchain Protocol smart contracts – state abstraction and core components for building on the Bloxchain Protocol.
8
8
 
@@ -12,7 +12,7 @@ Bloxchain Protocol smart contracts – state abstraction and core components for
12
12
  ## Requirements
13
13
 
14
14
  - **Node.js**: >= 18.0.0 (for tooling; Solidity has no runtime dependency)
15
- - **Solidity**: 0.8.x (0.8.33 recommended)
15
+ - **Solidity**: 0.8.x (0.8.34 recommended)
16
16
  - **Compilers**: Foundry, Hardhat, or Truffle
17
17
 
18
18
  ## Installation
@@ -23,18 +23,18 @@ npm install @bloxchain/contracts
23
23
 
24
24
  ## Usage
25
25
 
26
- Import contracts in your Solidity files. Paths are relative to the package root (`core/`, `utils/`, `interfaces/`):
26
+ Import contracts in your Solidity files. All contracts live under `@bloxchain/contracts/core/`:
27
27
 
28
28
  ```solidity
29
29
  import "@bloxchain/contracts/core/base/BaseStateMachine.sol";
30
30
  import "@bloxchain/contracts/core/security/SecureOwnable.sol";
31
31
  import "@bloxchain/contracts/core/access/RuntimeRBAC.sol";
32
32
  import "@bloxchain/contracts/core/execution/GuardController.sol";
33
- import "@bloxchain/contracts/utils/SharedValidation.sol";
34
- import "@bloxchain/contracts/interfaces/IDefinition.sol";
33
+ import "@bloxchain/contracts/core/lib/utils/SharedValidation.sol";
34
+ import "@bloxchain/contracts/core/lib/interfaces/IDefinition.sol";
35
35
  ```
36
36
 
37
- **Foundry**: No remapping needed; the package exposes `core/`, `utils/`, and `interfaces/` at root.
37
+ **Foundry**: No remapping needed; the package exposes `core/` at root (lib, base, access, execution, security live inside it).
38
38
  **Hardhat / Truffle**: Resolve `@bloxchain/contracts` from `node_modules` as usual.
39
39
 
40
40
  ## Contracts
@@ -50,7 +50,7 @@ import "@bloxchain/contracts/interfaces/IDefinition.sol";
50
50
 
51
51
  ### Templates and examples
52
52
 
53
- Templates (e.g. BareBlox, SecureBlox, AccountBlox) and example applications (SimpleVault, SimpleRWA20) live in the main repository under `contracts/examples/`. They are not included in this npm package. See the [main repo](https://github.com/PracticalParticle/Bloxchain-Protocol) for full documentation and examples.
53
+ Templates (e.g. AccountBlox, CopyBlox) and example applications (SimpleVault, SimpleRWA20) live in the main repository under `contracts/examples/`. They are not included in this npm package. See the [main repo](https://github.com/PracticalParticle/Bloxchain-Protocol) for full documentation and examples.
54
54
 
55
55
  ## Dependencies
56
56