Skip to content

Commit

Permalink
Documented fee_granter in config.toml.
Browse files Browse the repository at this point in the history
Some fmt & clippy fixes.
  • Loading branch information
adizere committed Dec 7, 2021
1 parent e3098fe commit 16fc6a2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
6 changes: 6 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ memo_prefix = ''
# ['transfer', 'channel-0'],
# ]

# Specify that the transaction fees should be payed from this fee granter's account.
# Optional. If unspecified (the default behavior), then no fee granter is used, and
# the account specified in `key_name` will pay the tx fees for all transactions
# submitted to this chain.
# fee_granter = ''

[[chains]]
id = 'ibc-1'
rpc_addr = 'http://127.0.0.1:26557'
Expand Down
5 changes: 4 additions & 1 deletion relayer/src/chain/cosmos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@ impl CosmosSdkChain {

/// Get the fee granter address
fn fee_granter(&self) -> &str {
self.config.fee_granter.as_deref().unwrap_or(DEFAULT_FEE_GRANTER)
self.config
.fee_granter
.as_deref()
.unwrap_or(DEFAULT_FEE_GRANTER)
}

/// The gas price
Expand Down
1 change: 1 addition & 0 deletions relayer/src/chain/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ pub mod test_utils {
max_gas: None,
gas_price: GasPrice::new(0.001, "uatom".to_string()),
gas_adjustment: None,
fee_granter: None,
max_msg_num: Default::default(),
max_tx_size: Default::default(),
clock_drift: Duration::from_secs(5),
Expand Down

0 comments on commit 16fc6a2

Please sign in to comment.