Skip to content

Instantly share code, notes, and snippets.

View jordaniza's full-sized avatar
🎲
All In

Jordan jordaniza

🎲
All In
View GitHub Profile
pragma solidity ^0.8.0;
contract AtomicityGuard {
// address => block => status
uint256 private constant _ENTERED = 1;
mapping(address => mapping( uint256 => uint256)) ledger;
modifier nonAtomic() {
@cwhinfrey
cwhinfrey / message-taxonomy.md
Last active April 9, 2024 16:14
An Incomplete Taxonomy of Cross-Chain Messages

An Incomplete Taxonomy of Cross-Chain Messages

Single or Batched

Single Messages - Single messages have a single target address, target chainId, and data payload. The vast majority of cross-chain messages today are single messages.

Example:

function dispatchMessage(uint256 toChainId, address to, bytes calldata data) external payable returns (bytes32 messageId);
@emo-eth
emo-eth / chain_funcs.sh
Last active June 22, 2023 14:43
Helper functions for interacting with chains and Foundry tests. Source from .zshrc etc
###########
# Imports #
###########
# the RPCs file should include RPC URLs and Etherscan API Keys for relevant networks
# (in a separate file so they don't get committed)
source "$(dirname "$0")/rpcs.sh"
# any useful addresses for various networks for easy reference
source "$(dirname "$0")/addresses.sh"
# any useful functions and definitions for interacting with Seaport