Skip to content

Instantly share code, notes, and snippets.

View dkydysk's full-sized avatar
🎯
Focusing

Lera Botko dkydysk

🎯
Focusing
View GitHub Profile
@dkydysk
dkydysk / .deps...npm....resolution-index.json
Created May 14, 2026 18:36
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.34+commit.80d5c536.js&optimize=undefined&runs=200&gist=
{
"RentContract.sol": {
"__sources__": {
"RentContract.sol": {
"content": "// SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.20;\r\n\r\ncontract RentContract {\r\n address public tenant; \r\n address public landlord; \r\n uint256 public rentAmount; \r\n uint256 public period; \r\n uint256 public nextPayment; \r\n uint256 public balance; \r\n\r\n constructor(\r\n address _landlord,\r\n uint256 _rentAmount,\r\n uint256 _period\r\n ) {\r\n tenant = msg.sender;\r\n landlord = _landlord;\r\n rentAmount = _rentAmount;\r\n period = _period;\r\n nextPayment = block.timestamp + _period;\r\n }\r\n\r\n function deposit() external payable {\r\n require(msg.sender == tenant, \"Only tenant\");\r\n balance += msg.value;\r\n }\r\n\r\n function withdrawRent() external {\r\n require(msg.sender == landlord, \"Only landlord\");\r\n require(block.timestamp >=