Skip to content

Instantly share code, notes, and snippets.

View ABADY1000's full-sized avatar

Abdullah Alamoodi ABADY1000

View GitHub Profile
@ABADY1000
ABADY1000 / Ballot.sol
Created April 24, 2022 13:47
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/// @title Voting with delegation.
contract Ballot {
// This declares a new complex type which will
// be used for variables later.
// It will represent a single voter.
struct Voter {
uint weight; // weight is accumulated by delegation
bool voted; // if true, that person already voted
@ABADY1000
ABADY1000 / HelloWorld.sol
Created April 24, 2022 13:45
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
// Start of contact
contract HelloWorld {
// Storage (state) variable
uint private Number;
// Return the value of storage variable