Skip to content

Instantly share code, notes, and snippets.

View UkemeSkywalker's full-sized avatar

Ukeme David Eseme UkemeSkywalker

View GitHub Profile
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"
// deployed contract address = 0x6e828b59fc799b6ef92e42d2f39e438a7477f469
async function main() {
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract Swapper{
struct Order{
address ofSwaper;
@UkemeSkywalker
UkemeSkywalker / template.md
Created August 17, 2022 15:38 — forked from EnebeliEmmanuel/template.md
for reference

🏗 scaffold-eth | 🏰 BuidlGuidl

🚩 Challenge 3: Minimum Viable Exchange

This challenge will help you build/understand a simple decentralized exchange, with one token-pair (ERC20 BALLOONS ($BAL) and ETH). This repo is an updated version of the original tutorial and challenge repos before it. Please read the intro for a background on what we are building first!

❗️ NOTE: functions outlined within the DEXTemplate.sol are what works with the front end of this branch/repo. Also return variable names may need to be specified exactly as outlined within the Solutions/DEX.sol file. If you are confused, see solutions folder in this repo and/or cross reference with front-end code.

There is also a Youtube video that may help you understand the concepts covered within this challenge too:

// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
error notEnoughLiquidity(uint256 requested, uint256 liquidity);
/**
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,
// 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
@UkemeSkywalker
UkemeSkywalker / vault.sol
Created August 11, 2022 16:23 — forked from EnebeliEmmanuel/vault.sol
for learning
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;
contract Vault {
// a contract where the owner create grant for a beneficiary;
// allows beneficiary to withdraw only when time elapsed
// allows owner to withdraw before the time elapsed
// get information of the beneficiary
// amount of ethers in the smart contract
@UkemeSkywalker
UkemeSkywalker / frequent-docker-commands.sh
Created June 15, 2022 19:39 — forked from orette/frequent-docker-commands.sh
Frequently used docker commands
# List IP address of a specific container
docker inspect --format '{{.Name}} - {{ .NetworkSettings.IPAddress }}' ${CID}
# List IP of all containers
# $(docker ps -aq) returns an array of all container IDs
# without docker-compose
docker inspect -f '{{.Name}} - {{.NetworkSettings.IPAddress }}' $(docker ps -aq)
# with docker-compose
docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq)