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
| #!/usr/bin/env node | |
| import { createPublicClient, createWalletClient, http, parseAbi } from 'viem' | |
| import { privateKeyToAccount } from 'viem/accounts' | |
| import {arbitrum} from 'viem/chains' | |
| import dotenv from 'dotenv' | |
| dotenv.config() | |
| const sleepTime = process.env.SLEEP_TIME || 1000 |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.28; | |
| /// @notice Minimal ERC-4626 interface subset used here | |
| interface IERC4626 { | |
| function withdraw( | |
| uint256 assets, | |
| address receiver, | |
| address owner | |
| ) external returns (uint256 shares); |
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
| from eth_abi import decode | |
| from eth_utils import to_hex, to_checksum_address | |
| def decode_swap_data(hex_data): | |
| # Remove '0x' if present | |
| hex_data = hex_data.replace('0x', '') | |
| # First, decode the initial offset | |
| data_bytes = bytes.fromhex(hex_data) | |
| (initial_offset,) = decode(['uint256'], data_bytes[:32]) |
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
| import json | |
| from web3 import Web3 | |
| from eth_abi import encode | |
| import csv | |
| # Configure these variables | |
| RPC_URL = "" # Replace with your Infura project ID or other RPC URL | |
| CONTRACT_ADDRESS = "0x4370D3b6C9588E02ce9D22e684387859c7Ff5b34" # Replace with the actual contract address | |
| ASSET_ADDRESS = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2" # Replace with the actual asset address | |
| REWARD_ADDRESS = "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0" # Replace with the actual reward token address |
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
| import requests | |
| from eth_abi import encode | |
| from eth_utils import to_checksum_address | |
| import time | |
| import json | |
| import os | |
| def ensure_folder(folder_name): | |
| if not os.path.exists(folder_name): | |
| os.makedirs(folder_name) |
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
| Verify Github on Galaxy. gid:iFWAMPgeko9y9Yq5ysswYR |