@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.
- package/README.md +7 -7
- package/abi/BaseStateMachine.abi.json +798 -753
- package/abi/EngineBlox.abi.json +566 -576
- package/abi/GuardController.abi.json +1546 -2095
- package/abi/GuardControllerDefinitions.abi.json +416 -0
- package/abi/IDefinition.abi.json +57 -47
- package/abi/RuntimeRBAC.abi.json +901 -959
- package/abi/RuntimeRBACDefinitions.abi.json +265 -81
- package/abi/SecureOwnable.abi.json +1522 -2581
- package/abi/SecureOwnableDefinitions.abi.json +174 -164
- package/components/README.md +8 -0
- package/core/access/RuntimeRBAC.sol +253 -270
- package/core/access/interface/IRuntimeRBAC.sol +55 -84
- package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +97 -4
- package/core/base/BaseStateMachine.sol +198 -108
- package/core/base/interface/IBaseStateMachine.sol +153 -153
- package/core/execution/GuardController.sol +156 -131
- package/core/execution/interface/IGuardController.sol +146 -120
- package/core/execution/lib/definitions/GuardControllerDefinitions.sol +207 -45
- package/core/lib/EngineBlox.sol +2636 -2322
- package/{interfaces → core/lib/interfaces}/IDefinition.sol +49 -49
- package/{interfaces → core/lib/interfaces}/IEventForwarder.sol +5 -3
- package/{utils → core/lib/utils}/SharedValidation.sol +69 -22
- package/core/pattern/Account.sol +84 -0
- package/core/security/SecureOwnable.sol +180 -146
- package/core/security/interface/ISecureOwnable.sol +105 -104
- package/core/security/lib/definitions/SecureOwnableDefinitions.sol +818 -786
- package/package.json +5 -5
- package/standards/README.md +12 -0
- package/standards/behavior/ICopyable.sol +34 -0
- package/standards/hooks/IOnActionHook.sol +21 -0
- package/abi/AccountBlox.abi.json +0 -5799
- package/abi/BareBlox.abi.json +0 -1284
- package/abi/RoleBlox.abi.json +0 -4209
- package/abi/SecureBlox.abi.json +0 -3828
- package/abi/SimpleRWA20.abi.json +0 -5288
- package/abi/SimpleRWA20Definitions.abi.json +0 -191
- package/abi/SimpleVault.abi.json +0 -4951
- package/abi/SimpleVaultDefinitions.abi.json +0 -269
- package/core/research/BloxchainWallet.sol +0 -306
- package/core/research/erc20-blox/ERC20Blox.sol +0 -140
- package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +0 -185
- package/interfaces/IOnActionHook.sol +0 -79
|
@@ -1,104 +1,105 @@
|
|
|
1
|
-
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
-
pragma solidity 0.8.
|
|
3
|
-
|
|
4
|
-
// Contracts imports
|
|
5
|
-
import "../../lib/EngineBlox.sol";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @title ISecureOwnable
|
|
9
|
-
* @dev Interface for SecureOwnable functionality
|
|
10
|
-
* @notice This interface defines SecureOwnable-specific operations
|
|
11
|
-
* @notice Note: owner(), getBroadcasters(), and getRecovery() are available through BaseStateMachine
|
|
12
|
-
*/
|
|
13
|
-
interface ISecureOwnable {
|
|
14
|
-
// ============ OWNERSHIP MANAGEMENT ============
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @dev Requests a transfer of ownership
|
|
18
|
-
* @return The transaction record
|
|
19
|
-
*/
|
|
20
|
-
function transferOwnershipRequest() external returns (
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* @dev Approves a pending ownership transfer transaction after the release time
|
|
24
|
-
* @param txId The transaction ID
|
|
25
|
-
* @return The
|
|
26
|
-
*/
|
|
27
|
-
function transferOwnershipDelayedApproval(uint256 txId) external returns (
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* @dev Approves a pending ownership transfer transaction using a meta-transaction
|
|
31
|
-
* @param metaTx The meta-transaction
|
|
32
|
-
* @return The
|
|
33
|
-
*/
|
|
34
|
-
function transferOwnershipApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @dev Cancels a pending ownership transfer transaction
|
|
38
|
-
* @param txId The transaction ID
|
|
39
|
-
* @return The
|
|
40
|
-
*/
|
|
41
|
-
function transferOwnershipCancellation(uint256 txId) external returns (
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* @dev Cancels a pending ownership transfer transaction using a meta-transaction
|
|
45
|
-
* @param metaTx The meta-transaction
|
|
46
|
-
* @return The
|
|
47
|
-
*/
|
|
48
|
-
function transferOwnershipCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
49
|
-
|
|
50
|
-
// ============ BROADCASTER MANAGEMENT ============
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* @dev
|
|
54
|
-
* @param newBroadcaster
|
|
55
|
-
* @
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* @
|
|
62
|
-
* @
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
* @
|
|
69
|
-
* @
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* @
|
|
76
|
-
* @
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
* @
|
|
83
|
-
* @
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
* @
|
|
92
|
-
* @
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
* @
|
|
101
|
-
* @
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
1
|
+
// SPDX-License-Identifier: MPL-2.0
|
|
2
|
+
pragma solidity 0.8.35;
|
|
3
|
+
|
|
4
|
+
// Contracts imports
|
|
5
|
+
import "../../lib/EngineBlox.sol";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @title ISecureOwnable
|
|
9
|
+
* @dev Interface for SecureOwnable functionality
|
|
10
|
+
* @notice This interface defines SecureOwnable-specific operations
|
|
11
|
+
* @notice Note: owner(), getBroadcasters(), and getRecovery() are available through BaseStateMachine
|
|
12
|
+
*/
|
|
13
|
+
interface ISecureOwnable {
|
|
14
|
+
// ============ OWNERSHIP MANAGEMENT ============
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @dev Requests a transfer of ownership
|
|
18
|
+
* @return txId The transaction ID (use getTransaction(txId) for full record)
|
|
19
|
+
*/
|
|
20
|
+
function transferOwnershipRequest() external returns (uint256 txId);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @dev Approves a pending ownership transfer transaction after the release time
|
|
24
|
+
* @param txId The transaction ID
|
|
25
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
26
|
+
*/
|
|
27
|
+
function transferOwnershipDelayedApproval(uint256 txId) external returns (uint256);
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* @dev Approves a pending ownership transfer transaction using a meta-transaction
|
|
31
|
+
* @param metaTx The meta-transaction
|
|
32
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
33
|
+
*/
|
|
34
|
+
function transferOwnershipApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @dev Cancels a pending ownership transfer transaction
|
|
38
|
+
* @param txId The transaction ID
|
|
39
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
40
|
+
*/
|
|
41
|
+
function transferOwnershipCancellation(uint256 txId) external returns (uint256);
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @dev Cancels a pending ownership transfer transaction using a meta-transaction
|
|
45
|
+
* @param metaTx The meta-transaction
|
|
46
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
47
|
+
*/
|
|
48
|
+
function transferOwnershipCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
49
|
+
|
|
50
|
+
// ============ BROADCASTER MANAGEMENT ============
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @dev Requests a broadcaster role change identified by addresses.
|
|
54
|
+
* @param newBroadcaster New broadcaster (zero address to revoke `currentBroadcaster`)
|
|
55
|
+
* @param currentBroadcaster Existing broadcaster to replace or revoke; zero address to add `newBroadcaster`
|
|
56
|
+
* @return txId The transaction ID (use getTransaction(txId) for full record)
|
|
57
|
+
*/
|
|
58
|
+
function updateBroadcasterRequest(address newBroadcaster, address currentBroadcaster) external returns (uint256 txId);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @dev Approves a pending broadcaster update transaction after the release time
|
|
62
|
+
* @param txId The transaction ID
|
|
63
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
64
|
+
*/
|
|
65
|
+
function updateBroadcasterDelayedApproval(uint256 txId) external returns (uint256);
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @dev Approves a pending broadcaster update transaction using a meta-transaction
|
|
69
|
+
* @param metaTx The meta-transaction
|
|
70
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
71
|
+
*/
|
|
72
|
+
function updateBroadcasterApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @dev Cancels a pending broadcaster update transaction
|
|
76
|
+
* @param txId The transaction ID
|
|
77
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
78
|
+
*/
|
|
79
|
+
function updateBroadcasterCancellation(uint256 txId) external returns (uint256);
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* @dev Cancels a pending broadcaster update transaction using a meta-transaction
|
|
83
|
+
* @param metaTx The meta-transaction
|
|
84
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
85
|
+
*/
|
|
86
|
+
function updateBroadcasterCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
87
|
+
|
|
88
|
+
// ============ RECOVERY MANAGEMENT ============
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @dev Requests and approves a recovery address update using a meta-transaction
|
|
92
|
+
* @param metaTx The meta-transaction
|
|
93
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
94
|
+
*/
|
|
95
|
+
function updateRecoveryRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
96
|
+
|
|
97
|
+
// ============ TIMELOCK MANAGEMENT ============
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @dev Requests and approves a time lock period update using a meta-transaction
|
|
101
|
+
* @param metaTx The meta-transaction
|
|
102
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
103
|
+
*/
|
|
104
|
+
function updateTimeLockRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
105
|
+
}
|