Skip to content

Instantly share code, notes, and snippets.

@seaona
seaona / create3.sol
Created August 9, 2023 09:11
Create3 Solidity
pragma solidity 0.8.18;
import "https://github.com/0xsequence/create3/contracts/Create3.sol";
contract Child {
uint8 public a;
function hola() public {
a = 5;
}
}
@seaona
seaona / assembly.sol
Last active August 9, 2023 08:36
Yul memory storage
pragma solidity 0.8.18;
contract Assembly {
uint256 a = 9; // Slot 0
uint256 b = 8; // Slot 1
uint256 c = 7; // Slot 2
uint256 d = 6; // Slot 3
uint8 e = 4; // Slot 4
uint8 f =5; // Slot 4
@seaona
seaona / ECDSA-malleability
Created September 21, 2021 07:20
ECDSA malleability demonstration
const EC = require('elliptic').ec;
// Create and initialize EC context
const ec = new EC('secp256k1');
// Generate keys
const key = ec.genKeyPair();
console.log(ec)
//console.log(key)
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {

Keybase proof

I hereby claim:

  • I am seaona on github.
  • I am seaona (https://keybase.io/seaona) on keybase.
  • I have a public key ASC4dBnuN3hBFM3ru2z0jG1pfGPbGHZeLyi1OsczlkAuqwo

To claim this, I am signing this object: