polybrainz_etherscan 1.0.0 copy "polybrainz_etherscan: ^1.0.0" to clipboard
polybrainz_etherscan: ^1.0.0 copied to clipboard

A production-ready Dart wrapper for the Etherscan API V2, supporting 60+ EVM chains with a single API key. Features include rate limiting, caching, circuit breaker pattern, and type-safe models.

Changelog #

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2025-01-22 #

Added #

  • Multi-chain support: 60+ EVM chains supported with a single API key

    • Mainnets: Ethereum, Polygon, Arbitrum, Optimism, Base, BSC, Avalanche, and more
    • Testnets: Sepolia, Holesky, Goerli, and various L2 testnets
  • Account Module

    • getBalance - Get native token balance for an address
    • getBalanceMulti - Get balances for multiple addresses (up to 20)
    • getTransactions - Get normal transactions for an address
    • getInternalTransactions - Get internal transactions for an address
    • getTokenTransfers - Get ERC-20 token transfers
    • getNftTransfers - Get ERC-721 NFT transfers
  • Contract Module

    • getAbi - Get contract ABI for verified contracts
    • getSourceCode - Get contract source code and metadata
  • Gas Module

    • getGasOracle - Get current gas prices (safe, propose, fast)
    • estimateConfirmationTime - Estimate transaction confirmation time
  • Stats Module

    • getEthPrice - Get current ETH/USD and ETH/BTC prices
    • getEthSupply - Get total ETH supply
  • Transaction Module

    • getStatus - Check transaction execution status
    • getReceiptStatus - Check transaction receipt status
  • Logs Module

    • getLogs - Get event logs with topic filtering
  • Resilience Features

    • Token bucket rate limiter
    • Circuit breaker pattern with configurable thresholds
    • Exponential backoff retry with jitter
    • In-memory LRU cache with TTL support
  • Type Safety

    • Extension types for EthereumAddress, TransactionHash, Wei, BlockNumber
    • Sealed class exception hierarchy for exhaustive error handling
    • Result<T> type for explicit success/failure handling
    • Freezed models with JSON serialization
  • Configuration

    • Configurable timeouts, rate limits, and cache settings
    • Easy chain switching with forChain() method
0
likes
80
points
83
downloads

Publisher

verified publisherpolybrainz.bot

Weekly Downloads

A production-ready Dart wrapper for the Etherscan API V2, supporting 60+ EVM chains with a single API key. Features include rate limiting, caching, circuit breaker pattern, and type-safe models.

Repository (GitHub)
View/report issues

Topics

#ethereum #blockchain #etherscan #web3 #api

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

collection, crypto, dio, freezed_annotation, json_annotation

More

Packages that depend on polybrainz_etherscan