@bloxchain/contracts 1.0.0-alpha.1 → 1.0.0-alpha.11

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 (50) hide show
  1. package/README.md +5 -5
  2. package/abi/{ControlBlox.abi.json → AccountBlox.abi.json} +488 -2474
  3. package/abi/BareBlox.abi.json +94 -0
  4. package/abi/BaseStateMachine.abi.json +94 -0
  5. package/abi/EngineBlox.abi.json +11 -31
  6. package/abi/GuardController.abi.json +178 -757
  7. package/abi/GuardControllerDefinitions.abi.json +380 -0
  8. package/abi/RoleBlox.abi.json +340 -1668
  9. package/abi/RuntimeRBAC.abi.json +98 -186
  10. package/abi/RuntimeRBACDefinitions.abi.json +224 -0
  11. package/abi/SecureBlox.abi.json +454 -1600
  12. package/abi/SecureOwnable.abi.json +492 -1638
  13. package/abi/SecureOwnableDefinitions.abi.json +38 -0
  14. package/abi/SimpleRWA20.abi.json +486 -1813
  15. package/abi/SimpleVault.abi.json +713 -2328
  16. package/components/README.md +8 -0
  17. package/core/access/RuntimeRBAC.sol +52 -146
  18. package/core/access/interface/IRuntimeRBAC.sol +55 -96
  19. package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +112 -1
  20. package/core/base/BaseStateMachine.sol +149 -29
  21. package/core/base/interface/IBaseStateMachine.sol +7 -0
  22. package/core/execution/GuardController.sol +87 -122
  23. package/core/execution/interface/IGuardController.sol +52 -12
  24. package/core/execution/lib/definitions/GuardControllerDefinitions.sol +82 -2
  25. package/core/lib/EngineBlox.sol +167 -64
  26. package/{interfaces → core/lib/interfaces}/IDefinition.sol +1 -1
  27. package/{interfaces → core/lib/interfaces}/IEventForwarder.sol +1 -1
  28. package/{utils → core/lib/utils}/SharedValidation.sol +490 -486
  29. package/core/pattern/Account.sol +75 -0
  30. package/core/research/BloxchainWallet.sol +69 -242
  31. package/core/research/FactoryBlox/FactoryBlox.sol +344 -0
  32. package/core/research/FactoryBlox/FactoryBloxDefinitions.sol +144 -0
  33. package/core/research/erc1155-blox/ERC1155Blox.sol +170 -0
  34. package/core/research/erc1155-blox/lib/definitions/ERC1155BloxDefinitions.sol +203 -0
  35. package/core/research/erc20-blox/ERC20Blox.sol +47 -52
  36. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +185 -185
  37. package/core/research/erc721-blox/ERC721Blox.sol +131 -0
  38. package/core/research/erc721-blox/lib/definitions/ERC721BloxDefinitions.sol +172 -0
  39. package/core/research/lending-blox/.gitkeep +1 -0
  40. package/core/research/p2p-blox/P2PBlox.sol +266 -0
  41. package/core/research/p2p-blox/README.md +85 -0
  42. package/core/research/p2p-blox/lib/definitions/P2PBloxDefinitions.sol +19 -0
  43. package/core/security/SecureOwnable.sol +111 -130
  44. package/core/security/interface/ISecureOwnable.sol +27 -40
  45. package/core/security/lib/definitions/SecureOwnableDefinitions.sol +786 -766
  46. package/package.json +49 -49
  47. package/standards/README.md +12 -0
  48. package/standards/behavior/ICopyable.sol +36 -0
  49. package/standards/hooks/IOnActionHook.sol +21 -0
  50. package/interfaces/IOnActionHook.sol +0 -79
package/README.md CHANGED
@@ -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, ControlBlox) 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. 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.
54
54
 
55
55
  ## Dependencies
56
56