### Check installation with CMake and compile example Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/crypto/secp256k1/libsecp256k1/doc/release-process.md Verifies the installation process using CMake and then compiles and runs an example program to ensure the library is correctly linked and functional. ```shell dir=$(mktemp -d) build=$(mktemp -d) cmake -B $build -DCMAKE_INSTALL_PREFIX=$dir && cmake --build $build && cmake --install $build && ls -RlAh $dir gcc -o ecdsa examples/ecdsa.c -I $dir/include -L $dir/lib*/ -l secp256k1 -Wl,-rpath,"$dir/lib",-rpath,"$dir/lib64" && ./ecdsa ``` -------------------------------- ### Check installation with autotools and compile example Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/crypto/secp256k1/libsecp256k1/doc/release-process.md Verifies the installation process using autotools and then compiles and runs an example program to ensure the library is correctly linked and functional. ```shell dir=$(mktemp -d) ./autogen.sh && ./configure --prefix=$dir && make clean && make install && ls -RlAh $dir gcc -o ecdsa examples/ecdsa.c $(PKG_CONFIG_PATH=$dir/lib/pkgconfig pkg-config --cflags --libs libsecp256k1) -Wl,-rpath,"$dir/lib" && ./ecdsa ``` -------------------------------- ### Install go-metrics Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/metrics/README.md Command to install the go-metrics library using go get. ```sh go get github.com/rcrowley/go-metrics ``` -------------------------------- ### Open Smartcard Wallet (Usage Example) Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/accounts/scwallet/README.md This is the command used during regular usage to open the smartcard wallet after Geth has started. It will prompt for the pairing password and PIN. ```javascript personal.openWallet("keycard://a4d73015") ``` -------------------------------- ### Build Keeper Example Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/keeper/README.md Build the keeper executable with the 'example' tag for example implementations. ```bash go build -tags "example" ./cmd/keeper ``` -------------------------------- ### Install StatHat Support Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/metrics/README.md Additional command to install the StatHat Go client, required for StatHat support. ```sh go get github.com/stathat/go ``` -------------------------------- ### Compiling Schnorr and ECDH Examples Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/crypto/secp256k1/libsecp256k1/README.md To compile the Schnorr signature and ECDH examples, additional configuration flags are required. ```bash configure --enable-module-schnorrsig --enable-module-ecdh ``` -------------------------------- ### Compiling Example Programs Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/crypto/secp256k1/libsecp256k1/README.md Instructions to compile example programs, requiring the `--enable-examples` configuration flag. Specific modules may require additional flags. ```bash configure --enable-examples ``` -------------------------------- ### EOF Bytecode Example 5 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt The final EOF bytecode example in this corpus, starting with '0xffff'. This sequence is used to test the boundaries and specific interpretations of the EOF format. ```bytecode 0xffff010100040200010001040000000080000000 ``` -------------------------------- ### Install and Initialize Smartcard Application Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/accounts/scwallet/README.md Use this command to install the smartcard application and initialize it. This process generates a PIN, PUK, and pairing password. ```bash keycard install -a keycard_v2.2.1.cap && keycard init ``` -------------------------------- ### EOF Bytecode Example 4 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt This EOF bytecode sequence starts with '0xfffe'. It is part of a corpus for testing EOF compliance and different structural elements. ```bytecode 0xfffe010100040200010001040000000080000000 ``` -------------------------------- ### eth_feeHistory JSON-RPC Call Source: https://context7.com/ethereum-optimism/op-geth/llms.txt Example of calling eth_feeHistory to get base fee, gas used ratios, and priority fee percentiles for a range of blocks. ```shell curl -X POST http://localhost:8545 \ -H "Content-Type: application/json" \ -d '{ "jsonrpc":"2.0","method":"eth_feeHistory", "params":["0x5","latest",[10,50,90]], "id":1 }' ``` -------------------------------- ### Running geth Node Configurations Source: https://context7.com/ethereum-optimism/op-geth/llms.txt Examples for running the geth CLI client as a full node on mainnet, Holesky testnet, or in dev mode. Includes Docker quick-start and configuration loading/dumping. ```shell geth \ --http \ --http.addr 0.0.0.0 \ --http.port 8545 \ --http.api eth,net,web3,txpool \ --http.corsdomain "*" \ --ws \ --ws.port 8546 \ --ws.api eth,net,web3 # Holesky testnet geth --holesky --http --http.api eth,net,web3 console # Dev mode (instant mining, no beacon required) for local contract testing geth --dev --http --http.api eth,net,web3,debug,txpool # Docker quick-start (mainnet snap-sync) docker run -d --name ethereum-node \ -v /Users/alice/ethereum:/root \ -p 8545:8545 -p 30303:30303 \ ethereum/client-go \ --http --http.addr 0.0.0.0 # Load a TOML config file geth --config /path/to/config.toml # Export the current config as TOML geth --http --http.api eth,net,web3 dumpconfig ``` -------------------------------- ### Clef Command Line Example Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/README.md An example of how to run Clef with specific command-line options, setting the keystore directory and chain ID. ```bash $ clef -keystore /my/keystore -chainid 4 ``` -------------------------------- ### ethclient.Client - Typed Go Ethereum RPC client Source: https://context7.com/ethereum-optimism/op-geth/llms.txt Connect to an Ethereum node via HTTP, WebSocket, or IPC and interact with JSON-RPC methods. Includes examples for getting chain ID, subscribing to new block headers, and filtering logs. ```APIDOC ## ethclient.Client — Typed Go Ethereum RPC client `ethclient.Client` provides typed wrappers for all standard JSON-RPC methods, connecting via HTTP, WebSocket, or IPC. ```go import ( "context" "fmt" "math/big" "github.com/ethereum/go-ethereum" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethclient" ) // Connect client, err := ethclient.Dial("wss://mainnet.infura.io/ws/v3/YOUR_KEY") if err != nil { panic(err) } defer client.Close() ctx := context.Background() // Chain info chainID, _ := client.ChainID(ctx) fmt.Printf("Chain ID: %s\n", chainID) // Subscribe to new block headers headers := make(chan *types.Header) sub, err := client.SubscribeNewHead(ctx, headers) if err != nil { panic(err) } for { select { case err := <-sub.Err(): panic(err) case h := <-headers: fmt.Printf("New block %d hash=%s\n", h.Number, h.Hash().Hex()) } } // Filter logs (ERC-20 Transfer events) query := ethereum.FilterQuery{ Addresses: []common.Address{common.HexToAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48")}, Topics: [][]common.Hash{{ common.HexToHash("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"), }}, FromBlock: big.NewInt(18000000), ToBlock: big.NewInt(18001000), } logs, err := client.FilterLogs(ctx, query) if err != nil { panic(err) } for _, l := range logs { fmt.Printf("Transfer log tx=%s\n", l.TxHash.Hex()) } ``` ``` -------------------------------- ### Clef RPC Service for Qubes Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/docs/setup.md This bash script defines an RPC service for Clef on a target Qubes domain. It starts Clef if not running and forwards incoming stdin data to Clef's HTTP channel. Ensure the SIGNER_BIN and SIGNER_CMD paths are correct for your setup. ```bash #!/bin/bash SIGNER_BIN="/home/user/tools/clef/clef" SIGNER_CMD="/home/user/tools/gtksigner/gtkui.py -s $SIGNER_BIN" # Start clef if not already started if [ ! -S /home/user/.clef/clef.ipc ]; then $SIGNER_CMD & sleep 1 fi # Should be started by now if [ -S /home/user/.clef/clef.ipc ]; then # Post incoming request to HTTP channel curl -H "Content-Type: application/json" -X POST -d @- http://localhost:8550 2>/dev/null fi ``` -------------------------------- ### EVM Fork Configuration Example Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/README.md Demonstrates how to specify a fork for EVM state transitions using the CLI. Ensure the specified fork is valid and supported. ```bash # This should exit with 3 ./evm t8n --input.alloc=./testdata/1/alloc.json --input.txs=./testdata/1/txs.json --input.env=./testdata/1/env.json --state.fork=Frontier+1346 2>/dev/null exitcode:3 OK ``` -------------------------------- ### Build geth Executable Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/README.md Use this command to build the main geth executable. Ensure Go (version 1.23+) and a C compiler are installed. ```shell make geth ``` -------------------------------- ### EOF Bytecode Example 1 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt A basic EOF bytecode example. ```Assembly 0xef000101000902000200010001040000000080000000800000000000 ``` -------------------------------- ### Starting Clef with a Rule File Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/tutorial.md This command starts the Clef signer with a specified keystore, chain ID, and rule file. Ensure the rule file has been previously attested. ```bash $ clef --keystore ~/.ethereum/rinkeby/keystore --chainid 4 --rules rules.js INFO [07-01|13:39:49.726] Rule engine configured file=rules.js INFO [07-01|13:39:49.726] Starting signer chainid=4 keystore=$HOME/.ethereum/rinkeby/keystore light-kdf=false advanced=false DEBUG[07-01|13:39:49.726] FS scan times list=35.15µs set=4.251µs diff=2.766µs DEBUG[07-01|13:39:49.727] Ledger support enabled DEBUG[07-01|13:39:49.727] Trezor support enabled via HID DEBUG[07-01|13:39:49.727] Trezor support enabled via WebUSB INFO [07-01|13:39:49.728] Audit logs configured file=audit.log DEBUG[07-01|13:39:49.728] IPC registered namespace=account INFO [07-01|13:39:49.728] IPC endpoint opened url=$HOME/.clef/clef.ipc ------- Signer info ------- * intapi_version : 7.0.0 * extapi_version : 6.0.0 * extapi_http : n/a * extapi_ipc : $HOME/.clef/clef.ipc ``` -------------------------------- ### EOF Bytecode Example 2 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_1.txt Another EOF bytecode example with different parameters. ```hex 0xef000101000802000200030007040000000080000030300030e5000030303030303030 ``` -------------------------------- ### EOF Bytecode Example 46 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000304000000008000040002000000020002e30001612015600155005fe500025f5fe4 ``` -------------------------------- ### Configure geth with a Configuration File Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/README.md Launches geth using a TOML configuration file instead of command-line flags. This is an alternative method for managing numerous settings. ```shell $ geth --config /path/to/your_config.toml ``` -------------------------------- ### Quick Start Ethereum Node with Docker Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/README.md Deploys an Ethereum node using Docker, starting in snap-sync mode with a specified volume for blockchain data and mapped ports. Ensure to include `--http.addr 0.0.0.0` if RPC access from other containers or hosts is required. ```shell docker run -d --name ethereum-node -v /Users/alice/ethereum:/root \ -p 8545:8545 -p 30303:30303 \ ethereum/client-go ``` -------------------------------- ### EOF Bytecode Example 45 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000304000000008000020000000202000002e30001612015600155005fe500025050e4 ``` -------------------------------- ### EOF Bytecode Example 44 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000104000000008000060004000202020002e30001612015600155005fe50002e4 ``` -------------------------------- ### Signer Startup Information Call Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/README.md Example call for `ui_onSignerStartup`, providing the UI with API versions and build information from the signer. ```json { "jsonrpc": "2.0", "id": 1, "method": "ui_onSignerStartup", "params": [ { "info": { "extapi_http": "http://localhost:8550", "extapi_ipc": null, "extapi_version": "2.0.0", "intapi_version": "1.2.0" } } ] } ``` -------------------------------- ### eth_gasPrice Go Client Example Source: https://context7.com/ethereum-optimism/op-geth/llms.txt Uses the go-ethereum ethclient to retrieve the suggested gas price for the current chain head. ```go import ( "context" "fmt" "github.com/ethereum/go-ethereum/ethclient" ) client, err := ethclient.Dial("http://localhost:8545") if err != nil { panic(err) } defer client.Close() gasPrice, err := client.SuggestGasPrice(context.Background()) if err != nil { panic(err) } fmt.Printf("Suggested gas price: %s wei\n", gasPrice) ``` -------------------------------- ### EOF Bytecode Example 43 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000104000000008000060004000000000000e30001612015600155005fe50002e4 ``` -------------------------------- ### EOF Bytecode Example 42 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000104000000008000040002000202020002e30001612015600155005fe50002e4 ``` -------------------------------- ### Start Clef with Rinkeby Configuration Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/tutorial.md Run Clef with specified keystore, chain ID, and rules file. Ensure the rules file allows auto-listing accounts for Geth compatibility. ```bash $ clef --keystore ~/.ethereum/rinkeby/keystore --chainid 4 --rules rules.js ``` -------------------------------- ### EOF Bytecode Example 41 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000104000000008000040002000000000000e30001612015600155005fe50002e4 ``` -------------------------------- ### Install Debian Packaging Tools Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/build/ci-notes.md Installs essential tools for building Debian packages, including Go and packaging utilities. Ensure you have sudo privileges. ```bash sudo apt-get install build-essential golang-go devscripts debhelper python-bzrlib python-paramiko ``` -------------------------------- ### EOF Bytecode Example 40 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0004000104000000008000020000000000000000e30001612015600155005fe50002e4 ``` -------------------------------- ### Build Go Ethereum Project Source: https://context7.com/ethereum-optimism/op-geth/llms.txt Provides shell commands for building the Go Ethereum project, including specific executables or the entire suite. It also covers installing development tools. ```shell # Build only geth make geth # Build all executables (geth, clef, abigen, evm, devp2p, rlpdump, keeper, ...) make all # Install code-generation tooling make devtools ``` -------------------------------- ### EOF Bytecode Example 39 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0003000504000000008000060004000000040004e3000161201560015500e500025f5f5f5fe4 ``` -------------------------------- ### Building libsecp256k1 on Windows with Visual Studio Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/crypto/secp256k1/libsecp256k1/README.md Build instructions for Windows using Visual Studio, specifying the generator and build configuration. ```bash >cmake -G "Visual Studio 17 2022" -A x64 -B build >cmake --build build --config RelWithDebInfo ``` -------------------------------- ### Start Full Node on Main Ethereum Network Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/README.md Starts geth in snap sync mode for quick synchronization to the current network state. Use this to interact with the main Ethereum network by creating accounts, transferring funds, and deploying contracts. It also launches an interactive JavaScript console for using web3 methods and management APIs. ```shell $ geth console ``` -------------------------------- ### EOF Bytecode Example 38 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0003000304000000008000060004000000020002e3000161201560015500e500025f5fe4 ``` -------------------------------- ### Get Account Proof in Go (eth_getProof) Source: https://context7.com/ethereum-optimism/op-geth/llms.txt This Go code snippet demonstrates how to use the go-ethereum client to fetch an account's proof using eth_getProof. ```go proof, err := client.GetProof(context.Background(), common.HexToAddress("0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"), []string{"0x0000000000000000000000000000000000000000000000000000000000000000"}, nil, ) if err != nil { panic(err) } fmt.Printf("Account nonce: %d balance: %s\n", proof.Nonce, proof.Balance) for _, sp := range proof.StorageProof { fmt.Printf("Slot %s = %s\n", sp.Key, sp.Value) } ``` -------------------------------- ### EOF Bytecode Example 37 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0003000304000000008000040002000000020002e3000161201560015500e500025f5fe4 ``` -------------------------------- ### EVM PUSH2 and MSTORE Operations (Sequential) Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/evmrun/7.out.2.txt Illustrates a sequence of PUSH2 and MSTORE operations, likely for initializing a larger data structure in memory. ```evm [0x6106f15360006106f25360606106f35360006106f45360606106f55360006106] ``` ```evm [0x6106f15360006106f25360606106f35360006106f45360606106f55360006106,0x860] ``` -------------------------------- ### EOF Bytecode Example 36 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0003000104000000008000060004000000000000e3000161201560015500e50002e4 ``` -------------------------------- ### Run a Discovery v5 Listener Node Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/devp2p/README.md Starts a Discovery v5 node that listens for incoming peer connections. This is useful for testing and network participation. ```bash devp2p discv5 listen ``` -------------------------------- ### EOF Bytecode Example 35 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0003000104000000008000040002000000000000e3000161201560015500e50002e4 ``` -------------------------------- ### EOF Bytecode Example 34 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0003000104000000008000020000000000000000e3000161201560015500e50002e4 ``` -------------------------------- ### Install secp256k1 targets and headers Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/crypto/secp256k1/libsecp256k1/src/CMakeLists.txt Installs the secp256k1 library targets (runtime, library, archive) and header files. Conditionally includes module headers based on build flags. ```cmake if(SECP256K1_INSTALL) install(TARGETS secp256k1 EXPORT ${PROJECT_NAME}-targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) set(${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1.h" "${PROJECT_SOURCE_DIR}/include/secp256k1_preallocated.h" ) if(SECP256K1_ENABLE_MODULE_ECDH) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_ecdh.h") endif() if(SECP256K1_ENABLE_MODULE_RECOVERY) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_recovery.h") endif() if(SECP256K1_ENABLE_MODULE_EXTRAKEYS) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_extrakeys.h") endif() if(SECP256K1_ENABLE_MODULE_SCHNORRSIG) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_schnorrsig.h") endif() if(SECP256K1_ENABLE_MODULE_MUSIG) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_musig.h") endif() if(SECP256K1_ENABLE_MODULE_ELLSWIFT) list(APPEND ${PROJECT_NAME}_headers "${PROJECT_SOURCE_DIR}/include/secp256k1_ellswift.h") endif() install(FILES ${${PROJECT_NAME}_headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} ) install(EXPORT ${PROJECT_NAME}-targets FILE ${PROJECT_NAME}-targets.cmake NAMESPACE ${PROJECT_NAME}:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} ) include(CMakePackageConfigHelpers) configure_package_config_file( ${PROJECT_SOURCE_DIR}/cmake/config.cmake.in ${PROJECT_NAME}-config.cmake INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} NO_SET_AND_CHECK_MACRO ) write_basic_package_version_file(${PROJECT_NAME}-config-version.cmake COMPATIBILITY SameMinorVersion ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake ``` -------------------------------- ### Start Geth with Clef Signer Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/tutorial.md Launch Geth with the Rinkeby network enabled and configure it to use a local Clef instance via its IPC endpoint as the account signer. ```bash $ geth --rinkeby --signer=~/.clef/clef.ipc console ``` -------------------------------- ### EOF Bytecode Example 33 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c020003000a0001000304000000008000020000000000000000e3000261201560015500e4e50001 ``` -------------------------------- ### EOF Bytecode Example 32 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c0200030004000b000204000000008000010001000403020003e30001005f5f5f5fe100015fe5000250e4 ``` -------------------------------- ### Initialize Tupler Contract Bindings Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/accounts/abi/abigen/testdata/v2/tupler.go.txt Creates a new instance of the Tupler contract bindings. Panics if the ABI is invalid. ```go // TuplerMetaData contains all meta data concerning the Tupler contract. var TuplerMetaData = bind.MetaData{ ABI: "[{"constant":true,"inputs":[],"name":"tuple","outputs":[{"name":"a","type":"string"},{"name":"b","type":"int256"},{"name":"c","type":"bytes32"}],"type":"function"}]", ID: "a8f4d2061f55c712cfae266c426a1cd568", Bin: "0x606060405260dc8060106000396000f3606060405260e060020a60003504633175aae28114601a575b005b600060605260c0604052600260809081527f486900000000000000000000000000000000000000000000000000000000000060a05260017fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060e0829052610100819052606060c0908152600261012081905281906101409060a09080838184600060046012f1505081517fffff000000000000000000000000000000000000000000000000000000000000169091525050604051610160819003945092505050f3", } // Tupler is an auto generated Go binding around an Ethereum contract. type Tupler struct { abi abi.ABI } // NewTupler creates a new instance of Tupler. func NewTupler() *Tupler { parsed, err := TuplerMetaData.ParseABI() if err != nil { panic(errors.New("invalid ABI: " + err.Error())) } return &Tupler{abi: *parsed} } ``` -------------------------------- ### EOF Bytecode Example 31 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c0200030004000a000204000000008000010001000303020003e30001005f5f5fe100015fe5000250e4 ``` -------------------------------- ### Get Help Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/README.md Displays a list of available commands or help for a specific command. ```bash help ``` ```bash -h ``` -------------------------------- ### Add OnStartup method for signer API version Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/intapi_changelog.md This example demonstrates the `OnSignerStartup` call, used to provide UI with signer API versions (internal and external), build-info, and external API details. ```json { "jsonrpc": "2.0", "id": 1, "method": "OnSignerStartup", "params": [ { "info": { "extapi_http": "http://localhost:8550", "extapi_ipc": null, "extapi_version": "2.0.0", "intapi_version": "1.2.0" } } ] } ``` -------------------------------- ### EOF Bytecode Example 30 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c0200030004000a000204000000008000010001000302010002e30001005f5f5fe100015fe5000250e4 ``` -------------------------------- ### Open Smartcard Wallet with Pairing Password Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/accounts/scwallet/README.md After initializing the card, use this command in the Geth console to open the wallet using the generated pairing password. This step is necessary to establish communication. ```javascript > personal.openWallet("keycard://044def09", "pairing password") ``` -------------------------------- ### EOF Bytecode Example 29 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040009000204000000008000010001000202010002e30001005f5fe100015fe5000250e4 ``` -------------------------------- ### EOF Bytecode Example 28 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040009000204000000008000010001000201000001e30001005f5fe100015fe5000250e4 ``` -------------------------------- ### EVM PUSH2 and MSTORE Operations (Data Initialization) Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/evmrun/7.out.2.txt Shows PUSH2 and MSTORE operations used for initializing data, possibly for contract deployment or state setup. ```evm [0xf65360856106f753605a6106f85360f16106f95360506106fa5360506106fb53] ``` ```evm [0xf65360856106f753605a6106f85360f16106f95360506106fa5360506106fb53,0x880] ``` -------------------------------- ### EOF Bytecode Example 27 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040009000104000000008000010001000202020002e30001005f5fe100015fe50002e4 ``` -------------------------------- ### EOF Bytecode Example 26 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040009000104000000008000010001000201010001e30001005f5fe100015fe50002e4 ``` -------------------------------- ### Build all commands Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/AGENTS.md Verify that all tools compile successfully by running `make all`. This includes `keeper` which has special build requirements. ```sh make all ``` -------------------------------- ### EOF Bytecode Example 25 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040009000104000000008000010001000200000000e30001005f5fe100015fe50002e4 ``` -------------------------------- ### EOF Bytecode Example 24 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040008000204000000008000010001000101000001e30001005fe100015fe5000250e4 ``` -------------------------------- ### Start Clef with Keystore and Chain ID Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/clef/tutorial.md Initiates Clef, specifying the keystore directory and the Rinkeby chain ID for signing. Clef requires the chain ID as it does not have a backing chain. ```bash $ clef --keystore ~/.ethereum/rinkeby/keystore --chainid 4 ``` -------------------------------- ### EOF Bytecode Example 23 Source: https://github.com/ethereum-optimism/op-geth/blob/optimism/cmd/evm/testdata/eof/eof_corpus_0.txt An EOF bytecode example with a different code section and data. ```Assembly 0xef000101000c02000300040008000104000000008000010001000102020002e30001005fe100015fe50002e4 ```