First, let's understand how Solidity stores data:
- Storage slots are 32-byte (256-bit) containers.
- Each storage variable gets assigned to slots sequentially.
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| # Simple security scanner for vulnerable npm packages | |
| # Checks all repos in an organization for specific package versions | |
| # | |
| # REQUIREMENTS FOR MACOS: | |
| # ----------------------- | |
| # 1. Install GitHub CLI: | |
| # brew install gh |
| #!/usr/bin/env bash | |
| # cast is required: https://book.getfoundry.sh/getting-started/installation | |
| [ ! -x "$(command -v cast)" ] && echo "cast is not installed, please run 'curl -L https://foundry.paradigm.xyz | bash'." && exit 1 | |
| SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
| ETH_KEYSTORE_DIR=$SCRIPT_DIR/test-keystore | |
| if [ ! -d "$ETH_KEYSTORE_DIR" ]; then | |
| echo "Creating test keystore" |
| # Lookup your existing disks and volumes | |
| diskutil apfs list | |
| # We will modify diskX | |
| disk=diskX | |
| # Assuming that the volume diskXs1 already exist, we need to mark it as a data volume before adding it to a group. | |
| diskutil apfs chrole ${disk}s1 D | |
| # The volume group cannot be created directly. It will be created during the creation of the 2nd volume. |
| #!/bin/bash | |
| if [[ ! "$1" ]] | |
| then | |
| echo "Usage: $(basename $0) [address]" | |
| exit 1 | |
| fi | |
| address=$1 |
| { | |
| "terminal.integrated.profiles.osx": { | |
| "Bash (from brew)": { | |
| "path": "/usr/local/bin/bash", | |
| "args": ["-l"] | |
| } | |
| }, | |
| "terminal.integrated.defaultProfile.osx": "Bash (from brew)" | |
| } |
| import { ethers } from "hardhat"; | |
| async function main() { | |
| let abi = `[{"constant":false,"inputs":[{"name":"_pinakion","type":"address"}],"name":"changePinakion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"RNBlock","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"disputesWithoutJurors","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"passPhase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"governor","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lastDelayedSetStake","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_d |
| #!/bin/bash | |
| npm list -g npm-dependants || npm install -g npm-dependants | |
| for p in $(npm search @kleros --parseable | cut -f1 | sort) | |
| do | |
| echo $p | |
| npm-dependants $p | sed 's/^/├─ /g' | |
| echo | |
| done |
| /*! For license information please see mermaid-plugin.webpack.js.LICENSE.txt */ |