sudo apt update && sudo apt upgrade
π―
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pragma version ^0.3.10 | |
""" | |
@title P256 Signature Verification Function | |
@custom:contract-name P256Verifier | |
@license GNU Affero General Public License v3.0 only | |
@author pcaversaccio | |
@notice The `verify` function can be used to natively (currently | |
only supported on Polygon Mumbai test network) verify a | |
P256 (a.k.a. secp256r1 elliptic curve) signature. For more | |
technical details, please refer to EIP-7212: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
// File: @openzeppelin/contracts/math/SafeMath.sol | |
// Original license: SPDX_License_Identifier: MIT | |
pragma solidity >=0.6.0 <0.8.0; | |
/** | |
* @dev Wrappers over Solidity's arithmetic operations with added overflow |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version ^0.3.10 | |
_CREATE2_PREFIX: constant(bytes32) = 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494 | |
@external | |
@pure | |
def compute_create2_address_zksync(salt: bytes32, bytecode_hash: bytes32, deployer: address, input: Bytes[4_096]=b"") -> address: | |
constructor_input_hash: bytes32 = keccak256(input) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @version ^0.3.9 | |
@internal | |
@pure | |
def _to_2098_format(signature: Bytes[65]) -> Bytes[64]: | |
""" | |
@dev Transforms a standard signature into an EIP-2098 | |
(https://eips.ethereum.org/EIPS/eip-2098) compliant | |
signature. | |
@param signature The secp256k1 64/65-bytes signature. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from re import sub | |
from eth_utils import keccak | |
from caseconverter import camelcase, flatcase, macrocase, pascalcase, snakecase | |
""" | |
Biased Assumption: Every single word of an interface function, event or custom error definition, | |
or anything else contained in an interface definition and used as an identifier, is capitalised | |
and concatenated with an underscore before running `to_checksum_name`. | |
Examples: `TRANSFER_FROM`, `BALANCE_OF`, `$I_HATE_PHP`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CL mainnet bootnodes: https://github.com/eth-clients/eth2-networks/blob/master/shared/mainnet/bootstrap_nodes.txt. | |
### ENR | |
# Teku team's bootnodes | |
enr:-KG4QOtcP9X1FbIMOe17QNMKqDxCpm14jcX5tiOE4_TyMrFqbmhPZHK_ZPG2Gxb1GE2xdtodOfx9-cgvNtxnRyHEmC0ghGV0aDKQ9aX9QgAAAAD__________4JpZIJ2NIJpcIQDE8KdiXNlY3AyNTZrMaEDhpehBDbZjM_L9ek699Y7vhUJ-eAdMyQW_Fil522Y0fODdGNwgiMog3VkcIIjKA | |
enr:-KG4QL-eqFoHy0cI31THvtZjpYUu_Jdw_MO7skQRJxY1g5HTN1A0epPCU6vi0gLGUgrzpU-ygeMSS8ewVxDpKfYmxMMGhGV0aDKQtTA_KgAAAAD__________4JpZIJ2NIJpcIQ2_DUbiXNlY3AyNTZrMaED8GJ2vzUqgL6-KD1xalo1CsmY4X1HaDnyl6Y_WayCo9GDdGNwgiMog3VkcIIjKA | |
# Prylab team's bootnodes | |
enr:-Ku4QImhMc1z8yCiNJ1TyUxdcfNucje3BGwEHzodEZUan8PherEo4sF7pPHPSIB1NNuSg5fZy7qFsjmUKs2ea1Whi0EBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpD1pf1CAAAAAP__________gmlkgnY0gmlwhBLf22SJc2VjcDI1NmsxoQOVphkDqal4QzPMksc5wnpuC3gvSC8AfbFOnZY_On34wIN1ZHCCIyg |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: WTFPL | |
pragma solidity ^0.8.19; | |
contract NestedStruct { | |
struct Inside { | |
address a1; | |
address a2; | |
address a3; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: WTFPL | |
pragma solidity ^0.8.19; | |
contract TryToReachMe { | |
constructor() payable { | |
assert(msg.value == 1 wei); | |
} | |
function tryMeBabe(address addr) public payable { | |
uint256 balance = address(this).balance; |