diff --git a/substreams/ethereum-uniswap-v3-logs-only/base-uniswap-v3.yaml b/substreams/ethereum-uniswap-v3-logs-only/base-uniswap-v3.yaml index d0965a5..eee19e6 100644 --- a/substreams/ethereum-uniswap-v3-logs-only/base-uniswap-v3.yaml +++ b/substreams/ethereum-uniswap-v3-logs-only/base-uniswap-v3.yaml @@ -14,7 +14,6 @@ protobuf: - ../../proto/ excludePaths: - sf/ethereum - - sf/substreams - google binaries: diff --git a/substreams/ethereum-uniswap-v4/base-uniswap-v4.yaml b/substreams/ethereum-uniswap-v4/base-uniswap-v4.yaml index b3dea69..26c520b 100644 --- a/substreams/ethereum-uniswap-v4/base-uniswap-v4.yaml +++ b/substreams/ethereum-uniswap-v4/base-uniswap-v4.yaml @@ -2,6 +2,7 @@ specVersion: v0.1.0 package: name: "base_uniswap_v4" version: v0.2.1 + url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-uniswap-v4" protobuf: files: @@ -14,7 +15,6 @@ protobuf: - ./proto excludePaths: - sf/ethereum - - sf/substreams - google binaries: diff --git a/substreams/ethereum-uniswap-v4/ethereum-uniswap-v4.yaml b/substreams/ethereum-uniswap-v4/ethereum-uniswap-v4.yaml index 1b12917..9f2eb5b 100644 --- a/substreams/ethereum-uniswap-v4/ethereum-uniswap-v4.yaml +++ b/substreams/ethereum-uniswap-v4/ethereum-uniswap-v4.yaml @@ -2,6 +2,7 @@ specVersion: v0.1.0 package: name: "ethereum_uniswap_v4" version: v0.2.1 + url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-uniswap-v4" protobuf: files: @@ -14,7 +15,6 @@ protobuf: - ./proto excludePaths: - sf/ethereum - - sf/substreams - google binaries: diff --git a/substreams/ethereum-uniswap-v4/sepolia-uniswap-v4.yaml b/substreams/ethereum-uniswap-v4/sepolia-uniswap-v4.yaml index 8ca1e37..5965057 100644 --- a/substreams/ethereum-uniswap-v4/sepolia-uniswap-v4.yaml +++ b/substreams/ethereum-uniswap-v4/sepolia-uniswap-v4.yaml @@ -2,6 +2,7 @@ specVersion: v0.1.0 package: name: "ethereum_uniswap_v4" version: v0.2.1 + url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-uniswap-v4" protobuf: files: @@ -14,7 +15,6 @@ protobuf: - ./proto excludePaths: - sf/ethereum - - sf/substreams - google binaries: @@ -81,7 +81,7 @@ modules: valueType: bigint inputs: - map: map_balance_changes - + - name: map_ticks_changes kind: map initialBlock: 6894393 @@ -97,7 +97,7 @@ modules: valueType: bigint inputs: - map: map_ticks_changes - + - name: map_liquidity_changes kind: map initialBlock: 6894393 @@ -133,6 +133,6 @@ modules: mode: deltas output: type: proto:tycho.evm.v1.BlockChanges - + params: map_pools_created: "8c4bcbe6b9ef47855f97e675296fa3f6fafa5f1a" diff --git a/substreams/ethereum-uniswap-v4/unichain-uniswap-v4.yaml b/substreams/ethereum-uniswap-v4/unichain-uniswap-v4.yaml new file mode 100644 index 0000000..12a131d --- /dev/null +++ b/substreams/ethereum-uniswap-v4/unichain-uniswap-v4.yaml @@ -0,0 +1,138 @@ +specVersion: v0.1.0 +package: + name: "unichain_uniswap_v4" + version: v0.2.1 + url: "https://github.com/propeller-heads/tycho-protocol-sdk/tree/main/substreams/ethereum-uniswap-v4" + +protobuf: + files: + - tycho/evm/v1/entity.proto + - tycho/evm/v1/common.proto + - tycho/evm/v1/utils.proto + - uniswap.proto + importPaths: + - ../../proto + - ./proto + excludePaths: + - sf/ethereum + - google + +binaries: + default: + type: wasm/rust-v1 + file: ../target/wasm32-unknown-unknown/release/ethereum_uniswap_v4.wasm + +modules: + - name: map_pools_created + kind: map + initialBlock: 0 + inputs: + - params: string + - source: sf.ethereum.type.v2.Block + output: + type: proto:tycho.evm.v1.BlockEntityChanges + + - name: store_pools + kind: store + initialBlock: 0 + updatePolicy: set_if_not_exists + valueType: proto:uniswap.v4.Pool + inputs: + - map: map_pools_created + + - name: map_events + kind: map + initialBlock: 0 + inputs: + - source: sf.ethereum.type.v2.Block + - store: store_pools + output: + type: proto:uniswap.v4.Events + + - name: store_pool_current_tick + kind: store + initialBlock: 0 + updatePolicy: set + valueType: int64 + inputs: + - map: map_events + + - name: store_pool_current_sqrt_price + kind: store + initialBlock: 0 + updatePolicy: set + valueType: bigint + inputs: + - map: map_events + + - name: map_balance_changes + kind: map + initialBlock: 0 + inputs: + - map: map_events + - store: store_pool_current_sqrt_price + output: + type: proto:tycho.evm.v1.BlockBalanceDeltas + + - name: store_pools_balances + kind: store + initialBlock: 0 + updatePolicy: add + valueType: bigint + inputs: + - map: map_balance_changes + + - name: map_ticks_changes + kind: map + initialBlock: 0 + inputs: + - map: map_events + output: + type: proto:uniswap.v4.TickDeltas + + - name: store_ticks_liquidity + kind: store + initialBlock: 0 + updatePolicy: add + valueType: bigint + inputs: + - map: map_ticks_changes + + - name: map_liquidity_changes + kind: map + initialBlock: 0 + inputs: + - map: map_events + - store: store_pool_current_tick + output: + type: proto:uniswap.v4.LiquidityChanges + + - name: store_liquidity + kind: store + initialBlock: 0 + updatePolicy: set_sum + valueType: bigint + inputs: + - map: map_liquidity_changes + + - name: map_protocol_changes + kind: map + initialBlock: 0 + inputs: + - source: sf.ethereum.type.v2.Block + - map: map_pools_created + - map: map_events + - map: map_balance_changes + - store: store_pools_balances + mode: deltas + - map: map_ticks_changes + - store: store_ticks_liquidity + mode: deltas + - map: map_liquidity_changes + - store: store_liquidity + mode: deltas + output: + type: proto:tycho.evm.v1.BlockChanges + +params: + map_pools_created: "1F98400000000000000000000000000000000004"