Skip to content

Instantly share code, notes, and snippets.

View deliriusz's full-sized avatar

deliriusz

View GitHub Profile
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "hardhat/console.sol";
contract TryCatchCaller {
TryCatchCallee calee;
constructor () {
calee = new TryCatchCallee();
@deliriusz
deliriusz / StorNinja.sol
Created June 29, 2023 18:20
Snippet showing that you can create no code smart contract, setting storage variables
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
contract StorNinja {
constructor() {
assembly {
sstore(0x0, 0x1)
sstore(0x1, 0x2)
return(0x0, 0x00) // return no code
@deliriusz
deliriusz / Unlockooor.sol
Created February 28, 2023 11:53
Try to unlock the contract for eternal glory
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
interface IERC20 {
function balanceOf(address) external view returns (uint256);
function transfer(address, uint256) external view returns (bool);
}
contract Unlockooor {
bool public isUnlocked;