| File | Class | Prefix | Base? |
|--------------------------------------+---------------------------------------+---------------------------+-------|
| src/ape/api/config.py | ApeConfig(BaseSettings) | APE_API_ | no |
| src/ape/api/config.py | DeploymentConfig(PluginConfig) | APE_API_ | no |
| src/ape/api/config.py | PluginConfig(BaseSettings) | APE_API_ | yes |
| src/ape_cache/config.py | CacheConfig(PluginConfig) | APE_CACHE_ | no |
| src/ape_compile/config.py | Config(PluginConfig) | APE_COMPILE_ | no |
| src/ape_console/config.py | ConsoleConfig(PluginConfig) | APE_CONSOLE_ | no |
| src/ape_ethereum/ecosystem.py | BaseEthereumConfig(PluginConfig) | APE
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
#!/bin/bash | |
BEACON_NODE=http://testing.mainnet.beacon-api.nimbus.team | |
curl \ | |
--no-progress-meter \ | |
"${BEACON_NODE}/eth/v2/beacon/blocks/head" \ | |
| jq '.data.message.body.execution_payload.withdrawals | last | .index' |
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
def get_balance_churn_limit(state: BeaconState) -> Gwei: | |
""" | |
Return the churn limit for the current epoch. | |
""" | |
churn = max( | |
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA, | |
get_total_active_balance(state) // CHURN_LIMIT_QUOTIENT | |
) | |
return churn - churn % EFFECTIVE_BALANCE_INCREMENT |
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
# | |
# Phase0 | |
# | |
def is_eligible_for_activation_queue(validator: Validator) -> bool: | |
""" | |
Check if ``validator`` is eligible to be placed into the activation queue. | |
""" | |
return ( | |
validator.activation_eligibility_epoch == FAR_FUTURE_EPOCH |
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
function divide(a: bigint, b: bigint): number { | |
const PRECISION: bigint = 18n; | |
const EXP: bigint = 10n**PRECISION; | |
if (b === 0n) { | |
return 0; | |
} | |
const integer: bigint = a/b; | |
const remainder: bigint = a%b; | |
const fractional: bigint = (remainder * EXP) / b; | |
const result: bigint = integer * EXP + fractional; |
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
``` | |
$ python | |
Python 3.12.4 (main, Jun 7 2024, 06:33:07) [GCC 14.1.1 20240522] on linux | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> print(int(1e6) * int(1e18)) | |
1000000000000000000000000 | |
>>> print(int(1e6 * 1e18)) | |
999999999999999983222784 | |
>>> | |
``` |
---
title: github.com/ydm/mermaider
---
classDiagram
class `CommonBase` {
<<abstract>>
-address VM_ADDRESS
-address CONSOLE
-address CREATE2_FACTORY
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
#!/usr/bin/env python | |
from pathlib import Path | |
from base64 import b64encode, b64decode | |
from cryptography.hazmat.primitives import hashes | |
from cryptography.hazmat.primitives import serialization | |
from cryptography.hazmat.primitives.asymmetric import padding | |
from cryptography.hazmat.primitives.serialization.ssh import ( | |
SSHPrivateKeyTypes, |
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
package main | |
import ( | |
"context" | |
"fmt" | |
"sync" | |
"time" | |
) | |
func f(ctx context.Context, xs []int) { |
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
unbind C-b | |
set-option -g prefix C-\\ | |
bind-key C-\\ send-prefix |
NewerOlder