store contract addresses in env variables

pull/1396/head
Ayrat Badykov 6 years ago
parent a852122c9c
commit 4aa59916f7
No known key found for this signature in database
GPG Key ID: B44668E265E9396F
  1. 8
      apps/explorer/lib/explorer/chain/supply/token_bridge.ex

@ -48,11 +48,15 @@ defmodule Explorer.Chain.Supply.TokenBridge do
end end
defp minted_coins do defp minted_coins do
call_contract(@block_reward_contract_address, @total_minted_coins_abi, @total_minted_coins_params) address = System.get_env("BLOCK_REWARD_CONTRACT") || @block_reward_contract_address
call_contract(address, @total_minted_coins_abi, @total_minted_coins_params)
end end
defp burned_coins do defp burned_coins do
call_contract(@token_bridge_contract_address, @total_burned_coins_abi, @total_burned_coins_params) address = System.get_env("TOKEN_BRIDGE_CONTRACT") || @token_bridge_contract_address
call_contract(address, @total_burned_coins_abi, @total_burned_coins_params)
end end
defp call_contract(address, abi, params) do defp call_contract(address, abi, params) do

Loading…
Cancel
Save