Skip to content

Instantly share code, notes, and snippets.

View fourcolors's full-sized avatar
🎉
Perkisizing

fourcolors fourcolors

🎉
Perkisizing
View GitHub Profile
@fourcolors
fourcolors / difference.py
Created January 26, 2021 06:25
Find the difference of two lists in python
list1 = [1,2,3,4]
list2 = [1,2,3,4,5,6]
non_matching_items = list(set(list2).difference(set(list1)))
print(non_matching_items)
# [5, 6]
@fourcolors
fourcolors / contract.sol
Created January 21, 2024 17:11
smart contract for rentdi
//the tenants borrow gho and pays to the pool and the RentalApp contract owner keeps the moneys and earns interest
function paySecurityDeposit(address tokenAddress) public {
require(
tokenAddress == ghoAddress,
"Only gho token can be used to pay rent"
);
require(msg.sender == tenant, "Only tenant can pay security deposit");
require(leaseActive, "Lease is active");
require(
block.timestamp <= leaseStart + securityDepositDueDate,