Skip to content

Instantly share code, notes, and snippets.

View Amxx's full-sized avatar

Hadrien Croubois Amxx

View GitHub Profile
@Amxx
Amxx / 0_EthCC2024_DatastructuresforVerkle.txt
Last active July 3, 2024 07:39
EthCC2024-DatastructuresForVerkle
Mapping 0x304BC89A59E41902B58934E0642772830CcA744d
721 0x9ed6c5564541b130cbc7436bb6654f9144bbe9c0cf2b44c8464388b879395586 42180
155 0xf262d37ae1c0ea0878f60cc3950cb170e55e21ee96b2e219d243c1bed44b9f87 56089
4337 0x8c3d7a8727a5cad487721f898aa42e8b0e82522b134a6d825819b6db91a94c58 46801
191 0x201376e974ba73b059efb473bea9ecda54a2be4a4f83c45f094bf28f8173e6ab 60510
20 0xb9f16779eb69d6675606fe7304b74d24f90d9e754412863d7566766b5b119da6 68810
7702 0xb07efe99850a1e62f24b2faf01ce65f70ee4444edd9fad86f15b07285545de7d 46801
1559 0xceec4797d1fd0abd248120dd31c7a20943e7e667739defcf8a24595f196d73ae 60522
712 0x025e447415c3cc3053201332e288abc28cf5d351eb347cf0cf38c52c738d2913 60522
1363 0x292d6b88cb79fe9355b66db13247df32e727275f4a52a66c350a3ccdf055f3e0 46801
@Amxx
Amxx / project...ERC1363Upgradeable.sol
Last active September 30, 2023 17:04
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.21+commit.d9974bed.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity 0.8.21;
import { IERC165Upgradeable, ERC165Upgradeable } from "./ERC165Upgradeable.sol";
import { IERC1363Upgradeable } from "./IERC1363Upgradeable.sol";
contract ERC1363Upgradeable is IERC1363Upgradeable, ERC165Upgradeable {
function supportsInterface(bytes4 id) public view virtual override returns (bool) {
return id == type(IERC1363Upgradeable).interfaceId || super.supportsInterface(id);
}
@Amxx
Amxx / UniversalWrapper.sol
Last active August 9, 2023 08:08
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "@openzeppelin/contracts/interfaces/IERC721.sol";
import "@openzeppelin/contracts/interfaces/IERC721Receiver.sol";
import "@openzeppelin/contracts/interfaces/IERC1155.sol";
import "@openzeppelin/contracts/interfaces/IERC1155Receiver.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
@Amxx
Amxx / FullTestContract.sol
Last active February 8, 2022 16:28
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/proxy/Clones.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/StorageSlot.sol";
contract FullTestContract {
event ValueBool(string descr, bool value);
process.stdin.setEncoding('utf-8');
const readline = require('readline').createInterface({ input: process.stdin });
const buffer = [];
const uniqueBy = (array, selector) => array
.map(selector)
.filter((e, i, a) => a.indexOf(e) === i)
.map(v => array.find(e => selector(e) === v));
pragma solidity ^0.6.0;
interface IERC20
{
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

Keybase proof

I hereby claim:

  • I am amxx on github.
  • I am amxx (https://keybase.io/amxx) on keybase.
  • I have a public key ASCpx2xqZIp0Tx-Mi0azHN7k2zI-5ndrXSCszQ-VYCyFeQo

To claim this, I am signing this object:

@Amxx
Amxx / App.sol
Created June 12, 2019 19:20
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.9+commit.e560f70d.js&optimize=true&gist=
pragma solidity ^0.5.8;
import "./Ownable.sol";
contract App is Ownable
{
/**
* Members
*/
string public m_appName;