DUPN_OPCODE
=0xE6
SWAPN_OPCODE
=0xE7
Upon activation of this EIP, introduce two new instructions SWAPN
and DUPN
, both with an immediate operand n ∈ [17, 235]
.
SWAPN n
:
#!/usr/bin/env bash | |
set -euo pipefail | |
rm -rf ~/.local/{bin/nvim,lib/nvim,share/nvim,share/man/man1/nvim.1,share/icons/hicolor/128x128/apps/nvim.png} | |
xattr -c nvim-macos-arm64.tar.gz | |
tar xzf nvim-macos-arm64.tar.gz --strip-components 1 -C ~/.local/ | |
rm nvim-macos-arm64.tar.gz |
code main : 0 -> ! { | |
push0 | |
push0 | |
callf other | |
stop | |
} | |
code other : 2 -> 1 { | |
rjumpi end | |
pop |
@frangio: is there a list of all the consistency/security checks abi coder v2 | |
does? e.g. that offsets are within bounds | |
@ekpyron: We're currently lacking exhaustive documentation on it, unfortunately | |
- it came up a few times recently and we want to improve docs around it, | |
though. But as a brief informal summary: Calldata validation involves at least | |
(I may be missing something else myself out of my head) range-checks for | |
values, bounds-checks and size-checks for arrays and bounds checks against | |
overall calldata size. In particular, what's lacking documentation is indeed | |
when precisely it happens. For performance reasons, we don't necessarily |
use std::mem::MaybeUninit; | |
pub struct Buffered<I: Iterator, const N: usize> { | |
iter: I, | |
count: usize, | |
next: usize, | |
buf: [MaybeUninit<I::Item>; N], | |
} | |
impl<I: Iterator, const N: usize> Buffered<I, N> { |
ef000101000402000100110400200000000003365f5f37365fd10000f93d5f5f3e5f3df3 |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.28; | |
struct PackedUserOperation { | |
address sender; | |
uint256 nonce; | |
bytes initCode; | |
bytes callData; | |
bytes32 accountGasLimits; | |
uint256 preVerificationGas; |
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.13; | |
import {Test} from "forge-std/Test.sol"; | |
contract SwapTest is Test { | |
event Gasused(uint); | |
event Swap( | |
bytes32 indexed id, |
import Std.Data.Nat.Lemmas | |
import Std.Tactic.Omega | |
import Std.Tactic.Simpa | |
def fib (n : Nat) := | |
match n with | |
| 0 | 1 => n | |
| n' + 2 => fib (n' + 1) + fib n' | |
def fastfib (n : Nat) := loop n 1 0 |
"use strict"; | |
const defaultOptions = { | |
reverse: true, | |
python: false | |
} | |
function merge(sequences) { | |
let result = []; | |
sequences = sequences.map(s => s.slice()); |