Template for Vampire Attacking NFT Projects
This is a work in progress and was built in an evening while watching youtube. Will update when tested & optimised as did 0 gas work / any real testing. Read overview below for future feature ideas.
Loads of great Art NFT projects have piss poor teams behind them. This is a method for a community to essentially migrate their NFT (victim) to a new vNFT (vampire). Rewards from secondary sales can then be used by the new owner(s) to further develop the community. Potential here also to make the NFTVampire deployable through a VampireManager contract, which could function as control mechanism and function as a DAO for vNFT token holders so no single contract controls the funds. And then make a factory which deploys vampireManager => NFTVampire
If interested in previous vampire attacks see sushiswap.
Feel free to.
git clone https://github.com/gakonst/dapptools-template
cd dapptools-template
make # This installs the project's dependencies.
make test
Contracts can be deployed via the make deploy
command. Addresses are automatically
written in a name-address json file stored under out/addresses.json
.
We recommend testing your deployments and provide an example under scripts/test-deploy.sh
which will launch a local testnet, deploy the contracts, and do some sanity checks.
Environment variables under the .env
file are automatically loaded (see .env.example
).
Be careful of the precedence in which env vars are read.
We assume ETH_FROM
is an address you own and is part of your keystore.
If not, use ethsign import
to import your private key.
See the Makefile
for more context on how this works under the hood
We use Alchemy as a remote node provider for the Mainnet & Rinkeby network deployments.
You must have set your API key as the ALCHEMY_API_KEY
enviroment variable in order to
deploy to these networks
ETH_FROM=0x3538b6eF447f244268BCb2A0E1796fEE7c45002D make deploy-mainnet
ETH_FROM=0x3538b6eF447f244268BCb2A0E1796fEE7c45002D make deploy-rinkeby
ETH_RPC_URL=<your network> make deploy
# on one terminal
dapp testnet
# get the printed account address from the testnet, and set it as ETH_FROM. Then:
make deploy
After deploying your contract you can verify it on Etherscan using:
ETHERSCAN_API_KEY=<api-key> contract_address=<address> network_name=<mainnet|rinkeby|...> make verify
Check out the dapp documentation to see how verifying contracts work with DappTools.
If you do not have DappTools already installed, you'll need to run the below commands
# User must be in sudoers
curl -L https://nixos.org/nix/install | sh
# Run this or login again to use Nix
. "$HOME/.nix-profile/etc/profile.d/nix.sh"
curl https://dapp.tools/install | sh