diff --git a/README.md b/README.md index 26906d0..76b9ced 100644 --- a/README.md +++ b/README.md @@ -27,8 +27,23 @@ ansible-playbook main_hermes_install.yml ### Hermes deployment -You will want to maintain your own `mainnet.toml.j2` file in the `hermes_config` playbook +Here are two modes to deploy Hermes. For the Scaffolding Mode, you will specify a list of networks in the inventory file. For the Customization Mode, you will maintain your own jinja template. + +For both, you will need to specify `key_name`, `memo` and a list of target ips in the inventory file. Examples are provided in the sample file. ```bash ansible-playbook main_hermes_config.yml -e "target=mainnet" +ansible-playbook main_hermes_config.yml -e "target=testnet" ``` + +#### Scaffolding Mode + +This mode is suitable if you just want to get the relay going quickly among a few networks. + +You will fill in the list of networks you want to relay in the `mainnet_networks` or `testnet_networks` variables in the inventory file. The scaffolded config file will relay any channels among these networks. + +#### Customization Mode + +This mode is suitable when you connect lots of different networks and you want to fine-tune how they connect with each other. + +You will leave `mainnet_networks` or `testnet_networks` blank in the inventory file. You will customize the `mainnet.toml.j2` or `testnet.toml.j2` using our files as the starting point. diff --git a/inventory.sample.ini b/inventory.sample.ini index 118f156..a4f3e9c 100644 --- a/inventory.sample.ini +++ b/inventory.sample.ini @@ -6,8 +6,11 @@ ansible_user=ubuntu ansible_port=22 ansible_ssh_private_key_file="~/.ssh/id_rsa" -# Relay Memo -memo: 'Relayed by Polkachu' +# Relay +key_name="relayer" +memo='Relayed by Polkachu' +mainnet_networks=[] +testnet_networks=[] # You will add more juno_ip="10.0.0.2" diff --git a/roles/hermes_config/tasks/main.yml b/roles/hermes_config/tasks/main.yml index ce7822a..1a45453 100644 --- a/roles/hermes_config/tasks/main.yml +++ b/roles/hermes_config/tasks/main.yml @@ -6,13 +6,23 @@ group: '{{ ansible_user }}' state: directory -- name: Copy hermes config script +- name: Copy hermes config script with customization template: src: '{{ target }}.toml.j2' dest: '/home/{{ ansible_user }}/.hermes/{{ target }}.toml' owner: '{{ ansible_user }}' group: '{{ ansible_user }}' mode: '0644' + when: mainnet_networks is not defined or mainnet_networks|length == 0 + +- name: Copy hermes config script with scaffolding + template: + src: 'scaffold.toml.j2' + dest: '/home/{{ ansible_user }}/.hermes/{{ target }}.toml' + owner: '{{ ansible_user }}' + group: '{{ ansible_user }}' + mode: '0644' + when: mainnet_networks is defined and mainnet_networks|length > 0 - name: create hermes systemd unit become: true diff --git a/roles/hermes_config/templates/fragments/agoric.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/agoric.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/agoric.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/agoric.toml.j2 index d5f4a62..151ae63 100644 --- a/roles/hermes_config/templates/fragments/agoric.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/agoric.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws:/{{ agoric_ip }}:14457/websocket' rpc_timeout = '20s' account_prefix = 'agoric' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/akash.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/akash.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/akash.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/akash.toml.j2 index bfaa866..2d83240 100644 --- a/roles/hermes_config/templates/fragments/akash.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/akash.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws:/{{ akash_ip }}:12857/websocket' rpc_timeout = '20s' account_prefix = 'akash' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 100000 diff --git a/roles/hermes_config/templates/fragments/axelar.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/axelar.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/axelar.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/axelar.toml.j2 index dbbc1a7..b645897 100644 --- a/roles/hermes_config/templates/fragments/axelar.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/axelar.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ axelar_ip }}:15157/websocket' rpc_timeout = '20s' account_prefix = 'axelar' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 200000 diff --git a/roles/hermes_config/templates/fragments/bitcanna.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/bitcanna.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/bitcanna.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/bitcanna.toml.j2 index 90c435c..a06841a 100644 --- a/roles/hermes_config/templates/fragments/bitcanna.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/bitcanna.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ bitcanna_ip }}:13057/websocket' rpc_timeout = '20s' account_prefix = 'bcna' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'cosmos' } default_gas = 100000 diff --git a/roles/hermes_config/templates/fragments/cheqd.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/cheqd.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/cheqd.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/cheqd.toml.j2 index 68fa796..2fe0b22 100644 --- a/roles/hermes_config/templates/fragments/cheqd.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/cheqd.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ cheqd_ip }}:16157/websocket' rpc_timeout = '30s' account_prefix = 'cheqd' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = {derivation = 'cosmos'} store_prefix = 'ibc' default_gas = 1000000 diff --git a/roles/hermes_config/templates/fragments/chihuahua.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/chihuahua.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/chihuahua.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/chihuahua.toml.j2 index 8c5bd24..42fde5d 100644 --- a/roles/hermes_config/templates/fragments/chihuahua.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/chihuahua.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ chihuahua_ip }}:12957/websocket' rpc_timeout = '20s' account_prefix = 'chihuahua' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/cosmos.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/cosmos.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/cosmos.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/cosmos.toml.j2 index 26ef133..0405aa2 100644 --- a/roles/hermes_config/templates/fragments/cosmos.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/cosmos.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ cosmos_ip }}:14957/websocket' rpc_timeout = '20s' account_prefix = 'cosmos' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/crescent.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/crescent.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/crescent.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/crescent.toml.j2 index 09e2e99..6619293 100644 --- a/roles/hermes_config/templates/fragments/crescent.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/crescent.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ crescent_ip }}:14557/websocket' rpc_timeout = '20s' account_prefix = 'cre' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 400000 diff --git a/roles/hermes_config/templates/fragments/evmos.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/evmos.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/evmos.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/evmos.toml.j2 index 25b0913..2e6b060 100644 --- a/roles/hermes_config/templates/fragments/evmos.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/evmos.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ evmos_ip }}:13457/websocket' rpc_timeout = '20s' account_prefix = 'evmos' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'ethermint', proto_type = { pk_type = '/ethermint.crypto.v1.ethsecp256k1.PubKey' } } default_gas = 400000 diff --git a/roles/hermes_config/templates/fragments/gravity.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/gravity.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/gravity.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/gravity.toml.j2 index 4e21e3b..42bb03e 100644 --- a/roles/hermes_config/templates/fragments/gravity.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/gravity.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ gravity_ip }}:14257/websocket' rpc_timeout = '20s' account_prefix = 'gravity' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/injective.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/injective.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/injective.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/injective.toml.j2 index d1feffa..9dbc196 100644 --- a/roles/hermes_config/templates/fragments/injective.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/injective.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ injective_ip }}:14357/websocket' rpc_timeout = '20s' account_prefix = 'inj' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'ethermint', proto_type = { pk_type = '/injective.crypto.v1beta1.ethsecp256k1.PubKey' } } store_prefix = 'ibc' default_gas = 400000 diff --git a/roles/hermes_config/templates/fragments/juno.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/juno.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/juno.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/juno.toml.j2 index 72351bd..fb2b3e8 100644 --- a/roles/hermes_config/templates/fragments/juno.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/juno.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ juno_ip }}:12657/websocket' rpc_timeout = '20s' account_prefix = 'juno' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/kichain.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/kichain.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/kichain.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/kichain.toml.j2 index 6c0edf6..b32e744 100644 --- a/roles/hermes_config/templates/fragments/kichain.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/kichain.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ kichain_ip }}:13557/websocket' rpc_timeout = '20s' account_prefix = 'ki' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'cosmos' } default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/kujira.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/kujira.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/kujira.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/kujira.toml.j2 index e353764..5418ae9 100644 --- a/roles/hermes_config/templates/fragments/kujira.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/kujira.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ kujira_ip }}:11857/websocket' rpc_timeout = '20s' account_prefix = 'kujira' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/osmosis.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/osmosis.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/osmosis.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/osmosis.toml.j2 index 20761aa..544fc5d 100644 --- a/roles/hermes_config/templates/fragments/osmosis.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/osmosis.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ osmosis_ip }}:12557/websocket' rpc_timeout = '20s' account_prefix = 'osmo' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 400000 diff --git a/roles/hermes_config/templates/fragments/secret.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/secret.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/secret.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/secret.toml.j2 index ef93f7a..420862a 100644 --- a/roles/hermes_config/templates/fragments/secret.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/secret.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ secret_ip }}:17157/websocket' rpc_timeout = '30s' account_prefix = 'secret' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 100000 diff --git a/roles/hermes_config/templates/fragments/sifchain.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/sifchain.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/sifchain.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/sifchain.toml.j2 index 86f18be..7e512f7 100644 --- a/roles/hermes_config/templates/fragments/sifchain.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/sifchain.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ sifchain_ip }}:13257/websocket' rpc_timeout = '20s' account_prefix = 'sif' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'cosmos' } default_gas = 100000 diff --git a/roles/hermes_config/templates/fragments/stargaze.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/stargaze.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/stargaze.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/stargaze.toml.j2 index 6afadf7..548ef73 100644 --- a/roles/hermes_config/templates/fragments/stargaze.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/stargaze.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ stargaze_ip }}:13757/websocket' rpc_timeout = '20s' account_prefix = 'stars' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'cosmos' } default_gas = 300000 diff --git a/roles/hermes_config/templates/fragments/stride.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/stride.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/stride.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/stride.toml.j2 index 4e7f24a..94b57e0 100644 --- a/roles/hermes_config/templates/fragments/stride.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/stride.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ umee_ip }}:12257/websocket' rpc_timeout = '20s' account_prefix = 'stride' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'cosmos' } default_gas = 100000 diff --git a/roles/hermes_config/templates/fragments/terra2.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/terra2.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/terra2.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/terra2.toml.j2 index 227b5d0..d921700 100644 --- a/roles/hermes_config/templates/fragments/terra2.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/terra2.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ terra2_ip }}:11757/websocket' rpc_timeout = '20s' account_prefix = 'terra' -key_name = 'relayer' +key_name = '{{ key_name }}' address_type = { derivation = 'cosmos' } store_prefix = 'ibc' default_gas = 100000 diff --git a/roles/hermes_config/templates/fragments/umee.toml.j2 b/roles/hermes_config/templates/fragments/mainnet/umee.toml.j2 similarity index 95% rename from roles/hermes_config/templates/fragments/umee.toml.j2 rename to roles/hermes_config/templates/fragments/mainnet/umee.toml.j2 index f0f4cae..96cde56 100644 --- a/roles/hermes_config/templates/fragments/umee.toml.j2 +++ b/roles/hermes_config/templates/fragments/mainnet/umee.toml.j2 @@ -6,7 +6,7 @@ websocket_addr = 'ws://{{ umee_ip }}:13657/websocket' rpc_timeout = '20s' account_prefix = 'umee' -key_name = 'relayer' +key_name = '{{ key_name }}' store_prefix = 'ibc' address_type = { derivation = 'cosmos' } default_gas = 100000 diff --git a/roles/hermes_config/templates/hermes.service.j2 b/roles/hermes_config/templates/hermes.service.j2 index fdc54a8..039d3d8 100644 --- a/roles/hermes_config/templates/hermes.service.j2 +++ b/roles/hermes_config/templates/hermes.service.j2 @@ -4,7 +4,7 @@ After=network.target [Service] Type=simple User={{ ansible_user }} -ExecStart=/usr/local/bin/hermes --config /home/ubuntu/.hermes/{{ target }}.toml start +ExecStart=/usr/local/bin/hermes --config /home/{{ ansible_user }}/.hermes/{{ target }}.toml start Restart=always RestartSec=5 diff --git a/roles/hermes_config/templates/mainnet.toml.j2 b/roles/hermes_config/templates/mainnet.toml.j2 index bef9b2f..037b720 100644 --- a/roles/hermes_config/templates/mainnet.toml.j2 +++ b/roles/hermes_config/templates/mainnet.toml.j2 @@ -1,7 +1,7 @@ {% include 'fragments/header.toml.j2' %} -{% include 'fragments/agoric.toml.j2' %} +{% include 'fragments/mainnet/agoric.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -10,7 +10,7 @@ list = [ ['transfer', 'channel-1'], # Osmosis ] -{% include 'fragments/akash.toml.j2' %} +{% include 'fragments/mainnet/akash.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -19,7 +19,7 @@ list = [ ['transfer', 'channel-9'], # Osmosis ] -{% include 'fragments/axelar.toml.j2' %} +{% include 'fragments/mainnet/axelar.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -32,7 +32,7 @@ list = [ ['transfer', 'channel-36'], # Umee ] -{% include 'fragments/bitcanna.toml.j2' %} +{% include 'fragments/mainnet/bitcanna.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -41,7 +41,7 @@ list = [ ['transfer', 'channel-1'], # Osmosis ] -{% include 'fragments/chihuahua.toml.j2' %} +{% include 'fragments/mainnet/chihuahua.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -52,7 +52,7 @@ list = [ ['transfer', 'channel-7'], # Osmosis ] -{% include 'fragments/cosmos.toml.j2' %} +{% include 'fragments/mainnet/cosmos.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -65,7 +65,7 @@ list = [ ['transfer', 'channel-391'], # Stride ] -{% include 'fragments/crescent.toml.j2' %} +{% include 'fragments/mainnet/crescent.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -78,7 +78,7 @@ list = [ ['transfer', 'channel-9'], # Osmosis ] -{% include 'fragments/evmos.toml.j2' %} +{% include 'fragments/mainnet/evmos.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -91,7 +91,7 @@ list = [ ['transfer', 'channel-25'], # Stride ] -{% include 'fragments/gravity.toml.j2' %} +{% include 'fragments/mainnet/gravity.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -104,7 +104,7 @@ list = [ ['transfer', 'channel-28'], # Umee ] -{% include 'fragments/injective.toml.j2' %} +{% include 'fragments/mainnet/injective.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -117,7 +117,7 @@ list = [ ['transfer', 'channel-89'], # Stride ] -{% include 'fragments/kichain.toml.j2' %} +{% include 'fragments/mainnet/kichain.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -126,7 +126,7 @@ list = [ ['transfer', 'channel-0'], # Osmosis ] -{% include 'fragments/kujira.toml.j2' %} +{% include 'fragments/mainnet/kujira.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -140,7 +140,7 @@ list = [ ['transfer', 'channel-32'], # Stride ] -{% include 'fragments/juno.toml.j2' %} +{% include 'fragments/mainnet/juno.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -159,7 +159,7 @@ list = [ ['transfer', 'channel-62'], # Umee ] -{% include 'fragments/osmosis.toml.j2' %} +{% include 'fragments/mainnet/osmosis.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -182,7 +182,7 @@ list = [ ['transfer', 'channel-184'], # Umee ] -{% include 'fragments/sifchain.toml.j2' %} +{% include 'fragments/mainnet/sifchain.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -191,7 +191,7 @@ list = [ ['transfer', 'channel-17'], # Osmosis ] -{% include 'fragments/stargaze.toml.j2' %} +{% include 'fragments/mainnet/stargaze.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -203,7 +203,7 @@ list = [ ['transfer', 'channel-0'], # Osmosis ] -{% include 'fragments/stride.toml.j2' %} +{% include 'fragments/mainnet/stride.toml.j2' %} [chains.packet_filter] policy = 'allow' @@ -216,7 +216,7 @@ list = [ ['transfer', 'channel-5'], # Osmosis ] -{% include 'fragments/umee.toml.j2' %} +{% include 'fragments/mainnet/umee.toml.j2' %} [chains.packet_filter] policy = 'allow' diff --git a/roles/hermes_config/templates/scaffold.toml.j2 b/roles/hermes_config/templates/scaffold.toml.j2 new file mode 100644 index 0000000..0fca64e --- /dev/null +++ b/roles/hermes_config/templates/scaffold.toml.j2 @@ -0,0 +1,21 @@ +{% if target == 'mainnet' %} + {% set networks = mainnet_networks %} +{% else %} + {% set networks = testnet_networks %} +{% endif %} + +{% include 'fragments/header.toml.j2' %} + +{% for network in mainnet_networks %} + +{% set fragment = 'fragments/' + target + '/' + network + '.toml.j2' %} +{% include fragment%} + + +[chains.packet_filter] +policy = 'allow' +list = [ + ['transfer', '*'], +] + +{% endfor %} \ No newline at end of file diff --git a/roles/hermes_config/templates/testnet.toml.j2 b/roles/hermes_config/templates/testnet.toml.j2 new file mode 100644 index 0000000..4aef00f --- /dev/null +++ b/roles/hermes_config/templates/testnet.toml.j2 @@ -0,0 +1,4 @@ +{% include 'fragments/header.toml.j2' %} + + +TBD \ No newline at end of file