Skip to content

Instantly share code, notes, and snippets.

View saraab-dev's full-sized avatar
🎯
Focusing

Saraa Bilal saraab-dev

🎯
Focusing
  • RTP, NC
  • 08:26 (UTC -04:00)
View GitHub Profile
@aramb-dev
aramb-dev / Wallet_ETH.1.0.0.sol
Last active February 6, 2021 18:57
Created Wallet Ethereum with contract inheriting. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity 0.5.1;
contract ERC20Token{
string public name;
mapping (address => uint256) public balances;
function mint() public {
balances[tx.origin] += 1;
}
}
contract Wallet_ETH {
@aramb-dev
aramb-dev / Storage.sol
Last active February 6, 2021 18:58
Uploaded the Remix template storage Solidity smart contract.Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
@aramb-dev
aramb-dev / 1.0.1.sol
Last active February 6, 2021 18:58
Person Database.sol Versions Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity 0.5.1;
contract Person_Data_BlockChain_Base {
uint256 public peopleCount = 0;
mapping(uint => Person) public people;
struct Person {
uint id;
string firstname;
string lastname;
}
@aramb-dev
aramb-dev / Person Database.sol
Last active February 6, 2021 18:58
Made a new Person Database Solidity smart contract. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity 0.5.1;
contract Person_Data_BlockChain_Base {
uint256 public peopleCount = 0;
mapping(uint => Person) public people;
struct Person {
uint id;
string firstname;
string lastname;
}
@aramb-dev
aramb-dev / Variable.sol
Last active February 6, 2021 18:59
Made a new Variable with set and get function Solidity smart contract. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity 0.5.1;
contract variable_ex {
string variable;
constructor() public {
variable = "Default";
}
function get() public view returns(string memory) {
return variable;
@aramb-dev
aramb-dev / Var-Types.sol
Last active February 6, 2021 18:59
Made a new Variable Types Tutorial Solidity smart contract. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity 0.5.1;
contract Var_TypesCon {
string public stringVar = "Default";
bool public boolvar = true;
int public intvar = 1;
uint public uintvar = 1;
uint8 public uint8var = 8;
uint256 public uint256var = 99;
}
@aramb-dev
aramb-dev / Computer.sol
Last active February 6, 2021 18:59
Made a new Computer-State Solidity smart contract. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity 0.5.1;
contract Computer_State{
enum State { Running, ShutDown, SavedState, Hibernated, Sleeped, Terminated }
State public state;
constructor() public {
state = State.Running;
}
function Terminate_Computer() public {
state = State.Terminated;
@aramb-dev
aramb-dev / Messages.sol
Last active February 6, 2021 18:59
Made a new Messages Solidity smart contract. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity ^0.4.24;
contract Message_SEND_AND_RECIEVE {
string message ;
function SEND(string message_to_send) public {
message = message_to_send;
}
function RETRIEVE() public constant returns(string) {
return message;
}
@aramb-dev
aramb-dev / Election.sol
Last active February 6, 2021 19:00
Made a new Voting Solidity smart contract. Run with https://remix.ethereum.org. Very simple. Just Copy and Paste it into Remix.
pragma solidity ^0.4.21;
contract Election {
struct Candidate {
string name;
uint voteCount;
}
struct Voter {
bool authorized;
bool voted;
uint vote;