@bloxchain/contracts 1.0.0-alpha → 1.0.0-alpha.10
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 +55 -18
- package/abi/{ControlBlox.abi.json → AccountBlox.abi.json} +699 -2974
- package/abi/BareBlox.abi.json +127 -90
- package/abi/BaseStateMachine.abi.json +127 -90
- package/abi/EngineBlox.abi.json +11 -31
- package/abi/GuardController.abi.json +217 -895
- package/abi/GuardControllerDefinitions.abi.json +380 -0
- package/abi/IDefinition.abi.json +19 -0
- package/abi/RoleBlox.abi.json +818 -2404
- package/abi/RuntimeRBAC.abi.json +122 -328
- package/abi/RuntimeRBACDefinitions.abi.json +243 -0
- package/abi/SecureBlox.abi.json +620 -1952
- package/abi/SecureOwnable.abi.json +469 -1801
- package/abi/SecureOwnableDefinitions.abi.json +57 -0
- package/abi/SimpleRWA20.abi.json +486 -1999
- package/abi/SimpleRWA20Definitions.abi.json +19 -0
- package/abi/SimpleVault.abi.json +884 -2685
- package/abi/SimpleVaultDefinitions.abi.json +19 -0
- package/components/README.md +8 -0
- package/core/access/RuntimeRBAC.sol +184 -0
- package/core/access/interface/IRuntimeRBAC.sol +55 -0
- package/{contracts/core → core}/access/lib/definitions/RuntimeRBACDefinitions.sol +121 -1
- package/{contracts/core → core}/base/BaseStateMachine.sol +187 -54
- package/{contracts/core → core}/base/interface/IBaseStateMachine.sol +7 -0
- package/{contracts/core → core}/execution/GuardController.sol +89 -155
- package/{contracts/core → core}/execution/interface/IGuardController.sol +52 -12
- package/{contracts/core → core}/execution/lib/definitions/GuardControllerDefinitions.sol +91 -2
- package/{contracts/core → core}/lib/EngineBlox.sol +167 -64
- package/{contracts → core/lib}/interfaces/IDefinition.sol +15 -6
- package/{contracts → core/lib}/interfaces/IEventForwarder.sol +1 -1
- package/{contracts → core/lib}/utils/SharedValidation.sol +490 -486
- package/core/pattern/Account.sol +75 -0
- package/core/research/BloxchainWallet.sol +133 -0
- package/core/research/FactoryBlox/FactoryBlox.sol +344 -0
- package/core/research/FactoryBlox/FactoryBloxDefinitions.sol +144 -0
- package/core/research/erc1155-blox/ERC1155Blox.sol +170 -0
- package/core/research/erc1155-blox/lib/definitions/ERC1155BloxDefinitions.sol +203 -0
- package/core/research/erc20-blox/ERC20Blox.sol +135 -0
- package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +185 -0
- package/core/research/erc721-blox/ERC721Blox.sol +131 -0
- package/core/research/erc721-blox/lib/definitions/ERC721BloxDefinitions.sol +172 -0
- package/core/research/lending-blox/.gitkeep +1 -0
- package/core/research/p2p-blox/P2PBlox.sol +266 -0
- package/core/research/p2p-blox/README.md +85 -0
- package/core/research/p2p-blox/lib/definitions/P2PBloxDefinitions.sol +19 -0
- package/{contracts/core → core}/security/SecureOwnable.sol +390 -419
- package/{contracts/core → core}/security/interface/ISecureOwnable.sol +27 -40
- package/{contracts/core → core}/security/lib/definitions/SecureOwnableDefinitions.sol +786 -757
- package/package.json +49 -47
- package/standards/README.md +12 -0
- package/standards/behavior/ICopyable.sol +36 -0
- package/standards/hooks/IOnActionHook.sol +21 -0
- package/contracts/core/access/RuntimeRBAC.sol +0 -344
- package/contracts/core/access/interface/IRuntimeRBAC.sol +0 -108
- package/contracts/interfaces/IOnActionHook.sol +0 -79
|
@@ -15,104 +15,91 @@ interface ISecureOwnable {
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* @dev Requests a transfer of ownership
|
|
18
|
-
* @return The transaction record
|
|
18
|
+
* @return txId The transaction ID (use getTransaction(txId) for full record)
|
|
19
19
|
*/
|
|
20
|
-
function transferOwnershipRequest() external returns (
|
|
20
|
+
function transferOwnershipRequest() external returns (uint256 txId);
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* @dev Approves a pending ownership transfer transaction after the release time
|
|
24
24
|
* @param txId The transaction ID
|
|
25
|
-
* @return The
|
|
25
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
26
26
|
*/
|
|
27
|
-
function transferOwnershipDelayedApproval(uint256 txId) external returns (
|
|
27
|
+
function transferOwnershipDelayedApproval(uint256 txId) external returns (uint256);
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* @dev Approves a pending ownership transfer transaction using a meta-transaction
|
|
31
31
|
* @param metaTx The meta-transaction
|
|
32
|
-
* @return The
|
|
32
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
33
33
|
*/
|
|
34
|
-
function transferOwnershipApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
34
|
+
function transferOwnershipApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* @dev Cancels a pending ownership transfer transaction
|
|
38
38
|
* @param txId The transaction ID
|
|
39
|
-
* @return The
|
|
39
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
40
40
|
*/
|
|
41
|
-
function transferOwnershipCancellation(uint256 txId) external returns (
|
|
41
|
+
function transferOwnershipCancellation(uint256 txId) external returns (uint256);
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* @dev Cancels a pending ownership transfer transaction using a meta-transaction
|
|
45
45
|
* @param metaTx The meta-transaction
|
|
46
|
-
* @return The
|
|
46
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
47
47
|
*/
|
|
48
|
-
function transferOwnershipCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
48
|
+
function transferOwnershipCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
49
49
|
|
|
50
50
|
// ============ BROADCASTER MANAGEMENT ============
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
* @dev
|
|
54
|
-
* @param newBroadcaster The new broadcaster address
|
|
55
|
-
* @
|
|
53
|
+
* @dev Requests an update to the broadcaster at a specific location (index).
|
|
54
|
+
* @param newBroadcaster The new broadcaster address (zero address to revoke at location)
|
|
55
|
+
* @param location The index in the broadcaster role's authorized wallets set
|
|
56
|
+
* @return txId The transaction ID (use getTransaction(txId) for full record)
|
|
56
57
|
*/
|
|
57
|
-
function updateBroadcasterRequest(address newBroadcaster) external returns (
|
|
58
|
+
function updateBroadcasterRequest(address newBroadcaster, uint256 location) external returns (uint256 txId);
|
|
58
59
|
|
|
59
60
|
/**
|
|
60
61
|
* @dev Approves a pending broadcaster update transaction after the release time
|
|
61
62
|
* @param txId The transaction ID
|
|
62
|
-
* @return The
|
|
63
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
63
64
|
*/
|
|
64
|
-
function updateBroadcasterDelayedApproval(uint256 txId) external returns (
|
|
65
|
+
function updateBroadcasterDelayedApproval(uint256 txId) external returns (uint256);
|
|
65
66
|
|
|
66
67
|
/**
|
|
67
68
|
* @dev Approves a pending broadcaster update transaction using a meta-transaction
|
|
68
69
|
* @param metaTx The meta-transaction
|
|
69
|
-
* @return The
|
|
70
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
70
71
|
*/
|
|
71
|
-
function updateBroadcasterApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
72
|
+
function updateBroadcasterApprovalWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
72
73
|
|
|
73
74
|
/**
|
|
74
75
|
* @dev Cancels a pending broadcaster update transaction
|
|
75
76
|
* @param txId The transaction ID
|
|
76
|
-
* @return The
|
|
77
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
77
78
|
*/
|
|
78
|
-
function updateBroadcasterCancellation(uint256 txId) external returns (
|
|
79
|
+
function updateBroadcasterCancellation(uint256 txId) external returns (uint256);
|
|
79
80
|
|
|
80
81
|
/**
|
|
81
82
|
* @dev Cancels a pending broadcaster update transaction using a meta-transaction
|
|
82
83
|
* @param metaTx The meta-transaction
|
|
83
|
-
* @return The
|
|
84
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
84
85
|
*/
|
|
85
|
-
function updateBroadcasterCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
86
|
+
function updateBroadcasterCancellationWithMetaTx(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
86
87
|
|
|
87
88
|
// ============ RECOVERY MANAGEMENT ============
|
|
88
89
|
|
|
89
|
-
/**
|
|
90
|
-
* @dev Creates execution params for updating the recovery address
|
|
91
|
-
* @param newRecoveryAddress The new recovery address
|
|
92
|
-
* @return The execution params
|
|
93
|
-
*/
|
|
94
|
-
function updateRecoveryExecutionParams(address newRecoveryAddress) external view returns (bytes memory);
|
|
95
|
-
|
|
96
90
|
/**
|
|
97
91
|
* @dev Requests and approves a recovery address update using a meta-transaction
|
|
98
92
|
* @param metaTx The meta-transaction
|
|
99
|
-
* @return The transaction record
|
|
93
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
100
94
|
*/
|
|
101
|
-
function updateRecoveryRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
95
|
+
function updateRecoveryRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
102
96
|
|
|
103
97
|
// ============ TIMELOCK MANAGEMENT ============
|
|
104
98
|
|
|
105
|
-
/**
|
|
106
|
-
* @dev Creates execution params for updating the time lock period
|
|
107
|
-
* @param newTimeLockPeriodSec The new time lock period in seconds
|
|
108
|
-
* @return The execution params
|
|
109
|
-
*/
|
|
110
|
-
function updateTimeLockExecutionParams(uint256 newTimeLockPeriodSec) external view returns (bytes memory);
|
|
111
|
-
|
|
112
99
|
/**
|
|
113
100
|
* @dev Requests and approves a time lock period update using a meta-transaction
|
|
114
101
|
* @param metaTx The meta-transaction
|
|
115
|
-
* @return The transaction record
|
|
102
|
+
* @return The transaction ID (use getTransaction(txId) for full record)
|
|
116
103
|
*/
|
|
117
|
-
function updateTimeLockRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (
|
|
104
|
+
function updateTimeLockRequestAndApprove(EngineBlox.MetaTransaction memory metaTx) external returns (uint256);
|
|
118
105
|
}
|