refactor: restructures agent config locations (#254)
* feature: restructures configs and from_settings * fix: settings takes agent name from macro * fix: replaces toml with json * fix: removes redundant agent config info * fix: derives prefix from agent name * fix: readds kathy config and deletes optics base config * fix: fixes kebab case rename for base settings and removes extra db_path fieldsbuddies-main-deployment
parent
740b4013c0
commit
0fa4283a70
@ -0,0 +1,49 @@ |
||||
{ |
||||
"replicas": [ |
||||
{ |
||||
"address": "0x0000000000000000000000000000000000000000", |
||||
"domain": 60, |
||||
"name": "ethereum", |
||||
"rpc-style": "ethereum", |
||||
"config": { |
||||
"connection": { |
||||
"type": "ws", |
||||
"url": "ws://localhost:8545" |
||||
}, |
||||
"signer": { |
||||
"key": "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc", |
||||
"type": "hex-key" |
||||
} |
||||
} |
||||
}, |
||||
{ |
||||
"address": "0x0000000000000000000000000000000000000000", |
||||
"domain": 61, |
||||
"name": "eth-classic", |
||||
"rpc-style": "ethereum", |
||||
"config": { |
||||
"connection": { |
||||
"type": "ws", |
||||
"url": "ws://localhost:8545" |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"home": { |
||||
"address": "0x0000000000000000000000000000000000000000", |
||||
"domain": 52752, |
||||
"name": "celo", |
||||
"rpc-style": "ethereum", |
||||
"config": { |
||||
"connection": { |
||||
"type": "http", |
||||
"url": "http://localhost:8545" |
||||
} |
||||
} |
||||
}, |
||||
"tracing": { |
||||
"level": "debug", |
||||
"style": "pretty" |
||||
}, |
||||
"db-path": "db_path" |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
"message-interval": 100, |
||||
"chat-gen-config": { |
||||
"destination": 1, |
||||
"message": "static message", |
||||
"recipient": "recipient", |
||||
"type": "static" |
||||
} |
||||
} |
@ -0,0 +1,3 @@ |
||||
{ |
||||
"polling-interval": 100 |
||||
} |
@ -0,0 +1,3 @@ |
||||
{ |
||||
"polling-interval": 100 |
||||
} |
@ -0,0 +1,8 @@ |
||||
{ |
||||
"polling-interval": 100, |
||||
"update-pause": 100, |
||||
"updater": { |
||||
"key": "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc", |
||||
"type": "hex-key" |
||||
} |
||||
} |
@ -0,0 +1,7 @@ |
||||
{ |
||||
"polling-interval": 100, |
||||
"watcher": { |
||||
"key": "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc", |
||||
"type": "hex-key" |
||||
} |
||||
} |
@ -1,15 +0,0 @@ |
||||
message-interval = 100 |
||||
chat-gen-config = { type = "static", destination = 1, recipient = "recipient", message = "static message" } |
||||
|
||||
[home] |
||||
name = "celo" |
||||
domain = 52752 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "Ethereum" |
||||
[home.config] |
||||
signer = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc" |
||||
connection = { type = "http", url = "http://localhost:8545" } |
||||
|
||||
[[replicas]] |
||||
# empty vector. |
||||
# no replicas needed for kathy |
@ -1,33 +0,0 @@ |
||||
[tracing] |
||||
level = "debug" |
||||
style = "pretty" |
||||
|
||||
# ChainSetup |
||||
[home] |
||||
name = "celo" |
||||
domain = 52752 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" # ChainConf (flattened into ChainSetup) |
||||
[home.config] |
||||
# Missing signer. Will use EthereumSigner::default() |
||||
connection = { type = "http", url = "http://localhost:8545" } |
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "ethereum" |
||||
domain = 60 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
signer = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
||||
|
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "eth-classic" |
||||
domain = 61 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
@ -1,36 +0,0 @@ |
||||
polling_interval = 100 |
||||
db_path = "db_path" |
||||
|
||||
[tracing] |
||||
level = "debug" |
||||
style = "pretty" |
||||
|
||||
# ChainSetup |
||||
[home] |
||||
name = "celo" |
||||
domain = 52752 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" # ChainConf (flattened into ChainSetup) |
||||
[home.config] |
||||
# Missing signer. Will use EthereumSigner::default() |
||||
connection = { type = "http", url = "http://localhost:8545" } |
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "ethereum" |
||||
domain = 60 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
signer = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
||||
|
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "eth-classic" |
||||
domain = 61 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
@ -1,10 +1,7 @@ |
||||
//! Configuration
|
||||
use optics_base::decl_settings; |
||||
|
||||
decl_settings!( |
||||
Settings { |
||||
"OPT_PROCESSOR", |
||||
db_path: String, |
||||
polling_interval: u64, |
||||
} |
||||
); |
||||
decl_settings!(Settings { |
||||
agent: "processor", |
||||
polling_interval: u64, |
||||
}); |
||||
|
@ -1,35 +0,0 @@ |
||||
polling_interval = 100 |
||||
|
||||
[tracing] |
||||
level = "debug" |
||||
style = "pretty" |
||||
|
||||
# ChainSetup |
||||
[home] |
||||
name = "celo" |
||||
domain = 52752 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" # ChainConf (flattened into ChainSetup) |
||||
[home.config] |
||||
# Missing signer. Will use EthereumSigner::default() |
||||
connection = { type = "http", url = "http://localhost:8545" } |
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "ethereum" |
||||
domain = 60 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
signer = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
||||
|
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "eth-classic" |
||||
domain = 61 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
@ -1,18 +0,0 @@ |
||||
updater = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
|
||||
db_path = "db_path" |
||||
polling_interval = 100 |
||||
update_pause = 100 |
||||
|
||||
[home] |
||||
name = "ethereum" |
||||
domain = 52752 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[home.config] |
||||
signer = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
connection = { type = "http", url = "http://localhost:8545" } |
||||
|
||||
[[replicas]] |
||||
# empty table. |
||||
# no replicas needed for updater |
@ -1,12 +1,9 @@ |
||||
//! Configuration
|
||||
use optics_base::{decl_settings, settings::ethereum::EthereumSigner}; |
||||
|
||||
decl_settings!( |
||||
Settings { |
||||
"OPT_UPDATER", |
||||
updater: EthereumSigner, |
||||
db_path: String, |
||||
polling_interval: u64, |
||||
update_pause: u64, |
||||
} |
||||
); |
||||
decl_settings!(Settings { |
||||
agent: "updater", |
||||
updater: EthereumSigner, |
||||
polling_interval: u64, |
||||
update_pause: u64, |
||||
}); |
||||
|
@ -1,36 +0,0 @@ |
||||
watcher = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
polling_interval = 100 |
||||
|
||||
[tracing] |
||||
level = "debug" |
||||
style = "pretty" |
||||
|
||||
# ChainSetup |
||||
[home] |
||||
name = "celo" |
||||
domain = 52752 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" # ChainConf (flattened into ChainSetup) |
||||
[home.config] |
||||
# Missing signer. Will use EthereumSigner::default() |
||||
connection = { type = "http", url = "http://localhost:8545" } |
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "ethereum" |
||||
domain = 60 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
signer = {type = "hex-key", key = "380eb0f3d505f087e438eca80bc4df9a7faa24f868e69fc0440261a0fc0567dc"} |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
||||
|
||||
|
||||
# Entry in Vec<ChainSetup> |
||||
[[replicas]] |
||||
name = "eth-classic" |
||||
domain = 61 |
||||
address = "0x0000000000000000000000000000000000000000" |
||||
rpc-style = "ethereum" |
||||
[replicas.config] |
||||
connection = { type = "ws", url = "ws://localhost:8545"} |
Loading…
Reference in new issue