Skip to content

Instantly share code, notes, and snippets.

View Adecom16's full-sized avatar
🏠
Working from home

Adefokun Adeoluwa Adecom16

🏠
Working from home
View GitHub Profile

Technical Specification: High-Scale Notification System (1M+ Users)

1. System Overview

A reliable, multi-channel (Push, SMS, Email) notification system designed to handle over 1 million users. The architecture prioritizes at-least-once delivery, strict deduplication, horizontal scalability, and automatic provider failover.

2. Core Architecture & Component Design## 2.1 API Edge Layer

  • Ingress: High-throughput REST/gRPC endpoints receiving notification requests from internal microservices.
  • Payload Validation: Validates recipient schemas, token presences, and templates before acknowledging receipt.
  • Immediate Ack: Acknowledges requests with a unique notification_id and HTTP 202 (Accepted) immediately after pushing to the ingestion queue.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
/**
* @title EIP-7777: Decentralized Reputation Protocol (DRP)
* @dev This contract implements a new standard for decentralized reputation management
*
* EIP-7777 Abstract:
* This EIP proposes a standardized interface for decentralized reputation systems
* that enables trustless reputation scoring, delegation, and cross-platform interoperability.
@Adecom16
Adecom16 / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created September 15, 2025 17:59
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.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
Title: Ethereum Smart Contracts and Gas Mechanisms Explained
Introduction:
Ethereum is one of the most widely used blockchain platforms, primarily due to its ability to support smart contracts and decentralized applications (dApps). Ethereum’s flexibility allows developers to deploy self-executing contracts that run directly on the blockchain, without the need for intermediaries. However, running code on Ethereum comes with a cost, known as gas, which is essential to the network’s security and efficiency. In this essay, I will break down the core concepts of smart contracts and gas, explaining how they work, why they are necessary, and how they impact the Ethereum ecosystem.
What Are Smart Contracts?
A smart contract is essentially a program that runs on the Ethereum blockchain. Unlike traditional contracts that are enforced by intermediaries (such as banks or lawyers), smart contracts are self-executing. This means that once a smart contract’s conditions are met, it automatically executes the terms of the
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
interface IVotingPoll {
function factory() external view returns(address);
function createPoll(string calldata _title, string[] calldata _candidates) external;
function vote(uint candidate) external;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract LMS {
// Structs
struct User {
string name;
string email;
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
contract Exploit_VIP_Bank {
VIP_Bank bank;
constructor(address _bankAddress) {
bank = VIP_Bank(_bankAddress);
}
import { Flex, Button, Dialog, Text, TextField } from "@radix-ui/themes";
import {
useWeb3ModalAccount,
useWeb3ModalProvider,
} from "@web3modal/ethers/react";
import { isSupportedChian } from "../utils";
import { getProvider } from "../constants/providers";
import { getProposalContract } from "../constants/contracts";
import { useState } from "react";
import { isAddress } from "ethers";
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
contract NFTMarketplace is ERC721, Ownable {
using SafeMath for uint256;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Funds {
// Mapping to store the balances deposited by each address
mapping(address => uint256) public depositedFunds;
// Variable to store the total funds transferred directly to the contract
uint256 public totalFundsTransferred;