Skip to content

Instantly share code, notes, and snippets.

View IdrisAkintobi's full-sized avatar
💻
Developing...

Idris Akintobi IdrisAkintobi

💻
Developing...
View GitHub Profile
@IdrisAkintobi
IdrisAkintobi / Muiltisig_Classwork.sol
Created September 11, 2024 08:43
A multisig contract example.
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract Multisig {
uint8 public quorum;
uint8 public noOfValidSigners;
uint256 public txCount;
uint8 public newQuorum;
uint8 private newQuorumSignerCount;
@IdrisAkintobi
IdrisAkintobi / CallSendTransfer.sol
Created August 31, 2024 01:52
This Solidity code demonstrates three methods—`transfer`, `send`, and `call`—for transferring Ether between contracts.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;
import "hardhat/console.sol";
/*
* Summary:
* This Solidity code demonstrates three methods—`transfer`, `send`, and `call`—for transferring Ether between contracts.
* - `Transfer` uses `transfer`, which forwards a fixed gas amount of 2300 units and reverts if the receiving contract consumes more gas.
* - `Send` uses `send`, which also forwards 2300 gas units but returns a boolean indicating success or failure without reverting.
* - `Call` uses `call`, allowing the sender to specify a custom gas amount, making it suitable for contracts that require more gas to execute.
@IdrisAkintobi
IdrisAkintobi / StudentPortal.sol
Last active August 27, 2024 16:39
A smart contract to register Students
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.26;
contract StudentPortal {
address private owner;
struct Student {
string name;
string email;
string dob;
### Keybase proof
I hereby claim:
* I am esmart234 on github.
* I am esmart234 (https://keybase.io/esmart234) on keybase.
* I have a public key ASBfPrX-17v6VRGN1M0jX2z_LjULOBy-heQRxwSuG57Clgo
To claim this, I am signing this object: