viem

TypeScript Interface for Ethereum

OTHER License

Downloads
2.5M
Stars
2K
Committers
391

Bot releases are visible (Hide)

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Minor Changes

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 68c3816 Thanks @jxom! - Added encodePacked.

  • 68c3816 Thanks @jxom! - Made keccak256 accept a hex value (as well as byte array).

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • e07f212 Thanks @jxom! - Breaking: Renamed formatUnit and parseUnit to formatUnits and parseUnits.
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • #100 6bb8ce4 Thanks @jxom! - Breaking: Renamed requestAccounts Wallet Action to requestAddresses

    Breaking: Renamed getAccounts Wallet Action to getAddresses

  • #100 6bb8ce4 Thanks @jxom! - Added support for Externally Owned Accounts.

  • #100 6bb8ce4 Thanks @jxom! - Breaking: The from argument has been removed from Actions in favour of account to distinguish between Account types:

    + import { getAccount } from 'viem'
    
    const [address] = await walletClient.requestAddresses()
    + const account = getAccount(address)
    
    const hash = await walletClient.sendTransaction({
    - from: address,
    + account,
      to: '0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
      value: 1000000000000000000n
    })
    

    Affected actions:

    • call
    • estimateGas
    • sendTransaction
    • signMessage
    • estimateContractGas
    • multicall
    • readContract
    • simulateContract
    • writeContract
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 057e01e Thanks @jxom! - - testClient.getTxPoolContenttestClient.getTxpoolContent

    • testClient.getTxPoolStatustestClient.getTxpoolStatus
  • #85 2350d1a Thanks @jxom! - Breaking: Renamed encodeAbi & decodeAbi to encodeAbiParameters & decodeAbiParameters, and modified API from named arguments to inplace arguments:

    import {
    - encodeAbi,
    - decodeAbi,
    + encodeAbiParameters,
    + decodeAbiParameters,
    } from 'viem'
    
    -const result = encodeAbi({ params, values })
    +const result = encodeAbiParameters(params, values)
    
    -const result = decodeAbi({ params, data })
    +const result = decodeAbiParameters(params, data)
    
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • e1634b5 Thanks @jxom! - Fixed ABI encoding dynamic tuple child derivation
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 1971e6a Thanks @jxom! - Added assertion to check if addresses are valid for sendTransaction, estimateGas & call.
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 7243744 Thanks @jxom! - Added support for 4001 & 4902 RPC error codes.
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • #89 3e45853 Thanks @jxom! - Added fetchOptions to the http transport.

  • #91 0ac32c2 Thanks @jxom! - Breaking: Renamed getFunctionSignature and getEventSignature to getFunctionSelector and getEventSelector.

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • #81 eb572b0 Thanks @jxom! - Improved transaction & contract error messaging & coalesce error messages from nodes.
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 6bdee9c Thanks @jxom! - Fixed issue where fallback transport was not falling back on timeouts
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 8ef068b Thanks @jxom! - Added 502, 503 and 504 error codes as "non-deterministic" errors for fallback transport & retries.

  • #79 db9caa9 Thanks @jxom! - Added timeout as a config option to the http and webSocket Transports.

  • #77 d6a29f5 Thanks @jxom! - Decorated Clients with their respective Actions.

    Example:

    import { createPublicClient, http } from 'viem'
    import { mainnet } from 'viem/chains'
    -import { getBlockNumber } from 'viem/public'
    
    const client = createPublicClient({
      chain: mainnet,
      transport: http(),
    })
    
    - const blockNumber = await getBlockNumber(client)
    + const blockNumber = await client.getBlockNumber()
    
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 7d9a241 Thanks @jxom! - Added estimateContractGas.

  • 7d9a241 Thanks @jxom! - Added retryCount and retryDelay config to Transports.

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • 6c902f8 Thanks @jxom! - Added decodeEventLog.

  • #68 1be77b3 Thanks @jxom! - Breaking: Removed all public/wallet/test actions & utils from the viem entrypoint to their respective entrypoints:

    • viem = Clients & Transport exports
    • viem/chains = Chains exports
    • viem/contract = Contract Actions & Utils exports
    • viem/ens = ENS Actions & Utils exports
    • viem/public = Public Actions exports
    • viem/test = Test Actions exports
    • viem/utils = Utils exports
    • viem/wallet = Wallet Actions exports
  • #66 f19fc32 Thanks @tmm! - Added ENS actions getEnsAddress and getEnsName.

viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes

  • #63 7473582 Thanks @tmm! - Exported missing watchContractEvent and watchEvent actions.
viem - [email protected]

Published by github-actions[bot] over 1 year ago

Patch Changes