@bloxchain/contracts 1.0.0-alpha.6 → 1.0.0

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 (54) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +8 -9
  3. package/abi/BaseStateMachine.abi.json +773 -822
  4. package/abi/EngineBlox.abi.json +562 -552
  5. package/abi/GuardController.abi.json +1597 -1609
  6. package/abi/GuardControllerDefinitions.abi.json +257 -120
  7. package/abi/IDefinition.abi.json +57 -47
  8. package/abi/RuntimeRBAC.abi.json +841 -842
  9. package/abi/RuntimeRBACDefinitions.abi.json +265 -99
  10. package/abi/SecureOwnable.abi.json +1365 -1349
  11. package/abi/SecureOwnableDefinitions.abi.json +174 -164
  12. package/components/README.md +8 -0
  13. package/core/AUDIT.md +45 -0
  14. package/core/access/RuntimeRBAC.sol +130 -61
  15. package/core/access/interface/IRuntimeRBAC.sol +3 -3
  16. package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +67 -3
  17. package/core/base/BaseStateMachine.sol +971 -967
  18. package/core/base/interface/IBaseStateMachine.sol +153 -160
  19. package/core/execution/GuardController.sol +89 -75
  20. package/core/execution/interface/IGuardController.sol +146 -160
  21. package/core/execution/lib/definitions/GuardControllerDefinitions.sol +180 -24
  22. package/core/lib/EngineBlox.sol +577 -327
  23. package/core/lib/interfaces/IDefinition.sol +49 -49
  24. package/core/lib/interfaces/IEventForwarder.sol +4 -2
  25. package/core/lib/utils/SharedValidation.sol +534 -487
  26. package/core/pattern/Account.sol +84 -65
  27. package/core/security/SecureOwnable.sol +446 -390
  28. package/core/security/interface/ISecureOwnable.sol +105 -105
  29. package/core/security/lib/definitions/SecureOwnableDefinitions.sol +49 -17
  30. package/package.json +11 -7
  31. package/standards/README.md +12 -0
  32. package/{core/research → standards/behavior}/ICopyable.sol +3 -11
  33. package/standards/hooks/IOnActionHook.sol +21 -0
  34. package/abi/AccountBlox.abi.json +0 -3916
  35. package/abi/BareBlox.abi.json +0 -1378
  36. package/abi/RoleBlox.abi.json +0 -2983
  37. package/abi/SecureBlox.abi.json +0 -2753
  38. package/abi/SimpleRWA20.abi.json +0 -4032
  39. package/abi/SimpleRWA20Definitions.abi.json +0 -191
  40. package/abi/SimpleVault.abi.json +0 -3407
  41. package/abi/SimpleVaultDefinitions.abi.json +0 -269
  42. package/core/research/BloxchainWallet.sol +0 -292
  43. package/core/research/FactoryBlox/FactoryBlox.sol +0 -346
  44. package/core/research/FactoryBlox/FactoryBloxDefinitions.sol +0 -143
  45. package/core/research/erc1155-blox/ERC1155Blox.sol +0 -169
  46. package/core/research/erc1155-blox/lib/definitions/ERC1155BloxDefinitions.sol +0 -203
  47. package/core/research/erc20-blox/ERC20Blox.sol +0 -167
  48. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +0 -185
  49. package/core/research/erc721-blox/ERC721Blox.sol +0 -131
  50. package/core/research/erc721-blox/lib/definitions/ERC721BloxDefinitions.sol +0 -172
  51. package/core/research/lending-blox/.gitkeep +0 -1
  52. package/core/research/p2p-blox/P2PBlox.sol +0 -266
  53. package/core/research/p2p-blox/README.md +0 -85
  54. package/core/research/p2p-blox/lib/definitions/P2PBloxDefinitions.sol +0 -19
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # Changelog — @bloxchain/contracts
2
+
3
+ All notable changes to this package are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] - 2026-06-03
11
+
12
+ ### Added
13
+
14
+ - First **stable** documented release on npm (`latest`).
15
+ - Publishable Solidity artifacts: `core`, `abi`, `standards`, `components`.
16
+
17
+ ### Note
18
+
19
+ Prior `1.0.0-alpha.N` publishes were experimental and are not listed in this changelog.
package/README.md CHANGED
@@ -2,17 +2,16 @@
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
 
9
- > **⚠️ EXPERIMENTAL SOFTWARE WARNING**
10
- > This package contains experimental smart contract code. While the framework is feature-complete and tested, it is not yet audited for production use. Use at your own risk and do not deploy with real assets without proper security review.
9
+ The core protocol (`contracts/core/`) has been independently audited by **Nethermind**. Report and scope: [audits/nethermind](https://github.com/PracticalParticle/Bloxchain-Protocol/tree/main/audits/nethermind) on GitHub. Pre-mainnet today; mainnet deployment coming soon. Review release notes and pin an exact version before production use.
11
10
 
12
11
  ## Requirements
13
12
 
14
13
  - **Node.js**: >= 18.0.0 (for tooling; Solidity has no runtime dependency)
15
- - **Solidity**: 0.8.x (0.8.33 recommended)
14
+ - **Solidity**: 0.8.x (0.8.34 recommended)
16
15
  - **Compilers**: Foundry, Hardhat, or Truffle
17
16
 
18
17
  ## Installation
@@ -50,25 +49,25 @@ import "@bloxchain/contracts/core/lib/interfaces/IDefinition.sol";
50
49
 
51
50
  ### Templates and examples
52
51
 
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.
52
+ 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
53
 
55
54
  ## Dependencies
56
55
 
57
56
  This package declares:
58
57
 
59
- - `@openzeppelin/contracts`: ^5.4.0
60
- - `@openzeppelin/contracts-upgradeable`: ^5.4.0
58
+ - `@openzeppelin/contracts`: 5.6.1
59
+ - `@openzeppelin/contracts-upgradeable`: 5.6.1
61
60
 
62
61
  Install them in your project if your tooling does not resolve transitive dependencies.
63
62
 
64
63
  ## Versioning and stability
65
64
 
66
- This package follows [Semantic Versioning](https://semver.org/). Current versions are **alpha** (`1.0.0-alpha.x`). Pre-1.0 releases may introduce breaking changes; we recommend pinning the exact version until the protocol is audited and stable.
65
+ This package follows [Semantic Versioning](https://semver.org/). Stable releases publish to npm **`latest`**; see [CHANGELOG.md](./CHANGELOG.md). Pin the exact version in production and review release notes before upgrading.
67
66
 
68
67
  ## Security
69
68
 
70
69
  - **Vulnerability reporting**: Do not open public GitHub issues for security vulnerabilities. See the [Security Policy](https://github.com/PracticalParticle/Bloxchain-Protocol/blob/main/SECURITY.md) for reporting instructions (e.g. security@particlecs.com).
71
- - **Audit status**: Not yet audited. Do not use with mainnet assets without an independent security review.
70
+ - **Audit status**: Core protocol (`contracts/core/`) audited by [Nethermind](https://github.com/PracticalParticle/Bloxchain-Protocol/tree/main/audits/nethermind) ([PDF](https://github.com/PracticalParticle/Bloxchain-Protocol/blob/main/audits/nethermind/Nethermind-Bloxchain-Core-NM_0828.pdf)). This npm package does not include the PDF; verify the audited commit in the engagement README. Follow your own deployment, upgrade, and operational review before production use.
72
71
 
73
72
  ## Support and links
74
73