Skip to content

Instantly share code, notes, and snippets.

@deliriusz
Created June 29, 2023 18:20
Show Gist options
  • Save deliriusz/aa58fbcd297ba68d73489f28bc54b399 to your computer and use it in GitHub Desktop.
Save deliriusz/aa58fbcd297ba68d73489f28bc54b399 to your computer and use it in GitHub Desktop.
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
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment