Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
62 lines
2.0 KiB
Solidity
Executable File
62 lines
2.0 KiB
Solidity
Executable File
// SPDX-License-Identifier: MIT
|
|
// OpenZeppelin Contracts (last updated v5.3.0) (utils/ReentrancyGuardTransient.sol)
|
|
|
|
pragma solidity ^0.8.24;
|
|
|
|
import {TransientSlot} from "./TransientSlot.sol";
|
|
|
|
/**
|
|
* @dev Variant of {ReentrancyGuard} that uses transient storage.
|
|
*
|
|
* NOTE: This variant only works on networks where EIP-1153 is available.
|
|
*
|
|
* _Available since v5.1._
|
|
*/
|
|
abstract contract ReentrancyGuardTransient {
|
|
using TransientSlot for *;
|
|
|
|
// keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
|
|
bytes32 private constant REENTRANCY_GUARD_STORAGE =
|
|
0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;
|
|
|
|
/**
|
|
* @dev Unauthorized reentrant call.
|
|
*/
|
|
error ReentrancyGuardReentrantCall();
|
|
|
|
/**
|
|
* @dev Prevents a contract from calling itself, directly or indirectly.
|
|
* Calling a `nonReentrant` function from another `nonReentrant`
|
|
* function is not supported. It is possible to prevent this from happening
|
|
* by making the `nonReentrant` function external, and making it call a
|
|
* `private` function that does the actual work.
|
|
*/
|
|
modifier nonReentrant() {
|
|
_nonReentrantBefore();
|
|
_;
|
|
_nonReentrantAfter();
|
|
}
|
|
|
|
function _nonReentrantBefore() private {
|
|
// On the first call to nonReentrant, REENTRANCY_GUARD_STORAGE.asBoolean().tload() will be false
|
|
if (_reentrancyGuardEntered()) {
|
|
revert ReentrancyGuardReentrantCall();
|
|
}
|
|
|
|
// Any calls to nonReentrant after this point will fail
|
|
REENTRANCY_GUARD_STORAGE.asBoolean().tstore(true);
|
|
}
|
|
|
|
function _nonReentrantAfter() private {
|
|
REENTRANCY_GUARD_STORAGE.asBoolean().tstore(false);
|
|
}
|
|
|
|
/**
|
|
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
|
|
* `nonReentrant` function in the call stack.
|
|
*/
|
|
function _reentrancyGuardEntered() internal view returns (bool) {
|
|
return REENTRANCY_GUARD_STORAGE.asBoolean().tload();
|
|
}
|
|
}
|