Skip to content

Instantly share code, notes, and snippets.

View Ultra-Tech-code's full-sized avatar
:octocat:

Adewale IyanuOluwa Isaac Ultra-Tech-code

:octocat:
View GitHub Profile
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract examole{
uint count;
uint timeframe = block.timestamp + 30 seconds;
// uint timeframe;
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract examole{
uint count;
uint timeframe = block.timestamp + 30 seconds;
// uint timeframe;
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
contract fundContract{
mapping(address => uint) balances;
function deposit() public payable{
require(msg.value > 1, "Your deposit must be greater than 1 eth");
@Ultra-Tech-code
Ultra-Tech-code / Grant contract code
Created August 4, 2022 20:06
a contract where the owner create grant for a beneficiary
// SPDX-License-Identifier: GPL-3.0
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 a beneficiary
//amount of ethers in the smart contract
// SPDX-License-Identifier: GPL-3.0
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 a beneficiary
//amount of ethers in the smart contract
@Ultra-Tech-code
Ultra-Tech-code / EnergyToken.sol
Last active August 6, 2022 15:46
A token created with solidity that has a 10% burn function
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.4;
contract Energy{
//have total supply
//transferrable
//name
//symbol
//decimal
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/Pausable.sol";
contract wallet is Pausable{
@Ultra-Tech-code
Ultra-Tech-code / library.sol
Created August 10, 2022 15:18
an arithmetic library with examples
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.8;
library arithmetic{
//Add two numbers together
function add(uint num1, uint num2) external pure returns(uint){
uint result = num1 + num2;
return result;
// SPDX-License-Identifier: GPL-3.0
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 a beneficiary
//amount of ethers in the smart contract
require("dotenv").config({ path: ".env" });
import { BytesLike } from "ethers";
import { ethers } from "hardhat";
// import * as dotenv from "dotenv";
// import IMultiSig from "../typechain-types/Imultisig.sol"
async function main() {
let provider = {
PrivateKey: process.env.PRIVATE_KEY as BytesLike,