Skip to content

Instantly share code, notes, and snippets.

View MerlinEgalite's full-sized avatar
🦋

Merlin Egalite MerlinEgalite

🦋
View GitHub Profile
@MerlinEgalite
MerlinEgalite / CreateSelfdestruct.sol
Last active May 26, 2023 06:24
Tornado Cash Governance Hack
pragma solidity >=0.8.0;
import "forge-std/Test.sol";
import "forge-std/console2.sol";
contract ContractA {
function destroy() public {
selfdestruct(payable(0));
}
@MerlinEgalite
MerlinEgalite / verify.sh
Last active December 14, 2022 11:00
Command line to verify contracts with forge
forge verify-contract --chain-id 1 --num-of-optimizations 200 --constructor-args $(cast abi-encode "constructor(address)" 0x) --compiler-version v0.8.16 <the_contract_address> src/MyToken.sol:MyToken <your_etherscan_api_key>
@MerlinEgalite
MerlinEgalite / Deployer.sol
Last active June 21, 2022 08:46
Deployment contract
// SPDX-License-Identifier: LGPL-3.0-only
pragma solidity >=0.7.0 <0.9.0;
interface IOwnable {
function transferOwnership(address) external;
}
contract Deployer {
event ContractCreation(address newContract);