This file contains 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 spl.token._layouts import MINT_LAYOUT | |
from solana.rpc.api import Client, Pubkey | |
http_client = Client("https://api.mainnet-beta.solana.com") | |
# WIF token address | |
addr = Pubkey.from_string("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v") | |
info = http_client.get_account_info(addr) | |
decimals = MINT_LAYOUT.parse(info.value.data).decimals |
This file contains 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
pipx list --short | cut -d ' ' -f1 | while read line; do pipx upgrade $line; done |
This file contains 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
[Desktop Entry] | |
Name=Filecoin Station | |
Comment=Filecoin Station | |
Exec=/home/avik/tools/filecoin-station-linux-x86_64.AppImage | |
Icon=/home/avik/tools/icons-for-appImage/file-coin-station.jpg | |
Terminal=false | |
Type=Application | |
Categories=Development; |
This file contains 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
[Desktop Entry] | |
Name=Ledger Live Desktop | |
Comment=Ledger Live Desktop App | |
Exec=/home/avik/tools/ledger-live-desktop-2.77.2-linux-x86_64.AppImage | |
Icon=/home/avik/tools/icons-for-appImage/ledger.webp | |
Type=Application | |
Terminal=false | |
Categories=Development; |
This file contains 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
#!/bin/bash | |
# Removes old revisions of snaps | |
# CLOSE ALL SNAPS BEFORE RUNNING THIS | |
echo "Size before cleanup" | |
du -h /var/lib/snapd/snaps | |
set -eu | |
snap list --all | awk '/disabled/{print $1, $3}' | | |
while read snapname revision; |
This file contains 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 typing import (Tuple) # noqa: F401 | |
import numpy as np | |
from web3 import Web3 | |
from web3.auto import w3 | |
from eth_account.messages import encode_defunct, _hash_eip191_message | |
from eth_keys import keys | |
from eth_keys.backends.native.ecdsa import ( |
This file contains 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.9; | |
interface ICurvePool { | |
function get_virtual_price() external returns (uint256 out); | |
function add_liquidity(uint256[2] calldata amounts, uint256 deadline) external; | |
function get_dy(int128 i, int128 j, uint256 dx) external returns (uint256 out); |
This file contains 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: Project-Name | |
plugins: | |
- name: solidity | |
- name: alchemy | |
- name: foundry | |
- name: infura | |
- name: etherscan | |
ethereum: | |
default_network: mainnet-fork | |
mainnet_fork: |
This file contains 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
#!/bin/bash | |
ANVIL_RPC_URL="http://127.0.0.1:8545" | |
# make it background | |
anvil --fork-url $WEB3_INFURA_RPC --auto-impersonate & | |
cd challenge/project && forge script --rpc-url "$ANVIL_RPC_URL" script/Deploy.s.sol:Deploy --broadcast --unlocked --sender $(cast az) |
This file contains 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
[tool.poetry] | |
name = "Flash_loan_arbritage" | |
version = "0.1.0" | |
description = "" | |
authors = ["Your Name <you@example.com>"] | |
readme = "README.md" | |
packages = [{include = "Flash_loan_arbritage"}] | |
[tool.poetry.dependencies] | |
python = ">=3.10,<3.11" |
NewerOlder