Git Product home page Git Product logo

burn4ever's Introduction

Burn 4 Ever

Do you really want to burn some ETH?

Sending it to 0x0000000000000000000000000000000000000000 or 0x000000000000000000000000000000000000dEaD is a popular choice, but the ETH is not really burned. There is technically a private key with access to the funds, its just that no one knows it (probably).

Of course, there is practically 0 chance of anyone ever finding the private key to these addresses, but if some does... it's a lot of ETH to dump on the market.

With Burn4Ever, ETH is really burned, forever :)

How does it work?

A self destructing contract can send the remaining ETH in the contract to any address. Specifically, to itself. ETH sent to the contract this way is truly burned and has no way to be restored (well maybe via a fork).

Thanks to CREATE2 and ERC-2470 we can have a constant contract address, that anyone can deploy a contract to. The contract has a single instruction: Burn all the ETH in the balance.

If there is ETH in the contract, once it is initiated, the ETH will be burned.

To compensate the burner, 0.1% of the ETH in the contract will be sent to the burner (Yay MEV!)

The contract will always be on the same address on all chains that support ERC-2470.

Address:

0xc326af5d2699b6554b5ed11cfc5829e373ae6284

Address generation:

Nonce

ethers.utils.keccak256(ethers.utils.toUtf8Bytes("BURN4EVER"));

ByteCode

0x608060405234801561001057600080fd5b503273ffffffffffffffffffffffffffffffffffffffff166103e8478161003357fe5b04600067ffffffffffffffff8111801561004c57600080fd5b506040519080825280601f01601f19166020018201604052801561007f5781602001600182028036833780820191505090505b506040518082805190602001908083835b602083106100b35780518252602082019150602081019050602083039250610090565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610115576040519150601f19603f3d011682016040523d82523d6000602084013e61011a565b606091505b5050503073ffffffffffffffffffffffffffffffffffffffff16fffe

Creator

0xce0042B868300000d44A59004Da54A005ffdcf9f

Verify Address

let burnForeverAddress = ethers.utils.getCreate2Address(
  deployerContract.address,
  ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)),
  ethers.utils.keccak256(deployTx.data),
);

Library

The library shows an example and a code snippet to deploy the contract.

Pre Requisites

Before running any command, make sure to install dependencies:

$ yarn install

Compile

Compile the smart contracts with Hardhat:

$ yarn compile

Test

Run the Mocha tests:

$ yarn test

Burn ETH in the contract

Polupate the .env file as seen in the example file .env.example

ts-node ./src/Burn4Ever.ts

burn4ever's People

Contributors

amanusk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.