Skip to content

Instantly share code, notes, and snippets.

View kamescg's full-sized avatar
🏗️
Ethereum Applications

Kames Geraghty kamescg

🏗️
Ethereum Applications
View GitHub Profile
@kamescg
kamescg / validator.eth.md
Last active July 20, 2022 16:57
validator.eth

Delegation: 0xbc4684ed1e69618eaf5ea2687e4a70f07c47d85845ff143683730c599b5dd1d33637597509307a20e8d3917870906d114da98c06bfc78bd7594d3a4d162e68471c Invocation: 0xa27bb60abb5e40b0a7e1adc87de6e50257a3659febd0a9d5d77a07020bffc1a25d4a3e32b9f26492b2191818a00bc823fa1e73546b5bc6a1aa70790106a599681b

@kamescg
kamescg / index.js
Last active April 25, 2022 12:22
MultiScan Example
const { MultiscanClient } = require('@web3-systems/multiscan-client');
const ETHERSCAN_API = process.env['ETHERSCAN_API']
const POLYGONSCAN_API = process.env['POLYGONSCAN_API']
const ADDRESS_EXAMPLE = '0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B'
async function main() {
// Etherscan API Key
client = new MultiscanClient(1, ETHERSCAN_API);
@kamescg
kamescg / fragment.meta.complete.json
Created April 23, 2022 15:49
fragment.meta.complete.json
{
"id": "set-meta-pooltogether-aave",
"name": "PoolTogether & Aave MetaSet",
"object": "set.meta",
"createdAt": "2020-01-01T00:00:00+00:00",
"version": {
"major": 0,
"minor": 1,
"patch": 0
},
@kamescg
kamescg / aave.v2.mainnet.deposit.json
Created April 23, 2022 03:24
aave.v2.mainnet.deposit.json
{
"id": "set-smartcontract-aave-v2-deposit-minimum",
"name": "Aave V2: Deposit USDC Minimum",
"object": "set.smartcontract",
"description": "Deposit Minimum 100 USDC via the LendingPoolV2 interface.",
"keywords": ["aave", "lendingpool", "usdc", "deposit", "minimum"],
"timestamp": "2020-01-01T00:00:00+00:00",
"tags": {
"aaveV2": {
"name": "Aave V2",
@kamescg
kamescg / pooltogether.v4.polygon.usdcPrizePool.json
Created April 23, 2022 03:23
pooltogether.v4.polygon.usdcPrizePool.json
{
"id": "set-smartcontract-pooltogether-v4-deposit-usdc",
"name": "PooltogetherV4: Deposit USDC via the YieldSourcePrizePool interface.",
"object": "set.smartcontract",
"description": "Swap any token for minimum 1 ETH using Uniswap",
"keywords": ["defi", "pooltogether", "polygon", "usdc"],
"timestamp": "2020-04-20T00:00:00+00:00",
"tags": {
"defi": {
"name": "DeFi",
@kamescg
kamescg / uniswapv2.swapForMinimum1e18Eth.json
Created April 20, 2022 11:47
uniswapv2.swapForMinimum1e18Eth.json
{
"id": "smartcontract-uniswapv2-swapAnyTokenForEth-min-1e18-output",
"name": "UniswapV2: Swap any Token for ETH (Minimum 1e18)",
"description": "Swap any token for minimum 1e18 ETH on Ethereum Mainnet (chainId: 1) using UniswapV2 RouterV2",
"object": "set.smartcontract",
"timestamp": "2020-04-020T00:00:00+00:00",
"version": {
"major": 0,
"minor": 1,
"patch": 0
@kamescg
kamescg / weth.withdraw.transaction.json
Last active April 15, 2022 12:20
Web3 Set | Wrapped Ether: Withdraw
{
"id": "set-smartcontract-weth-withdraw",
"object": "set.smartcontract",
"name": "Wrapped Ether: Withdraw",
"description": "Withdraw a minimum of 1 WETH to any destination address.",
"timestamp": "2018-11-13T20:20:39+00:00",
"version": {
"major": 0,
"minor": 1,
"patch": 0
@kamescg
kamescg / SmartContract.WETH9.TransferInterface.json
Last active April 8, 2022 10:32
SmartContractWETH9:TransferInterface
{
"id":"erc20-weth-smart-contract",
"name":"ERC20: WETH Smart Contract",
"object":"entity.smartcontract",
"chainId":1,
"address":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"abi":[
{
"constant":false,
"inputs":[
@kamescg
kamescg / set.smartcontract.ERC20Minimal.json
Last active April 8, 2022 15:17
set.smartcontract.ERC20Minimal.json
{
"id":"set-erc20-example-minimal",
"object":"set.smartcontract",
"name":"ERC20 Smart Contract Set Example Minimal",
"description":"Demonstrate set validation using a ERC20 interface",
"timestamp":"2018-11-13T20:20:39+00:00",
"version":{
"major":0,
"minor":1,
"patch":0
@kamescg
kamescg / EVMModulePoolTogetherUtililites.sol
Created April 7, 2022 13:23
EVMModulePoolTogetherUtililites
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.6;
contract EVMModulePoolTogetherUtililites {
function parseUnits(
uint256 amount,
uint8 decimals
) public pure returns(uint256) {
return amount * (10 ** decimals);