Skip to content

Instantly share code, notes, and snippets.

View docflex's full-sized avatar
⚛️
Over-"React"-ing

Rehber Moin docflex

⚛️
Over-"React"-ing
View GitHub Profile
@docflex
docflex / Steps for Hardhat Setup.md
Created May 18, 2025 08:11
Hardhat Steps to get on Local CN Web 3

Steps To Have Local Setup for Hardhat:

  1. Have an IDE + Node Installed Locally. (LTS v22.14.0)

  2. Run Command to Set Up a Node Project.

    • Creates the Node Project: npm init -y
    • Installs Hardhat: npm i --save-dev hardhat
  3. Create a Hardhat Project: npx hardhat

@docflex
docflex / Voting.sol
Created May 4, 2025 10:25
CN Web3 | Voting Smart Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title Election
* @dev A smart contract that manages a simple election process.
*/
contract Election {
// Owner of the contract (e.g., election administrator)
address public owner;
@docflex
docflex / SimpleBank.sol
Created May 4, 2025 09:44
CN Web3 | Simple Bank Testnet Sepolia Deployment
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
/**
* @title SimpleBank
* @dev A minimal Contract to Demonstrate Deposits, withdrawals, events, access control
*
*/
contract SimpleBank {
address public owner;
@docflex
docflex / Modifiers.sol
Created May 4, 2025 09:20
CN Web3 Modifiers
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract ModifierExample {
address public owner;
uint public value;
bool public isLocked;
// Constructor Sets Contract Deployer as the Owner
constructor() {
@docflex
docflex / Visibility.sol
Created May 4, 2025 08:47
CN Web3 Function Visibility GIST
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
@title Visibility Example
*/
contract VisibilityExample {
// ** State Variables
uint public stateNumber; // Visible to Everyone
string private secretNote; // Visible to State only