Skip to content

Instantly share code, notes, and snippets.

View FuzzysTodd's full-sized avatar
💭
I may be slow to respond.

Todd Anthony Stephens FuzzysTodd

💭
I may be slow to respond.
View GitHub Profile
@FuzzysTodd
FuzzysTodd / .deps...remix-tests...remix_accounts.sol
Created May 2, 2024 14: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=https://0.0.0.0:8000&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
@FuzzysTodd
FuzzysTodd / .deps...remix-tests...remix_accounts.sol
Created May 2, 2024 14:06
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=https://0.0.0.0:8000&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
@FuzzysTodd
FuzzysTodd / vyper...__init__.py
Created May 2, 2024 13:43
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=false&runs=200&gist=
from pathlib import Path as _Path
from vyper.compiler import compile_code, compile_from_file_input
try:
from importlib.metadata import PackageNotFoundError # type: ignore
from importlib.metadata import version as _version # type: ignore
except ModuleNotFoundError:
from importlib_metadata import PackageNotFoundError # type: ignore
from importlib_metadata import version as _version # type: ignore
@FuzzysTodd
FuzzysTodd / .git...HEAD
Created May 2, 2024 13:40
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=false&runs=200&gist=
ref: refs/heads/master
@FuzzysTodd
FuzzysTodd / examples...factory...Factory.vy
Created May 2, 2024 13:40
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=false&runs=200&gist=
#pragma version >0.3.10
from ethereum.ercs import IERC20
interface Exchange:
def token() -> IERC20: view
def receive(_from: address, _amt: uint256): nonpayable
def transfer(_to: address, _amt: uint256): nonpayable
@FuzzysTodd
FuzzysTodd / examples...factory...Exchange.vy
Created May 2, 2024 13:40
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=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
@FuzzysTodd
FuzzysTodd / tenderly...project...artifacts...WETH9.json
Created May 2, 2024 07:12
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.25+commit.b61c2a91.js&optimize=false&runs=200&gist=
{
"deploy": {
"VM:-": {
"linkReferences": {},
"autoDeployLib": true
},
"main:1": {
"linkReferences": {},
"autoDeployLib": true
},
@FuzzysTodd
FuzzysTodd / tenderly...project...artifacts...WETH9_metadata.json
Created May 2, 2024 07:12
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.25+commit.b61c2a91.js&optimize=false&runs=200&gist=
{
"compiler": {
"version": "0.4.26+commit.4563c3fc"
},
"language": "Solidity",
"output": {
"abi": [
{
"constant": true,
"inputs": [],
@FuzzysTodd
FuzzysTodd / artifacts...ERC20Mock_metadata.json
Created May 2, 2024 07:07
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=
{
"compiler": {
"version": "0.8.25+commit.b61c2a91"
},
"language": "Solidity",
"output": {
"abi": [
{
"inputs": [
{
@FuzzysTodd
FuzzysTodd / .deps...npm...@openzeppelin...contracts...interfaces...draft-IERC6093.sol
Created May 1, 2024 06: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.6.12+commit.27d51765.js&optimize=true&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**