Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

messari gen to generate spkg from ABI #115

Open
this-username-is-taken opened this issue Dec 11, 2022 · 0 comments
Open

messari gen to generate spkg from ABI #115

this-username-is-taken opened this issue Dec 11, 2022 · 0 comments
Assignees

Comments

@this-username-is-taken
Copy link
Contributor

The purpose of this command line option is to generate a "default" substreams module for any given ABI, such that it'll stream the events defined in the ABI.

For example, given the Uniswap v2 Factory contract, this command should generate an spkg with the following protobuf:

// event PairCreated(address indexed token0, address indexed token1, address pair);
message PairCreatedEvent {
  string contract_address = 1;
  string tx_hash = 2;
  uint32 log_index = 3;
  uint32 block_number = 4;
  uint64 block_time = 5;
  
  string token0 = 10;
  string token1 = 11;
  string pair = 12;
}

and the following module:

  - name: store_pair_created_events
    kind: store
    updatePolicy: set
    valueType: proto:messari.uniswap.v2.PairCreatedEvent
    initialBlock: 10000835
    inputs:
      - source: sf.ethereum.type.v2.Block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants