Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Fahmi Ahmad khofesh

🏠
Working from home
View GitHub Profile
@khofesh
khofesh / contracts...SendMoney.sol
Created Sep 8, 2021
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.7.6+commit.7338295f.js&optimize=false&runs=200&gist=
View contracts...SendMoney.sol
pragma solidity ^0.8.4;
contract SendMoney {
uint public balanceReceived;
uint public lockedUntil;
function receiveMoney() public payable {
balanceReceived += msg.value;
lockedUntil = block.timestamp + 1 minutes;
}
@khofesh
khofesh / contracts...Variables.sol
Created Sep 8, 2021
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.7.6+commit.7338295f.js&optimize=false&runs=200&gist=
View contracts...Variables.sol
pragma solidity ^0.8.4;
contract WorkingWithVariables {
uint256 public myUint;
bool public myBool;
uint8 public myUint8;
address public myAddress;
string public myString = "Ethereum is cool!";
function setMyUint(uint256 _myUint) public {
@khofesh
khofesh / contracts...MyContracts.sol
Created Sep 8, 2021
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.7.6+commit.7338295f.js&optimize=false&runs=200&gist=
View contracts...MyContracts.sol
pragma solidity ^0.8.4;
contract MyContracts {
string public myString = "Hello World!";
}
@khofesh
khofesh / contracts...3_Ballot.sol
Created Sep 8, 2021
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.7.6+commit.7338295f.js&optimize=false&runs=200&gist=
View contracts...3_Ballot.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
/**
* @title Ballot
* @dev Implements voting process along with vote delegation
*/
contract Ballot {
@khofesh
khofesh / contracts...2_Owner.sol
Created Sep 8, 2021
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.7.6+commit.7338295f.js&optimize=false&runs=200&gist=
View contracts...2_Owner.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.8.0;
/**
* @title Owner
* @dev Set & change owner
*/
contract Owner {
@khofesh
khofesh / contracts...1_Storage.sol
Created Sep 8, 2021
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.7.6+commit.7338295f.js&optimize=false&runs=200&gist=
View contracts...1_Storage.sol
// 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 {
View keybase.md

Keybase proof

I hereby claim:

  • I am khofesh on github.
  • I am fahmiahmad (https://keybase.io/fahmiahmad) on keybase.
  • I have a public key ASDu7dItkCcQcu_Fz1Omwq52JhOXPjE1G9knaRUM42tNMQo

To claim this, I am signing this object: