├── .gitignore ├── .env.example ├── tsconfig.json ├── contracts └── Burn4Ever.sol ├── .prettierrc ├── LICENSE ├── src ├── deploy.ts ├── Burn4Ever.ts └── deployer.ts ├── package.json ├── hardhat.config.ts ├── README.md └── test └── burn4ever.test.ts /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | 3 | #Hardhat files 4 | cache 5 | artifacts 6 | factories 7 | typechain 8 | 9 | .env 10 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | MNEMONIC=test test test test test test test test test test test test 2 | REPORT_GAS=true 3 | INFURA_API_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 4 | ETHERSCAN_API_KEY=YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 5 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2018", 4 | "module": "commonjs", 5 | "strict": true, 6 | "esModuleInterop": true, 7 | "outDir": "dist", 8 | "resolveJsonModule": true 9 | }, 10 | "include": ["./scripts", "./test"], 11 | "files": ["./hardhat.config.ts"] 12 | } 13 | -------------------------------------------------------------------------------- /contracts/Burn4Ever.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.6.0; 3 | 4 | contract Burn4Ever { 5 | receive() external payable {} 6 | 7 | constructor() public { 8 | tx.origin.call{ value: address(this).balance / 1000 }(new bytes(0)); 9 | selfdestruct(payable(this)); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "arrowParens": "avoid", 3 | "bracketSpacing": true, 4 | "endOfLine":"auto", 5 | "printWidth": 120, 6 | "singleQuote": false, 7 | "tabWidth": 2, 8 | "trailingComma": "all", 9 | "overrides": [ 10 | { 11 | "files": "*.sol", 12 | "options": { 13 | "tabWidth": 4 14 | } 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Alex Manuskin 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/deploy.ts: -------------------------------------------------------------------------------- 1 | import { Contract, utils, BytesLike } from "ethers"; 2 | import { deployerAddress } from "./deployer"; 3 | 4 | export const VERSION = "BURN4EVER"; 5 | 6 | export const deployContract = async ( 7 | deployerContract: Contract, 8 | // contractFactory: ContractFactory, 9 | salt: string, 10 | deployTxData: BytesLike, 11 | ) => { 12 | let deployedContractAddress = utils.getCreate2Address(deployerAddress, salt, utils.keccak256(deployTxData)); 13 | 14 | let balance = await deployerContract.provider.getBalance(deployedContractAddress); 15 | // console.log("Balance", utils.formatEther(balance)); 16 | 17 | // Gas estimation must be manual 18 | await (await deployerContract.deploy(deployTxData, salt, { gasLimit: 100000 })).wait(1); 19 | 20 | // code = await deployerContract.provider.getCode(deployedContractAddress); 21 | // console.log("Code", code); 22 | balance = await deployerContract.provider.getBalance(deployedContractAddress); 23 | // console.log("Balance", utils.formatEther(balance)); 24 | 25 | let block = await deployerContract.provider.getBlockNumber(); 26 | // console.log("block", block); 27 | return deployedContractAddress; 28 | }; 29 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "burn4ever", 3 | "version": "0.0.1", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "compile": "npx hardhat compile", 8 | "test": "npx hardhat test" 9 | }, 10 | "author": "", 11 | "license": "MIT", 12 | "devDependencies": { 13 | "@ethersproject/abi": "^5.3.1", 14 | "@ethersproject/bytes": "^5.3.0", 15 | "@ethersproject/providers": "^5.3.1", 16 | "@nomiclabs/hardhat-ethers": "^2.0.2", 17 | "@nomiclabs/hardhat-etherscan": "^2.1.3", 18 | "@nomiclabs/hardhat-waffle": "^2.0.1", 19 | "@typechain/ethers-v5": "^7.0.1", 20 | "@typechain/hardhat": "^2.0.2", 21 | "@types/chai": "^4.2.18", 22 | "@types/mocha": "^8.2.2", 23 | "@types/node": "^15.12.2", 24 | "chai": "^4.3.4", 25 | "eslint": "^7.28.0", 26 | "eslint-config-prettier": "^8.3.0", 27 | "ethereum-waffle": "^3.3.0", 28 | "ethers": "^5.3.1", 29 | "hardhat": "^2.3.3", 30 | "hardhat-gas-reporter": "^1.0.4", 31 | "prettier": "^2.3.1", 32 | "prettier-plugin-solidity": "^1.0.0-beta.13", 33 | "solhint": "^3.3.6", 34 | "solhint-plugin-prettier": "^0.0.5", 35 | "ts-generator": "^0.1.1", 36 | "ts-node": "^10.0.0", 37 | "typechain": "^5.0.0", 38 | "typescript": "^4.3.2" 39 | }, 40 | "dependencies": { 41 | "dotenv": "^10.0.0" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/Burn4Ever.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "ethers"; 2 | import { deployContract, VERSION } from "../src/deploy"; 3 | import { deployDeployer } from "../src/deployer"; 4 | import { Burn4Ever__factory } from "../typechain"; 5 | 6 | import * as dotenv from "dotenv"; 7 | dotenv.config(); 8 | 9 | const GWEI = 1000000000; 10 | 11 | const MNEMONIC = process.env.MNEMONIC || ""; 12 | if (MNEMONIC === "") { 13 | console.warn("Must provide MNEMONIC environment variable"); 14 | process.exit(1); 15 | } 16 | 17 | let provider = new ethers.providers.AlchemyProvider("mainnet"); 18 | 19 | const deployer = ethers.Wallet.fromMnemonic(MNEMONIC).connect(provider); 20 | 21 | async function main(): Promise { 22 | let deployerContract = await deployDeployer(deployer); 23 | console.log("Deployer contract address", deployerContract.address); 24 | 25 | let nonce = await deployer.getTransactionCount(); 26 | console.log("Current nonce", nonce); 27 | const burnForeverFactory = new Burn4Ever__factory(deployer); 28 | let deployTx = burnForeverFactory.getDeployTransaction(); 29 | if (deployTx.data) { 30 | let burnForeverAddress = ethers.utils.getCreate2Address( 31 | deployerContract.address, 32 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 33 | ethers.utils.keccak256(deployTx.data), 34 | ); 35 | console.log("Burn 4 Ever Address", burnForeverAddress); 36 | 37 | let burnForeverBalance = await provider.getBalance(burnForeverAddress); 38 | console.log("B4EVER Balance before", ethers.utils.formatEther(burnForeverBalance)); 39 | 40 | let deployedAddress = await deployContract( 41 | deployerContract, 42 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 43 | deployTx.data, 44 | ); 45 | 46 | let nonce = await deployer.getTransactionCount(); 47 | console.log("Deployer nonce", nonce); 48 | 49 | console.log("B4EVER address", deployedAddress); 50 | if (deployedAddress) { 51 | let burnForeverBalanceAfter = await provider.getBalance(burnForeverAddress); 52 | console.log("B4EVER Balance after", ethers.utils.formatEther(burnForeverBalanceAfter)); 53 | } 54 | } 55 | } 56 | 57 | main(); 58 | -------------------------------------------------------------------------------- /src/deployer.ts: -------------------------------------------------------------------------------- 1 | import { Signer, Contract, utils } from "ethers"; 2 | 3 | // Another optional generic factor 4 | // 0xfAC000a12dA42B871c0AaD5F25391aAe62958Db1 5 | 6 | // create2 factory exists at 0xce0042B868300000d44A59004Da54A005ffdcf9f on all networks 7 | // there are other versions of this, see https://ethereum-magicians.org/t/erc-2470-singleton-factory/3933 8 | export const deployerAddress: string = "0xce0042B868300000d44A59004Da54A005ffdcf9f"; 9 | export const deployerABI = [ 10 | { 11 | inputs: [ 12 | { internalType: "bytes", name: "_initCode", type: "bytes" }, 13 | { internalType: "bytes32", name: "_salt", type: "bytes32" }, 14 | ], 15 | name: "deploy", 16 | outputs: [ 17 | { 18 | internalType: "address payable", 19 | name: "createdContract", 20 | type: "address", 21 | }, 22 | ], 23 | stateMutability: "nonpayable", 24 | type: "function", 25 | }, 26 | ]; 27 | 28 | // method for deployment specified here: https://eips.ethereum.org/EIPS/eip-2470 29 | const deployerRawTransaction = 30 | "0xf9016c8085174876e8008303c4d88080b90154608060405234801561001057600080fd5b50610134806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80634af63f0214602d575b600080fd5b60cf60048036036040811015604157600080fd5b810190602081018135640100000000811115605b57600080fd5b820183602082011115606c57600080fd5b80359060200191846001830284011164010000000083111715608d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925060eb915050565b604080516001600160a01b039092168252519081900360200190f35b6000818351602085016000f5939250505056fea26469706673582212206b44f8a82cb6b156bfcc3dc6aadd6df4eefd204bc928a4397fd15dacf6d5320564736f6c634300060200331b83247000822470"; 31 | const deployerAmount = utils.parseEther("0.0247"); 32 | /** 33 | * Address of the account that deploys the deployer 34 | */ 35 | const deployerDeployerAddress = "0xBb6e024b9cFFACB947A71991E386681B1Cd1477D"; 36 | 37 | /** 38 | * Deploys the deployer contract. Does nothing if the deployer contract has already been deployed 39 | * @param admin 40 | */ 41 | export const deployDeployer = async (admin: Signer) => { 42 | if (!admin.provider) throw new Error("Admin must be attached to a provider."); 43 | 44 | // check if the deployer exists, and if not then lets deploy it 45 | const code = await admin.provider!.getCode(deployerAddress); 46 | if (!code || code === "0x" || code === "0x0") { 47 | console.log("No deployer detected, deploying deployer"); 48 | // first send funds to the deployer deployer address 49 | await admin.sendTransaction({ 50 | to: deployerDeployerAddress, 51 | value: deployerAmount, 52 | }); 53 | 54 | // now execute the deployer transaction 55 | await admin.provider!.sendTransaction(deployerRawTransaction); 56 | } 57 | 58 | return new Contract(deployerAddress, deployerABI, admin); 59 | }; 60 | -------------------------------------------------------------------------------- /hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { task } from "hardhat/config"; 2 | 3 | import { config as dotenvConfig } from "dotenv"; 4 | import { resolve } from "path"; 5 | dotenvConfig({ path: resolve(__dirname, "./.env") }); 6 | 7 | import { HardhatUserConfig } from "hardhat/types"; 8 | import { NetworkUserConfig } from "hardhat/types"; 9 | 10 | import "@nomiclabs/hardhat-waffle"; 11 | import "@typechain/hardhat"; 12 | import "hardhat-gas-reporter"; 13 | import "@nomiclabs/hardhat-ethers"; 14 | import "@nomiclabs/hardhat-waffle"; 15 | import "@nomiclabs/hardhat-etherscan"; 16 | import path from "path"; 17 | import fs from "fs"; 18 | 19 | const chainIds = { 20 | ganache: 1337, 21 | goerli: 5, 22 | hardhat: 31337, 23 | kovan: 42, 24 | mainnet: 1, 25 | rinkeby: 4, 26 | ropsten: 3, 27 | }; 28 | 29 | const MNEMONIC = process.env.MNEMONIC || ""; 30 | const ETHERSCAN_API_KEY = process.env.ETHERSCAN_API_KEY || ""; 31 | const INFURA_API_KEY = process.env.INFURA_API_KEY || ""; 32 | const ALCHEMY_KEY = process.env.ALCHEMY_KEY || ""; 33 | 34 | // This is a sample Hardhat task. To learn how to create your own go to 35 | // https://hardhat.org/guides/create-task.html 36 | task("accounts", "Prints the list of accounts", async (args, hre) => { 37 | const accounts = await hre.ethers.getSigners(); 38 | 39 | for (const account of accounts) { 40 | console.log(await account.address); 41 | } 42 | }); 43 | 44 | function createTestnetConfig(network: keyof typeof chainIds): NetworkUserConfig { 45 | const url: string = "https://" + network + ".infura.io/v3/" + INFURA_API_KEY; 46 | return { 47 | accounts: { 48 | count: 10, 49 | initialIndex: 0, 50 | mnemonic: MNEMONIC, 51 | path: "m/44'/60'/0'/0", 52 | }, 53 | chainId: chainIds[network], 54 | url, 55 | }; 56 | } 57 | 58 | // You need to export an object to set up your config 59 | // Go to https://hardhat.org/config/ to learn more 60 | 61 | const config: HardhatUserConfig = { 62 | defaultNetwork: "hardhat", 63 | networks: { 64 | hardhat: { 65 | accounts: { 66 | mnemonic: MNEMONIC, 67 | }, 68 | chainId: chainIds.hardhat, 69 | // forking: { 70 | // //url: `https://eth-mainnet.alchemyapi.io/v2/${ALCHEMY_ID}`, 71 | // url: "http://192.168.1.25:8545", 72 | // blockNumber: 12379051, 73 | // }, 74 | }, 75 | goerli: createTestnetConfig("goerli"), 76 | kovan: createTestnetConfig("kovan"), 77 | rinkeby: createTestnetConfig("rinkeby"), 78 | ropsten: createTestnetConfig("ropsten"), 79 | }, 80 | solidity: { 81 | compilers: [ 82 | { 83 | version: "0.6.12", 84 | }, 85 | { 86 | version: "0.6.6", 87 | }, 88 | ], 89 | }, 90 | etherscan: { 91 | apiKey: ETHERSCAN_API_KEY, 92 | }, 93 | gasReporter: { 94 | currency: "USD", 95 | gasPrice: 100, 96 | // enabled: process.env.REPORT_GAS ? true : false, 97 | }, 98 | }; 99 | 100 | export default config; 101 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Burn 4 Ever 2 | 3 | Do you _really_ want to burn some ETH? 4 | 5 | Sending it to 6 | `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). 7 | 8 | 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. 9 | 10 | With Burn4Ever, ETH is really burned, forever :) 11 | 12 | ### How does it work? 13 | 14 | A self destructing contract can send the remaining ETH in the contract to any address. Specifically, to itself. 15 | ETH sent to the contract this way is truly burned and has no way to be restored (well maybe via a fork). 16 | 17 | Thanks to `CREATE2` and [ERC-2470](https://eips.ethereum.org/EIPS/eip-2470) we can have a constant contract address, that anyone can deploy a contract to. 18 | The contract has a single instruction: Burn all the ETH in the balance. 19 | 20 | If there is ETH in the contract, once it is initiated, the ETH will be burned. 21 | 22 | To compensate the burner, 0.1% of the ETH in the contract will be sent to the burner (Yay MEV!) 23 | 24 | The contract will always be on the same address on all chains that support ERC-2470. 25 | 26 | ### Address: 27 | 28 | [0xc326af5d2699b6554b5ed11cfc5829e373ae6284](https://etherscan.io/address/0xc326af5d2699b6554b5ed11cfc5829e373ae6284) 29 | 30 | ### Address generation: 31 | 32 | #### Nonce 33 | 34 | ``` 35 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes("BURN4EVER")); 36 | ``` 37 | 38 | #### ByteCode 39 | 40 | ``` 41 | 0x608060405234801561001057600080fd5b503273ffffffffffffffffffffffffffffffffffffffff166103e8478161003357fe5b04600067ffffffffffffffff8111801561004c57600080fd5b506040519080825280601f01601f19166020018201604052801561007f5781602001600182028036833780820191505090505b506040518082805190602001908083835b602083106100b35780518252602082019150602081019050602083039250610090565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610115576040519150601f19603f3d011682016040523d82523d6000602084013e61011a565b606091505b5050503073ffffffffffffffffffffffffffffffffffffffff16fffe 42 | ``` 43 | 44 | #### Creator 45 | 46 | ``` 47 | 0xce0042B868300000d44A59004Da54A005ffdcf9f 48 | ``` 49 | 50 | #### Verify Address 51 | 52 | ``` 53 | let burnForeverAddress = ethers.utils.getCreate2Address( 54 | deployerContract.address, 55 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 56 | ethers.utils.keccak256(deployTx.data), 57 | ); 58 | ``` 59 | 60 | ## Library 61 | 62 | The library shows an example and a code snippet to deploy the contract. 63 | 64 | ### Pre Requisites 65 | 66 | Before running any command, make sure to install dependencies: 67 | 68 | ```sh 69 | $ yarn install 70 | ``` 71 | 72 | ### Compile 73 | 74 | Compile the smart contracts with Hardhat: 75 | 76 | ```sh 77 | $ yarn compile 78 | ``` 79 | 80 | ### Test 81 | 82 | Run the Mocha tests: 83 | 84 | ```sh 85 | $ yarn test 86 | ``` 87 | 88 | ### Burn ETH in the contract 89 | 90 | Polupate the `.env` file as seen in the example file `.env.example` 91 | 92 | ``` 93 | ts-node ./src/Burn4Ever.ts 94 | ``` 95 | -------------------------------------------------------------------------------- /test/burn4ever.test.ts: -------------------------------------------------------------------------------- 1 | import { ethers } from "hardhat"; 2 | import chai from "chai"; 3 | import { solidity } from "ethereum-waffle"; 4 | import { Burn4Ever__factory } from "../typechain"; 5 | import { deployContract, VERSION } from "../src/deploy"; 6 | import { deployDeployer } from "../src/deployer"; 7 | import { Contract } from "ethers"; 8 | 9 | chai.use(solidity); 10 | const { expect } = chai; 11 | 12 | describe("Test burn forever contract", () => { 13 | let deployerContract: Contract; 14 | 15 | describe("Pay", async () => { 16 | it("Should burn the eth forever", async () => { 17 | const [deployer, payer] = await ethers.getSigners(); 18 | deployerContract = await deployDeployer(deployer); 19 | console.log("Deployer contract address", deployerContract.address); 20 | 21 | let nonce = await deployer.getTransactionCount(); 22 | console.log("Current nonce", nonce); 23 | const burnForeverFactory = new Burn4Ever__factory(deployer); 24 | let deployTx = burnForeverFactory.getDeployTransaction(); 25 | console.log(deployTx.data); 26 | if (deployTx.data) { 27 | let burnForeverAddress = ethers.utils.getCreate2Address( 28 | deployerContract.address, 29 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 30 | ethers.utils.keccak256(deployTx.data), 31 | ); 32 | console.log("Brun forever address", burnForeverAddress); 33 | await payer.sendTransaction({ to: burnForeverAddress, value: ethers.utils.parseEther("1.0") }); 34 | 35 | let burnForeverBalance = await ethers.provider.getBalance(burnForeverAddress); 36 | console.log("B4EVER Balance before", ethers.utils.formatEther(burnForeverBalance)); 37 | 38 | let deployedAddress = await deployContract( 39 | deployerContract, 40 | // otpFactory, 41 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 42 | deployTx.data, 43 | ); 44 | 45 | let nonce = await deployer.getTransactionCount(); 46 | console.log("Deployer nonce", nonce); 47 | 48 | console.log("B4EVER address", deployedAddress); 49 | if (deployedAddress) { 50 | let burnForeverBalanceAfter = await ethers.provider.getBalance(burnForeverAddress); 51 | console.log("B4EVER Balance after", ethers.utils.formatEther(burnForeverBalanceAfter)); 52 | 53 | expect(burnForeverBalanceAfter).to.be.equal(0); 54 | } 55 | } 56 | }); 57 | 58 | it("Should still be 0 after contract is reiniated", async () => { 59 | const [deployer, payer] = await ethers.getSigners(); 60 | deployerContract = await deployDeployer(deployer); 61 | console.log("Deployer contract address", deployerContract.address); 62 | 63 | let nonce = await deployer.getTransactionCount(); 64 | console.log("Current nonce", nonce); 65 | const burnForeverFactory = new Burn4Ever__factory(deployer); 66 | let deployTx = burnForeverFactory.getDeployTransaction(); 67 | if (deployTx.data) { 68 | let burnForeverAddress = ethers.utils.getCreate2Address( 69 | deployerContract.address, 70 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 71 | ethers.utils.keccak256(deployTx.data), 72 | ); 73 | console.log("Brun forever address", burnForeverAddress); 74 | await payer.sendTransaction({ to: burnForeverAddress, value: ethers.utils.parseEther("1.0") }); 75 | 76 | let burnForeverBalance = await ethers.provider.getBalance(burnForeverAddress); 77 | console.log("B4EVER Balance before", ethers.utils.formatEther(burnForeverBalance)); 78 | 79 | let deployedAddress = await deployContract( 80 | deployerContract, 81 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 82 | deployTx.data, 83 | ); 84 | 85 | let nonce = await deployer.getTransactionCount(); 86 | console.log("Deployer nonce", nonce); 87 | 88 | console.log("B4EVER address", deployedAddress); 89 | if (deployedAddress) { 90 | let burnForeverBalanceAfter = await ethers.provider.getBalance(burnForeverAddress); 91 | console.log("B4EVER Balance after", ethers.utils.formatEther(burnForeverBalanceAfter)); 92 | 93 | expect(burnForeverBalanceAfter).to.be.equal(0); 94 | 95 | await deployContract( 96 | deployerContract, 97 | ethers.utils.keccak256(ethers.utils.toUtf8Bytes(VERSION)), 98 | deployTx.data, 99 | ); 100 | 101 | if (deployedAddress) { 102 | let burnForeverBalanceAfter = await ethers.provider.getBalance(burnForeverAddress); 103 | console.log("B4EVER Balance after reinit", ethers.utils.formatEther(burnForeverBalanceAfter)); 104 | 105 | expect(burnForeverBalanceAfter).to.be.equal(0); 106 | } 107 | } 108 | } 109 | }); 110 | }); 111 | }); 112 | --------------------------------------------------------------------------------