diff --git a/config/feed.json b/config/feed.json index e2ff597..fe92fce 100644 --- a/config/feed.json +++ b/config/feed.json @@ -12,7 +12,7 @@ "setzerTimeout": 10, "setzerCacheExpiry": 120, "setzerMinMedian": 3, - "setzerEthRpcUrl": "https://mainnet.infura.io/v3/fac98e56ea7e49608825dfc726fab703" + "setzerEthRpcUrl": "" }, "sources":["gofer","setzer"], "transports":["spire","ssb-rpc"], diff --git a/config/relay.json b/config/relay.json index 99d477a..47cc895 100644 --- a/config/relay.json +++ b/config/relay.json @@ -12,7 +12,8 @@ ], "options": { "interval": 60, - "msgLimit": 20 + "msgLimit": 20, + "ethGas": 200000 }, "transports":["spire","ssb-rpc"], "pairs": { diff --git a/lib/config.sh b/lib/config.sh index 0ae982f..288fee4 100644 --- a/lib/config.sh +++ b/lib/config.sh @@ -277,6 +277,10 @@ importOptionsEnv () { SETZER_ETH_RPC_URL="$(echo "$_json" | jq -r '.setzerEthRpcUrl')" [[ -n "$SETZER_ETH_RPC_URL" ]] || errors+=("Error - Setzer ethereum RPC address is not set.") export SETZER_ETH_RPC_URL + elif [[ "$OMNIA_MODE" == "RELAY" ]]; then + ETH_GAS=$(echo "$_json" | jq -r '.ethGas // ""') + [[ -n "$ETH_GAS" ]] || ETH_GAS=200000 + export ETH_GAS fi [[ -z ${errors[*]} ]] || { printf '%s\n' "${errors[@]}"; return 1; } diff --git a/lib/ethereum.sh b/lib/ethereum.sh index 7ae38b5..291a89d 100644 --- a/lib/ethereum.sh +++ b/lib/ethereum.sh @@ -54,12 +54,12 @@ pushOraclePrice () { fi local _gasParams - _gasParams=(--gas-price "${_fees[0]}") + _gasParams=(--rpc-url "$ETH_RPC_URL" --gas-price "${_fees[0]}") [[ $ETH_TX_TYPE -eq 2 ]] && _gasParams+=(--prio-fee "${_fees[1]}") + _gasParams+=(--gas "$ETH_GAS") log "Sending tx..." - tx=$(ethereum --rpc-url "$ETH_RPC_URL" \ - "${_gasParams[@]}" \ + tx=$(ethereum "${_gasParams[@]}" \ send --async "$_oracleContract" 'poke(uint256[] memory,uint256[] memory,uint8[] memory,bytes32[] memory,bytes32[] memory)' \ "[$(join "${allPrices[@]}")]" \ "[$(join "${allTimes[@]}")]" \ diff --git a/lib/omnia.sh b/lib/omnia.sh index c1c8d1f..ad25b7c 100644 --- a/lib/omnia.sh +++ b/lib/omnia.sh @@ -30,7 +30,7 @@ initEnv () { echo " ETH_RPC_URL = $ETH_RPC_URL" echo " ETH_FROM = $ETH_FROM" echo " ETH_GAS_SOURCE = $ETH_GAS_SOURCE" - echo " ETH_MAXPRICE_MULTIPLIER = $ETH_MAXPRICE_MULTIPLIER" + echo " ETH_GAS = $ETH_GAS" echo " ETH_MAXPRICE_MULTIPLIER = $ETH_MAXPRICE_MULTIPLIER" [[ $ETH_GAS_SOURCE != "node" ]] && \ echo " ETH_GAS_PRIORITY = $ETH_GAS_PRIORITY" diff --git a/test/e2e/config/relay.conf b/test/e2e/config/relay.conf index 97405be..c47bfb1 100644 --- a/test/e2e/config/relay.conf +++ b/test/e2e/config/relay.conf @@ -4,7 +4,8 @@ "from": "0x1bb90cde8a032cb4963813a5b4db4981afa5b9c6", "keystore": "/home/omnia/.ethereum/keystore", "password": "/home/omnia/.ethereum/keystore/password", - "network": "http://geth.local:8545" + "network": "http://geth.local:8545", + "type": "ethereum" }, "feeds": [ "0x1bb90cde8a032cb4963813a5b4db4981afa5b9c6", @@ -13,7 +14,8 @@ "options": { "interval": 60, "msgLimit": 20, - "verbose": true + "verbose": true, + "ethGas": 200000 }, "sources":["setzer"], "transports":["e2e"], diff --git a/version b/version index feaae22..b50dd27 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.13.0 +1.13.1