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.
68 lines
2.4 KiB
Solidity
Executable File
68 lines
2.4 KiB
Solidity
Executable File
// SPDX-License-Identifier: MIT
|
|
// OpenZeppelin Contracts (last updated v5.1.0) (access/Ownable2Step.sol)
|
|
|
|
pragma solidity ^0.8.20;
|
|
|
|
import {Ownable} from "./Ownable.sol";
|
|
|
|
/**
|
|
* @dev Contract module which provides access control mechanism, where
|
|
* there is an account (an owner) that can be granted exclusive access to
|
|
* specific functions.
|
|
*
|
|
* This extension of the {Ownable} contract includes a two-step mechanism to transfer
|
|
* ownership, where the new owner must call {acceptOwnership} in order to replace the
|
|
* old one. This can help prevent common mistakes, such as transfers of ownership to
|
|
* incorrect accounts, or to contracts that are unable to interact with the
|
|
* permission system.
|
|
*
|
|
* The initial owner is specified at deployment time in the constructor for `Ownable`. This
|
|
* can later be changed with {transferOwnership} and {acceptOwnership}.
|
|
*
|
|
* This module is used through inheritance. It will make available all functions
|
|
* from parent (Ownable).
|
|
*/
|
|
abstract contract Ownable2Step is Ownable {
|
|
address private _pendingOwner;
|
|
|
|
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
|
|
|
|
/**
|
|
* @dev Returns the address of the pending owner.
|
|
*/
|
|
function pendingOwner() public view virtual returns (address) {
|
|
return _pendingOwner;
|
|
}
|
|
|
|
/**
|
|
* @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
|
|
* Can only be called by the current owner.
|
|
*
|
|
* Setting `newOwner` to the zero address is allowed; this can be used to cancel an initiated ownership transfer.
|
|
*/
|
|
function transferOwnership(address newOwner) public virtual override onlyOwner {
|
|
_pendingOwner = newOwner;
|
|
emit OwnershipTransferStarted(owner(), newOwner);
|
|
}
|
|
|
|
/**
|
|
* @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
|
|
* Internal function without access restriction.
|
|
*/
|
|
function _transferOwnership(address newOwner) internal virtual override {
|
|
delete _pendingOwner;
|
|
super._transferOwnership(newOwner);
|
|
}
|
|
|
|
/**
|
|
* @dev The new owner accepts the ownership transfer.
|
|
*/
|
|
function acceptOwnership() public virtual {
|
|
address sender = _msgSender();
|
|
if (pendingOwner() != sender) {
|
|
revert OwnableUnauthorizedAccount(sender);
|
|
}
|
|
_transferOwnership(sender);
|
|
}
|
|
}
|