- Fork https://github.com/github/dmca
- Download latest youtube-dl source code from https://yt-dl.org/latest
- Extract
tar -xvf youtube-dl-2020.09.20.tar.gz
- Push code to your fork as the GitHub CEO
tar -xvf youtube-dl-2020.09.20.tar.gz
// RLP encoded transaction | |
const rawTxHex = '0xed8205fc843b9aca00825208944592d8f8d7b001e72cb26a73e4fa1806a51ac79d88016345785d8a000080808080' | |
// using rlp package to decode values | |
const rlp = require('rlp') | |
const decoded = rlp.decode(rawTxHex) | |
console.log(decoded) | |
/* | |
[ <Buffer 05 fc>, | |
<Buffer 3b 9a ca 00>, |
Using newer compiler versions and the optimizer gives gas optimizations and additional safety checks for free!
The advantages of versions 0.8.*
over <0.8.0
are:
0.8.0
(can be more gas efficient than some
library based safemath).0.8.2
, leads to cheaper runtime gas.
Especially relevant when the contract has small functions. For// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.11; | |
import "./utils/Bytecode.sol"; | |
contract CREATE07Proxy { | |
error ErrorDestroyingContract(); | |
error ErrorDeployingToDeterministicAddress(); | |
function deployDataContract(bytes memory data) external { |
// SPDX-License-Identifier: GPL-3.0-or-later | |
pragma solidity >=0.8.4; | |
/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. | |
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol) | |
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) | |
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. | |
abstract contract ERC20 { | |
/*/////////////////////////////////////////////////////////////// |
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
run-ci: | |
runs-on: ubuntu-latest |
As of 2022/7/6, Sepolia has switched to PoS. The window to do some mining has closed.
It's mid 2022, Ethereum is still PoW and motoring towards merge / PoS. Surviving testnets will be Sepolia - currently PoW - and Goerli. Ropsten will be merged and then deprecated, Rinkeby and Kovan won't be merged.
I want to "get ready" for some Sepolia testing pre- and post-merge. Sepolia will not have a public validator set; testing post-merge will be limited to running applications on it. As Sepolia is PoW, I can actually go mine myself some SepplETH. Here's how.
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
contract GasTesting { | |
function testInlined(uint256 length) external view returns (uint256 gasUsed) { | |
uint256 total; | |
uint256 startGas = gasleft(); | |
for (uint256 i; i < length; i = _uncheckedInc(i)) { | |
total += i; |
There's two meaning of wildcards in paths for file collections.
*
is a simple, non-recursive wildcard representing zero or more characters which you can use for paths and file names.**
is a recursive wildcard which can only be used with paths, not file names.For examples,
/var/log/**
will match all files in /var/log
and all files in all child directories, recursively./var/log/**/*.log
will match all files whose names end in .log
in /var/log
and all files in all child directories, recursively./home/*/.bashrc
will match all .bashrc
files in all user's home
directories.// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.7; | |
contract SelectorsAndSignatures { | |
address public s_someAddress; | |
uint256 public s_amount; | |
function getSelectorOne() public pure returns(bytes4 selector){ | |
selector = bytes4(keccak256(bytes("transfer(address,uint256)"))); | |
} |