Skip to content

Instantly share code, notes, and snippets.

View zarpos's full-sized avatar
🐨

Diego Rubio zarpos

🐨
View GitHub Profile
@zarpos
zarpos / NeighborWatt.sol
Created October 8, 2023 06:35
An ERC20 token deployed in CELO chain
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
contract WattCoin is ERC20, ERC20Burnable, Ownable, ERC20Permit {
constructor(address initialOwner)
@zarpos
zarpos / .zhsrc
Created November 10, 2022 01:28
my zshrc
# To open visual studio code from terminal
code () { VSCODE_CWD="$PWD" open -n -b "com.microsoft.VSCode" --args $* ;}
# To open CLion from terminal
clion () { open -na "CLion.app" --args "$@" ;}
export PATH=/usr/local/bin:$PATH
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
@zarpos
zarpos / .vimrc
Created November 10, 2022 01:26
my vim_rc
set number
set colorcolumn=80
syntax enable
set cursorline
set relativenumber
set tabstop=4
call plug#begin()
" File manager
@zarpos
zarpos / contracts...1_Storage.sol
Created March 23, 2022 20:25
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
/**
* @title Storage
* @dev Store & retrieve value in a variable
*/
contract Storage {
@zarpos
zarpos / contracts...greeter.sol
Created March 23, 2022 20:21
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract Greeter {
string greeting;
constructor(string memory _greeting) {
@zarpos
zarpos / README.txt
Created March 23, 2022 20:00
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads for the very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS