You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

web3toolkit-base

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3toolkit-base

A Python library for essential and advanced Web3 helper functions.

1.1.1
pipPyPI
Maintainers
1

web3toolkit-base

A Python library for essential Web3 helper functions.

Features

  • Wallet operations (creation, validation, balance query)
  • Transaction creation, signing, and sending
  • Smart contract deployment and function calls
  • Token operations (ERC-20, ERC-721, ERC-1155)
  • Network and block queries
  • Utility functions (hex, int, string conversions, IPFS hash validation)
  • Advanced features: ENS, gas, nonce, NFT, analytics, security, and more

Installation

pip install web3toolkit-base

Usage

from web3toolkit import create_wallet, validate_address

wallet = create_wallet()
print(wallet)
print(validate_address(wallet['address']))

Setting API Keys for Advanced Features

Some advanced features (e.g., Etherscan, BscScan, Covalent, OpenSea) require API keys. You can set them at the start of your project:

from web3toolkit import set_api_keys, is_contract_verified

set_api_keys(
    etherscan="YOUR_ETHERSCAN_API_KEY",
    bscscan="YOUR_BSCSCAN_API_KEY",
    covalent="YOUR_COVALENT_API_KEY",
    opensea="YOUR_OPENSEA_API_KEY"
)

# Use chain parameter for BSC:
result = is_contract_verified("0x1234...abcd", chain="bsc")
print(result)

Alternatively, you can set the following environment variables:

  • ETHERSCAN_API_KEY
  • BSCSCAN_API_KEY
  • COVALENT_API_KEY
  • OPENSEA_API_KEY

Requirements

  • Python 3.7+
  • web3
  • eth-account
  • requests

Contribution

Feel free to open pull requests and issues.

Keywords

web3

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts