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
async function getAddressFullTransactionHistory() { | |
var address = "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" | |
var fullTransactions = [] | |
var nextBlock = 0 | |
while (true) { | |
const requestTransactions = await fetch(`https://api.etherscan.io/v2/api?chainid=1&module=account&action=txlist&address=${address}&startblock=${nextBlock}&endblock=latest&page=1&offset=1000&sort=asc&apikey=YourApiKeyToken`) | |
const transactions = await requestTransactions.json() |
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
const ethers = require("ethers") | |
async function getUniswapV4Swaps() { | |
// get abi | |
const requestAbi = await fetch("https://api.etherscan.io/v2/api?chainid=1&module=contract&action=getabi&address=0xc7bbec68d12a0d1830360f8ec58fa599ba1b0e9b&apikey=YourApiKeyToken") | |
const abi = await requestAbi.json() | |
// get logs from ETH/USDC pair |
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
async function checkAML(address) { | |
// sanctioned addresses dataset | |
const sanctionedAddresses = [ | |
'0x308ed4b7b49797e1a98d3818bff6fe5385410370', | |
'0x01e2919679362dfbc9ee1644ba9c6da6d6245bb1' | |
] | |
// get list of transactions on Ethereum, use chainId for other chains like Base |
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
async function flaunch() { | |
// fetch transactions from etherscan | |
const query = await fetch(`https://api.etherscan.io/v2/api?chainid=8453&module=account&action=txlistinternal&address=0x6A53F8b799bE11a2A3264eF0bfF183dCB12d9571&startblock=0&endblock=99999999&page=1&offset=10&sort=desc&apikey=YourApiKeyToken`) | |
const data = await query.json() | |
// filter for second CREATE2 transaction, which is the token address | |
const flaunchedTokens = data.result |
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
{ | |
"language":"Vyper", | |
"sources":{ | |
"multijson.vy":{ | |
"content":"# @pragma version ^0.4.0\n\"\"\"\n@title Another smart contract\n@author Some person on the internet\n@license none\n\"\"\"\n\nimport math\n# Other ways to import\n# import math as m\n# from . import math\n# from . import math as m\n\nstored_number: public(uint256)\n\n@deploy\ndef __init__():\n self.stored_number = 1\n\n@external\ndef call_math_mul(x: uint256, y: uint256):\n self.stored_number = math.mul(x, y)\n\n@view\n@external\ndef get_number() -> uint256:\n return self.stored_number" | |
}, | |
"math.vy":{ | |
"content":"# @pragma version ^0.4.0\r\n\r\n@pure\r\ndef mul(x: uint256, y: uint256) -> uint256:\r\n return x * y\r\n" | |
} | |
}, |
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
async function sumUSDCTransfers(chain, address) { | |
// get the latest block | |
const lastBlockQuery = await fetch(`https://api.etherscan.io/v2/api?chainid=${chain}&module=proxy&action=eth_blockNumber&apikey=YourApiKeyToken`) | |
const lastBlockData = await lastBlockQuery.json() | |
const lastBlock = Number(lastBlockData.result) | |
// get the past hour block |
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
async function main() { | |
// query ETH balances on Arbitrum, Base and Optimism | |
const chains = [42161, 8453, 10] | |
for (const chain of chains) { | |
// add your key here | |
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
{ | |
"id": "bitcoin", | |
"symbol": "btc", | |
"name": "Bitcoin", | |
"web_slug": "bitcoin", | |
"asset_platform_id": null, | |
"platforms": { | |
"": "" | |
}, | |
"detail_platforms": { |
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
{ | |
"name": "Sloth Jazz", | |
"website": "https://www.example.com", | |
"description": "The smoothest restaking experience", | |
"logo": "https://gist.github.com/assets/33112835/3b6a5513-0e79-4ee5-be75-d75517017708", | |
"twitter": "https://x.com/example" | |
} |
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
{ | |
"language": "Solidity", | |
"sources": { | |
"contracts/Verified.sol": { | |
"content": "//SPDX-License-Identifier: MIT\r\npragma solidity ^0.8.18;\r\n\r\ncontract Verified {\r\n string public greet =\r\n \"Increase this counter if you completed this tutorial\";\r\n string public tutorial =\r\n \"https://docs.etherscan.io/contract-verification/multichain-verification\";\r\n\r\n uint256 public verified = 0;\r\n\r\n function completedTutorial() public {\r\n verified += 1;\r\n }\r\n}\r\n" | |
} | |
}, | |
"settings": { | |
"metadata": { | |
"bytecodeHash": "none" |
NewerOlder