Skip to content

Instantly share code, notes, and snippets.

@peekpi
peekpi / README.md
Last active November 18, 2020 03:26
trace inner transaction
  • complex.sol: the contract used for testing
  • trace.js: the js script to trace internal transactions
  • response_raw.json: raw response in json
  • response_format.txt: formated response

run node trace.js to get the inner transactions. The txhash and node url is hardcoded into the script.

curl example:

curl --request POST 'http://40.70.223.9:9500' --header 'Content-Type: application/json' --data-raw '{
@peekpi
peekpi / README.md
Last active April 6, 2021 15:41
example for RPC trace_block

run commond below, the parameter is block number:

curl --request POST 'http://52.147.194.138:9500' --header 'Content-Type: application/json' --data-raw '{
    "jsonrpc": "2.0",
    "method": "trace_block",
    "params": ["0x766914"],
    "id": 1
}'
@peekpi
peekpi / .deps...npm...@openzeppelin...contracts...utils...Address.sol
Created March 25, 2022 16:57
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**