crazed-nft-fans

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2022 License: MIT Imports: 3 Imported by: 0

README

Crazed NFT Fans

Go Reference Tests Go Report Card codecov License

A new NFT has dropped, but its location is a secret! Fans have become crazed, and are sending funds to random wallets and calling gas guzzling contracts as fast as they can to hopefully snag it.

Using the fans on a simulated network (like geth in dev mode) can help you emulate network congestion events.

If using a simulated geth instance, you might find it helpful to turn on metrics.

Configure

Environment variables are used to configure everything about the crazed fans.

HTTP_URL="http://localhost:8545" # HTTP URL of the chain to run on
WS_URL="ws://localhost:8546" # WS URL of the chain to run on
CHAIN_ID="1337" # ID of the chain to run on
FUNDING_KEY="ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" # Private key of the funding address
CRAZED_LEVEL="0" # See below
Crazed Levels

You can set how intensely the fans will interact with the chain using the CRAZED_LEVEL env var. This controls how high fans will set their gas tips, and how often they decide to replace transactions with higher gas tips.

var CrazedLevelMappings = map[int]string{
  0: "Mixed", // Randomly assigns each fan one of the below statuses
  1: "Indifferent",
  2: "Curious",
  3: "Interested",
  4: "Obsessed",
  5: "Manic",
}

Test

make test

to run basic tests in standard go format, or

make test_fancy

to run basic tests with a prettier output, or

make test_integration

to launch a simulated geth node to run all possible tests.

Can I use this to cause chaos on ethereum mainnet or testnets?

Maybe? But I wouldn't recommend it, unless you are looking for a way to become very poor, very fast. There's far more fun ways to do that anyway.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package client manages connections and interactions with the EVM chain
Package client manages connections and interactions with the EVM chain
Package config defines the config for the project
Package config defines the config for the project
Package fans details the actions of each crazed fan
Package fans details the actions of each crazed fan

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL