privateapi-besu/contracts/main.sol
rickytedjo 228b06f4c0 feat: add core and common modules with PostgreSQL integration
- Introduced CommonModule for shared services and configurations.
- Added CoreModule to manage database connections and configurations.
- Implemented PostgresService for PostgreSQL operations.
- Created configuration files for database and network provider.
- Integrated ethers.js for Ethereum interactions.
- Added validation pipes globally in the main application.
- Created DeployerModule with initial controller and service structure.
- Updated package.json with necessary dependencies for new features.
2025-08-04 15:40:09 +07:00

32 lines
706 B
Solidity

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract P2PTransferProject {
address public owner;
string public name;
modifier onlyOwner() {
require(msg.sender == owner, "Only owner");
_;
}
constructor(string memory _name) {
owner = msg.sender;
name = _name;
}
function getBalance() external view returns (uint256) {
return address(this).balance;
}
function setName(string memory _name) external onlyOwner {
name = _name;
}
function getName() external view returns (string memory) {
return name;
}
function getOwner() external view returns (address) {
return owner;
}
}