Skip to content

Instantly share code, notes, and snippets.

View Oluwatobilobaoke's full-sized avatar
🎯
Focusing

Okekunle Oluwatobiloba Oluwatobilobaoke

🎯
Focusing
View GitHub Profile
@Oluwatobilobaoke
Oluwatobilobaoke / Readme.md
Last active January 27, 2024 18:54
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
@Oluwatobilobaoke
Oluwatobilobaoke / contracts...school.sol
Last active February 9, 2024 10:51
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
contract School {
struct Student {
string name;
uint score;
uint age;
string favColour;
@Oluwatobilobaoke
Oluwatobilobaoke / contracts...schoolrecordfactory.sol
Last active February 9, 2024 15:56
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
import "./schoolrecord.sol";
contract SchoolFactory {
address public owner; // Contract owner
mapping(address => School) public deployedSchools; // Deployed schools mapping
event SchoolCreated(address schoolAddress, address creator);
@Oluwatobilobaoke
Oluwatobilobaoke / contracts...schoolrecord.sol
Created February 9, 2024 15:28
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;
contract School {
struct Student {
string name;
uint score;
uint age;
string favColour;
@Oluwatobilobaoke
Oluwatobilobaoke / contracts...nft.sol
Created February 15, 2024 16:34
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol";
import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/[email protected]/access/Ownable.sol";
contract TbGuys is ERC721, ERC721URIStorage, ERC721Burnable, Ownable {
constructor(address initialOwner)
@Oluwatobilobaoke
Oluwatobilobaoke / contracts...saveEther.sol
Created February 24, 2024 17:43
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.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
error INSUFFICIENT_FUNDS();
error AMOUNT_CANT_BE_ZERO();
error ADDRESS_CANT_BE_ZERO();
contract SaveEther {
mapping(address => uint256) savings;
// SPDX-License-Identifier: MIT
// Compatible with OpenZeppelin Contracts ^5.0.0
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MetaNFT is ERC721 {
uint256 public mintingFee = 10000000000000000;
constructor()
ERC721("Meta NFT", "MNFT")
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;
import {Utilities} from "../../utils/Utilities.sol";
import "forge-std/Test.sol";
import {SideEntranceLenderPool} from "../src/SideEntranceLenderPool.sol";
import "../src/flashloan.sol";
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.19;
import "forge-std/Test.sol";
import "../src/Mortgage.sol"; // Adjust the import path according to your directory structure
contract MortgageTest is Test {
Mortgage mortgage;
MustCall mustCall;