Skip to content

Instantly share code, notes, and snippets.

View sambacha's full-sized avatar
:atom:

sam bacha sambacha

:atom:
View GitHub Profile
@sambacha
sambacha / BigNumberAssertions.sol
Created May 31, 2024 16:08
Solidity BigNumber Assertions
/// SPDX-License-Identifier: GPL-2.0
pragma solidity ^0.8.9;
import "forge-std/Test.sol";
/// @title BigNumberAssertions
contract BigNumberAssertions is Test {
uint256 constant fullScale = 10**18;

Access control matrix for account sharing system

Endpoint user1 user2 user3 user4
/balance GET GET GET GET
/transfers GET GET GET
POST POST
/settings PATCH
@top Program { Statement* }
@tokens {
pragma { "pragma" }
import { "import" }
contract { "contract" }
interface { "interface" }
library { "library" }
function { "function" }
modifier { "modifier" }
@sambacha
sambacha / generate_go_bindings_foundry.sh
Created May 9, 2024 03:08
Generate Golang bindings for Solidity using Foundry - based off of OP script
#!/usr/bin/env bash
set -eu
# Generate Go bindings for contract
#
# CONTRACTS_PATH="./src"
if [ "$#" -ne 2 ]; then
@sambacha
sambacha / init-systctl.sh
Created April 8, 2024 04:12
Tuning Ethereum Clients Base System
#!/usr/bin/env bash
echo "Warning This Script is Incomplete..."
# SYSV Shared Memory
sudo sysctl kern.sysv.shmmax=8388608
sleep 1
sudo sysctl kern.sysv.shmseg=48
sleep 1

ethereum_spec_tools.evm_tools package

Subpackages

:maxdepth: 4

ethereum_spec_tools.evm_tools.b11r
ethereum_spec_tools.evm_tools.t8n

Anvil RPC Methods

anvil_impersonateAccount
anvil_stopImpersonatingAccount
anvil_autoImpersonateAccount
anvil_getAutomine
anvil_mine
anvil_dropTransaction
anvil_reset
{
"DSRV": {
"name": "DSRV",
"website": "https://www.dsrvlabs.com"
},
"Kukis Global": {
"name": "Kukis Global",
"website": "https://www.kukis-global.com"
},
"Nethermind": {
./scripts/fetch-compiler-path.sh soljson-v0.1.1+commit.6ff4cd6.js
./scripts/fetch-compiler-path.sh soljson-v0.1.2+commit.d0d36e3.js
./scripts/fetch-compiler-path.sh soljson-v0.1.3-nightly.2015.9.25+commit.4457170b.js
./scripts/fetch-compiler-path.sh soljson-v0.1.3-nightly.2015.9.28+commit.4457170b.js
./scripts/fetch-compiler-path.sh soljson-v0.1.3-nightly.2015.9.29+commit.3ff932c8.js
./scripts/fetch-compiler-path.sh soljson-v0.1.3+commit.028f561d.js
./scripts/fetch-compiler-path.sh soljson-v0.1.4-nightly.2015.10.2+commit.795c894a.js
./scripts/fetch-compiler-path.sh soljson-v0.1.4-nightly.2015.10.5+commit.a33d173a.js
./scripts/fetch-compiler-path.sh soljson-v0.1.4-nightly.2015.10.5+commit.7ff67629.js
./scripts/fetch-compiler-path.sh soljson-v0.1.4-nightly.2015.10.6+commit.d35a4b84.js
This file has been truncated, but you can view the full file.
{
"openrpc": "1.2.4",
"info": {
"title": "Ethereum JSON-RPC Specification",
"description": "A specification of the standard interface for Ethereum clients.",
"license": {
"name": "CC0-1.0",
"url": "https://creativecommons.org/publicdomain/zero/1.0/legalcode"
},
"version": "0.0.0"