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.13; | |
| interface IERC721 { | |
| function safeTransferFrom( | |
| address from, | |
| address to, | |
| uint tokenId | |
| ) external; |
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.4; | |
| contract Vault { | |
| // a contract where the owner create grant for a beneficiary: | |
| // allows beneficiary to withdraw only when time elapse | |
| // allows owner to withdraw before time elapse | |
| // get information of the beneficiary | |
| // amount of ethers in the smart contract |
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: GPL-3.0 | |
| pragma solidity 0.8.4; | |
| contract Energy{ | |
| //have total supply | |
| //transferrable | |
| //name | |
| //symbol |
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: GPL-3.0 | |
| pragma solidity 0.8.4; | |
| import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
| contract Erc20Token is ERC20("Chop I Chop", "CIC") { | |
| address owner; | |
| constructor() { | |
| owner = msg.sender; |
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.0; | |
| contract Wallet { | |
| address[] public approvers; | |
| uint256 public quorum; | |
| struct Transfer { | |
| uint256 id; | |
| uint256 amount; | |
| address payable to; |
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.4; | |
| import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; | |
| contract Exchange is ERC20 { | |
| address public cryptoDevTokenAddress; | |
| // Exchange is inheriting ERC20, becase our exchange would keep track of Crypto Dev LP tokens | |
| constructor(address _CryptoDevtoken) ERC20("CryptoDev LP Token", "CDLP") { |
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: UNLICENSED | |
| pragma solidity ^0.8.9; | |
| import "./IERC20.sol"; | |
| contract swap{ | |
| IERC20 token; | |
| struct Order{ | |
| address _to; |
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.4; | |
| contract Multisend { | |
| address owner; | |
| constructor() { | |
| owner = msg.sender; | |
| } |
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.4; | |
| contract EthereumWallet { | |
| address owner; | |
| constructor() { | |
| owner = msg.sender; | |
| } |
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.4; | |
| /// @author Casweeney Ojukwu | |
| contract PollingSystem { | |
| /// @dev Created events for each transaction | |
| event pollCreated(bool indexed status); | |
| event voted(uint indexed candidateIndex); | |
| event votingStarted(bool indexed _votingOpened); | |
| event votingStopped(bool indexed _votingOpened); |