Skip to content

Instantly share code, notes, and snippets.

View erikside's full-sized avatar

Erik side erikside

View GitHub Profile
@erikside
erikside / .forge-snapshots...FullOracleObserve0After5Seconds.snap
Created April 19, 2024 00:10
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.22+commit.4fc1097e.js&optimize=true&runs=200&gist=
1912
@erikside
erikside / contracts...untitled-8e70cb95....import...ERC20.5B38Da6.eth.deployed
Created August 25, 2023 19:54
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.17+commit.8df45f5f.js&optimize=true&runs=200&gist=
{"chainId":"JavaScript VM Network","abi":[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutabi
@erikside
erikside / .prettierrc.json
Created June 8, 2023 16:22
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.18+commit.87f61d96.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@erikside
erikside / png_increase.mjs
Created May 24, 2023 09:18 — forked from skeletoncrewrip/png_increase.mjs
Enlarge the size of PNGs by repeatedly writing a string to metadata
import png from 'png-metadata';
import fs from 'fs';
const desiredSize = 24000;
const folder = './assets/';
const creatorString = 'Skeleton Crew';
const fillerString = 'https://treattoolbox.com ';
const bumpImageSize = async (file) => {
if (file.endsWith('.png')) {
@erikside
erikside / .prettierrc.json
Last active May 10, 2024 15:30
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=builtin&optimize=false&runs=200&gist=
{did:3:kjzl6cwe1jw14as6npfraop4oka5esrurt8s6igisz4udvvkahzkgd8ra3mlm0o
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@erikside
erikside / .github...workflows...run-slither-action.yml
Created February 22, 2023 06:52
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=builtin&optimize=false&runs=200&gist=
name: Slither Analysis
on: [push]
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm install
@erikside
erikside / tests...artifacts...build-info...3baede574160ee7b135a852727852b19.json
Created February 22, 2023 06:37
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
This file has been truncated, but you can view the full file.
{
"id": "3baede574160ee7b135a852727852b19",
"_format": "hh-sol-build-info-1",
"solcVersion": "0.8.18",
"solcLongVersion": "0.8.18+commit.87f61d96",
"input": {
"language": "Solidity",
"sources": {
"tests/MyToken1_test.sol": {
"content": "// SPDX-License-Identifier: GPL-3.0\n \npragma solidity >=0.4.22 <0.9.0;\n\n// This import is automatically injected by Remix\nimport \"remix_tests.sol\"; \n\n// This import is required to use custom transaction context\n// Although it may fail compilation in 'Solidity Compiler' plugin\n// But it will work fine in 'Solidity Unit Testing' plugin\nimport \"remix_accounts.sol\";\nimport \"../contracts/MyToken.sol\";\n\n// File name has to end with '_test.sol', this file can contain more than one testSuite contracts\ncontract testSuite {\n\n /// 'beforeAll' runs before all other tests\n /// More special functions are: 'beforeEach', 'beforeAll', 'afterEach' & 'afterAll'\n function beforeAll() public {\n // <instantiate contract>\n Asser
@erikside
erikside / .prettierrc.json
Created February 22, 2023 06:36
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.17+commit.8df45f5f.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@erikside
erikside / scripts...ethers-lib.ts
Created February 21, 2023 05:45
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.18+commit.87f61d96.js&optimize=true&runs=200&gist=
import { ethers } from 'ethers'
/**
* Deploy the given contract
* @param {string} contractName name of the contract to deploy
* @param {Array<any>} args list of constructor' parameters
* @param {Number} accountIndex account index from the exposed account
* @return {Contract} deployed contract
*/
export const deploy = async (contractName: string, args: Array<any>, accountIndex?: number): Promise<ethers.Contract> => {