Skip to content

Instantly share code, notes, and snippets.

View gulerburak's full-sized avatar

Burak Guler gulerburak

  • İstanbul, Turkey
  • 05:40 (UTC +03:00)
View GitHub Profile
@gulerburak
gulerburak / contracts...FeeCollector.sol
Last active September 19, 2022 13:21
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17; // latest version
contract FeeCollector{
address public owner; // owner of the contract
uint public balance; // total balance in contract
constructor() {
owner = msg.sender; // assign owner
}
@gulerburak
gulerburak / contracts...to-do.sol
Created September 19, 2022 13:57
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
contract ToDoList{
// to-do item
struct ToDo {
string text;
bool completed;
}
@gulerburak
gulerburak / contracts...CrowdFund.sol
Created September 19, 2022 20:21
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface IERC20 {
function transfer(address, uint) external returns (bool);
function transferFrom(
address,
address,
uint