Skip to content

feat(cast): eth_subscribe with optional decoding #5023

@bernard-wagner

Description

@bernard-wagner

Component

Cast

Describe the feature you would like

Blocked by: #5022

Allow cast to be use to create subscriptions using eth_subscribe.

Subscribe to newHeads:

cast subscribe block
cast subscribe block --full
cast subscribe block --number

Ideally, events should be automatically decoded using local abi or etherscan source.

cast subscribe event  --address 0x00000 'eventSignature()`
cast subscribe event --topics '[0x00000, 0x000001]'
cast subscribe event --address 0x000000

Could add an alternative that does not decode events:

cast subscribe logs  --address 0x000000

Subscribe to newPendingTransactions:

cast subscribe tx --pending 
cast subscribe tx --pending  --from 0x0000
cast subscribe tx --pending  --value 1
cast subscribe tx --pending  'transfer(address,address,uint)`

Subscribe to tx using newHeads

cast subscribe tx  
cast subscribe tx --from 0x0000
cast subscribe tx  --to 0x000 --selector 0x000000
cast subscribe tx 'transfer(address,address,uint)` --from 0x00000

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions