logo
logo

Search packages

Substreams Package LogoChain Logo
uniswap_v3
521

spkg.io/streamingfast/uniswap-v3-v0.2.7.spkg

These substream modules compose all the things to build up the Uniswap v3 substreams. See individual modules docs for help.

Message

Modules

sf/substreams/v1/modules.proto

message Modules {
  repeated Module modules = 1;
  repeated Binary binaries = 2;
}

Binary represents some code compiled to its binary form.

Message

Binary

sf/substreams/v1/modules.proto

message Binary {
  string type = 1;
  bytes content = 2;
}

Message

Module

sf/substreams/v1/modules.proto

message Module {
  string name = 1;
  oneof kind {
    KindMap kind_map = 2;
    KindStore kind_store = 3;
  }

Message

Module.KindMap

sf/substreams/v1/modules.proto

message KindMap {
    string output_type = 1;
  }

Message

Module.KindStore

sf/substreams/v1/modules.proto

message KindStore {
    // The `update_policy` determines the functions available to mutate the store
    // (like `set()`, `set_if_not_exists()` or `sum()`, etc..) in
    // order to ensure that parallel operations are possible and deterministic
    //
    // Say a store cumulates keys from block 0 to 1M, and a second store
    // cumulates keys from block 1M to 2M. When we want to use this
    // store as a dependency for a downstream module, we will merge the
    // two stores according to this policy.
    UpdatePolicy update_policy = 1;
    string value_type = 2;
    enum UpdatePolicy {
      UPDATE_POLICY_UNSET = 0;
      // Provides a store where you can `set()` keys, and the latest key wins
      UPDATE_POLICY_SET = 1;
      // Provides a store where you can `set_if_not_exists()` keys, and the first key wins
      UPDATE_POLICY_SET_IF_NOT_EXISTS = 2;
      // Provides a store where you can `add_*()` keys, where two stores merge by summing its values.
      UPDATE_POLICY_ADD = 3;
      // Provides a store where you can `min_*()` keys, where two stores merge by leaving the minimum value.
      UPDATE_POLICY_MIN = 4;
      // Provides a store where you can `max_*()` keys, where two stores merge by leaving the maximum value.
      UPDATE_POLICY_MAX = 5;
      // Provides a store where you can `append()` keys, where two stores merge by concatenating the bytes in order.
      UPDATE_POLICY_APPEND = 6;
    }

Enum

Module.KindStore.UpdatePolicy

sf/substreams/v1/modules.proto

enum UpdatePolicy {
      UPDATE_POLICY_UNSET = 0;
      // Provides a store where you can `set()` keys, and the latest key wins
      UPDATE_POLICY_SET = 1;
      // Provides a store where you can `set_if_not_exists()` keys, and the first key wins
      UPDATE_POLICY_SET_IF_NOT_EXISTS = 2;
      // Provides a store where you can `add_*()` keys, where two stores merge by summing its values.
      UPDATE_POLICY_ADD = 3;
      // Provides a store where you can `min_*()` keys, where two stores merge by leaving the minimum value.
      UPDATE_POLICY_MIN = 4;
      // Provides a store where you can `max_*()` keys, where two stores merge by leaving the maximum value.
      UPDATE_POLICY_MAX = 5;
      // Provides a store where you can `append()` keys, where two stores merge by concatenating the bytes in order.
      UPDATE_POLICY_APPEND = 6;
    }

Message

Module.Input

sf/substreams/v1/modules.proto

message Input {
    oneof input {
      Source source = 1;
      Map map = 2;
      Store store = 3;
      Params params = 4;
    }

Message

Module.Input.Source

sf/substreams/v1/modules.proto

message Source {
      string type = 1; // ex: "sf.ethereum.type.v1.Block"
    }

Message

Module.Input.Map

sf/substreams/v1/modules.proto

message Map {
      string module_name = 1; // ex: "block_to_pairs"
    }

Message

Module.Input.Store

sf/substreams/v1/modules.proto

message Store {
      string module_name = 1;
      Mode mode = 2;
      enum Mode {
        UNSET = 0;
        GET = 1;
        DELTAS = 2;
      }

Enum

Module.Input.Store.Mode

sf/substreams/v1/modules.proto

enum Mode {
        UNSET = 0;
        GET = 1;
        DELTAS = 2;
      }

Message

Module.Input.Params

sf/substreams/v1/modules.proto

message Params {
      string value = 1;
    }

Message

Module.Output

sf/substreams/v1/modules.proto

message Output {
    string type = 1;
  }

Message

Package

sf/substreams/v1/package.proto

message Package {
  // Needs to be one so this file can be used _directly_ as a
  // buf `Image` andor a ProtoSet for grpcurl and other tools
  repeated google.protobuf.FileDescriptorProto proto_files = 1;
  reserved 2 to 4;
  uint64 version = 5;
  Modules modules = 6;
  repeated ModuleMetadata module_meta = 7;
  repeated PackageMetadata package_meta = 8;
  // Source network for Substreams to fetch its data from.
  string network = 9;
  google.protobuf.Any sink_config = 10;
  string sink_module = 11;
  // image is the bytes to a JPEG, WebP or GIF file. Max size is 2 MiB
  bytes image = 12;
}

Message

PackageMetadata

sf/substreams/v1/package.proto

message PackageMetadata {
  string version = 1;
  string url = 2;
  string name = 3;
  string doc = 4;
}

Message

ModuleMetadata

sf/substreams/v1/package.proto

message ModuleMetadata {
  // Corresponds to the index in `Package.metadata.package_meta`
  uint64 package_index = 1;
  string doc = 2;
}

Clock is a pointer to a block with added timestamp

Message

Clock

sf/substreams/v1/clock.proto

message Clock {
  string id = 1;
  uint64 number = 2;
  google.protobuf.Timestamp timestamp = 3;
}

BlockRef is a pointer to a block to which we don't know the timestamp

Message

BlockRef

sf/substreams/v1/clock.proto

message BlockRef {
  string id = 1;
  uint64 number = 2;
}

© StreamingFast 2023.

Privacy Policy

Terms of Service

Built in collaboration with Pinax.