Skip to content

Instantly share code, notes, and snippets.

View dicethedev's full-sized avatar
🚀
Building

Blessing Samuel dicethedev

🚀
Building
View GitHub Profile
@dicethedev
dicethedev / counter.sol
Last active August 1, 2022 16:27
classwork
//SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract Counter {
uint public count;
uint timestop = block.timestamp + 30;
function inc() public {
count ++;
}
@dicethedev
dicethedev / Count.sol
Created August 2, 2022 04:19
Increment and Decrement counter in solidity and adding stop time to get it
//SPDX-License-Identifier: MIT
pragma solidity 0.8.7;
contract Counter {
uint public count;
uint timestop = block.timestamp + 30 seconds;
//set block.stamp should not be more than 30 seconds
function add() public {
require(block.timestamp <= timestop, "your time is up");
@dicethedev
dicethedev / deposit.sol
Last active August 3, 2022 17:10
a simple contract that deposit fund into a contract and also keep track of funds transferred into the contract.
//SPDX-License-Identifier: MIT
pragma solidity 0.8.13;
contract Deposit {
mapping(address => uint256) balances;
function depositFund(address _address) public payable {
balances[_address] += msg.value;
}
@dicethedev
dicethedev / vault.sol
Last active August 5, 2022 15:25
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
import React, { useEffect, useState } from "react";
import { ToastContainer, toast } from "react-toastify";
import { ethers } from "ethers";
import "react-toastify/dist/ReactToastify.css";
import Head from "next/head";
export default function Home() {
/**
@dicethedev
dicethedev / index.css
Last active November 19, 2022 16:25
Write the CSS code for hiding a div with the class hero only on mobile phone and tablet
/* mobile device */
@media only screen and (max-width:320px) {
.hero {
width: 28%;
display: none;
visibility: hidden;
clear: both;
float: left;
margin: 10px auto 5px 20px;
@dicethedev
dicethedev / index.html
Created November 19, 2022 16:48
How do I make the left div align to left and right div align to right
<html>
<head>
<title>How do I make the left div align to left and right div align to right</title>
<style>
div {
display: flex;
justify-content: space-between;
}
.left {
@dicethedev
dicethedev / readme.md
Created November 21, 2022 02:59
My Answer

1) Why do you think you are a good fit for this role?

My skill set matches all the requirements laid out in the job description. In particular, my ability to work to tight deadlines and manage my time effectively make me a good fit for the role. For example, in my current job I have to manage my own workload and tasks, taking briefs from colleagues in multiple and projects departments and creating a priority order that keeps everyone satisfied. Having been in the job for 6 months, I have never missed a deadline.

2) Why would you like to work on Kleros?

import {
Accordion,
AccordionButton,
AccordionIcon,
AccordionItem,
AccordionPanel,
Avatar,
Box,
Button,
Center,
@dicethedev
dicethedev / MyToken.sol
Created January 17, 2023 14:05 — forked from shobhitic/MyToken.sol
ERC20 Permit OpenZeppelin Tutorial - https://www.youtube.com/watch?v=lFKcga4Y6Ys
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.7.3/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@4.7.3/token/ERC20/extensions/draft-ERC20Permit.sol";
contract MyToken is ERC20, ERC20Permit {
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
function mint(address to, uint256 value) external {