feat(template): Add template for singleton protocols.

Separate templates and add one for protocols with only a single contract.
This commit is contained in:
kayibal
2025-01-30 15:54:25 -03:00
committed by Alan Höng
parent d0e73a20ea
commit 08d2c7a82e
26 changed files with 2141 additions and 43 deletions

View File

@@ -0,0 +1,67 @@
specVersion: v0.1.0
package:
name: "ethereum_template"
version: v0.1.0
protobuf:
files:
- tycho/evm/v1/vm.proto
- tycho/evm/v1/common.proto
- tycho/evm/v1/utils.proto
importPaths:
- ../../proto
binaries:
default:
type: wasm/rust-v1
file: ../target/wasm32-unknown-unknown/release/ethereum_template_factory.wasm
network: mainnet
modules:
- name: map_protocol_components
kind: map
initialBlock: 1
inputs:
- source: sf.ethereum.type.v2.Block
output:
type: proto:tycho.evm.v1.BlockTransactionProtocolComponents
- name: store_protocol_components
kind: store
initialBlock: 1
updatePolicy: set
valueType: string
inputs:
- map: map_protocol_components
- name: map_relative_component_balance
kind: map
initialBlock: 1
inputs:
- source: sf.ethereum.type.v2.Block
- store: store_protocol_components
output:
type: proto:tycho.evm.v1.BlockBalanceDeltas
- name: store_balances
kind: store
initialBlock: 1
updatePolicy: add
valueType: bigint
inputs:
- map: map_relative_component_balance
- name: map_protocol_changes
kind: map
initialBlock: 1
inputs:
- source: sf.ethereum.type.v2.Block
- map: map_protocol_components
- map: map_relative_component_balance
- store: store_protocol_components
- store: store_balances
mode: deltas
output:
type: proto:tycho.evm.v1.BlockChanges