Skip to content

Instantly share code, notes, and snippets.

View aramb-dev's full-sized avatar
🚀
Busy 👍

Abdur-Rahmān Bilāl aramb-dev

🚀
Busy 👍
View GitHub Profile
@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;