我正在尝试对字节进行切片,例如
bytes memory bytesData = result[32:64];
Run Code Online (Sandbox Code Playgroud)
及其投掷:
TypeError: Index range access is only supported for dynamic calldata arrays.
Run Code Online (Sandbox Code Playgroud)
它与 calldata 配合得很好...
记忆呢?
如何bytes在 Solidity 中对静态调用进行硬编码?
我试过了:
bytes memory data = "0xfeaf968c";
bytes memory data = \xfeaf968c";
当我手动输入它作为输入参数时,它可以工作,而当我以这种格式硬编码时,当我在外部调用它时,它会因某种原因失败。
当尝试在 Windows 11 上使用 wsl 2 安装 nvm 时,它会抛出:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.2/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:09 --:--:-- 0curl: (6) Could not resolve host: raw.githubusercontent.com
Run Code Online (Sandbox Code Playgroud)
当我尝试ping google.com它时出错,而ping 8.8.8.8有效!?!