This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.17; | |
contract ToDoList{ | |
// to-do item | |
struct ToDo { | |
string text; | |
bool completed; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.17; | |
interface IERC20 { | |
function transfer(address, uint) external returns (bool); | |
function transferFrom( | |
address, | |
address, | |
uint |