diff --git a/abis/OffchainOracle.abi.json b/abis/OffchainOracle.abi.json
deleted file mode 100644
index 57b2d2a..0000000
--- a/abis/OffchainOracle.abi.json
+++ /dev/null
@@ -1,181 +0,0 @@
-[
- {
- "inputs": [
- { "internalType": "contract MultiWrapper", "name": "_multiWrapper", "type": "address" },
- { "internalType": "contract IOracle[]", "name": "existingOracles", "type": "address[]" },
- { "internalType": "enum OffchainOracle.OracleType[]", "name": "oracleTypes", "type": "uint8[]" },
- { "internalType": "contract IERC20[]", "name": "existingConnectors", "type": "address[]" },
- { "internalType": "contract IERC20", "name": "wBase", "type": "address" }
- ],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": false, "internalType": "contract IERC20", "name": "connector", "type": "address" }
- ],
- "name": "ConnectorAdded",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": false, "internalType": "contract IERC20", "name": "connector", "type": "address" }
- ],
- "name": "ConnectorRemoved",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": false, "internalType": "contract MultiWrapper", "name": "multiWrapper", "type": "address" }
- ],
- "name": "MultiWrapperUpdated",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": false, "internalType": "contract IOracle", "name": "oracle", "type": "address" },
- {
- "indexed": false,
- "internalType": "enum OffchainOracle.OracleType",
- "name": "oracleType",
- "type": "uint8"
- }
- ],
- "name": "OracleAdded",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": false, "internalType": "contract IOracle", "name": "oracle", "type": "address" },
- {
- "indexed": false,
- "internalType": "enum OffchainOracle.OracleType",
- "name": "oracleType",
- "type": "uint8"
- }
- ],
- "name": "OracleRemoved",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
- { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "inputs": [{ "internalType": "contract IERC20", "name": "connector", "type": "address" }],
- "name": "addConnector",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "contract IOracle", "name": "oracle", "type": "address" },
- { "internalType": "enum OffchainOracle.OracleType", "name": "oracleKind", "type": "uint8" }
- ],
- "name": "addOracle",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "connectors",
- "outputs": [{ "internalType": "contract IERC20[]", "name": "allConnectors", "type": "address[]" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "contract IERC20", "name": "srcToken", "type": "address" },
- { "internalType": "contract IERC20", "name": "dstToken", "type": "address" },
- { "internalType": "bool", "name": "useWrappers", "type": "bool" }
- ],
- "name": "getRate",
- "outputs": [{ "internalType": "uint256", "name": "weightedRate", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "contract IERC20", "name": "srcToken", "type": "address" },
- { "internalType": "bool", "name": "useSrcWrappers", "type": "bool" }
- ],
- "name": "getRateToEth",
- "outputs": [{ "internalType": "uint256", "name": "weightedRate", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "multiWrapper",
- "outputs": [{ "internalType": "contract MultiWrapper", "name": "", "type": "address" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "oracles",
- "outputs": [
- { "internalType": "contract IOracle[]", "name": "allOracles", "type": "address[]" },
- { "internalType": "enum OffchainOracle.OracleType[]", "name": "oracleTypes", "type": "uint8[]" }
- ],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "contract IERC20", "name": "connector", "type": "address" }],
- "name": "removeConnector",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [
- { "internalType": "contract IOracle", "name": "oracle", "type": "address" },
- { "internalType": "enum OffchainOracle.OracleType", "name": "oracleKind", "type": "uint8" }
- ],
- "name": "removeOracle",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "contract MultiWrapper", "name": "_multiWrapper", "type": "address" }],
- "name": "setMultiWrapper",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
-]
diff --git a/abis/OvmGasPriceOracle.abi.json b/abis/OvmGasPriceOracle.abi.json
deleted file mode 100644
index 8f239ad..0000000
--- a/abis/OvmGasPriceOracle.abi.json
+++ /dev/null
@@ -1,151 +0,0 @@
-[
- {
- "inputs": [{ "internalType": "address", "name": "_owner", "type": "address" }],
- "stateMutability": "nonpayable",
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }],
- "name": "DecimalsUpdated",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }],
- "name": "GasPriceUpdated",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }],
- "name": "L1BaseFeeUpdated",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }],
- "name": "OverheadUpdated",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" },
- { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" }
- ],
- "name": "OwnershipTransferred",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [{ "indexed": false, "internalType": "uint256", "name": "", "type": "uint256" }],
- "name": "ScalarUpdated",
- "type": "event"
- },
- {
- "inputs": [],
- "name": "decimals",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "gasPrice",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "bytes", "name": "_data", "type": "bytes" }],
- "name": "getL1Fee",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "bytes", "name": "_data", "type": "bytes" }],
- "name": "getL1GasUsed",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "l1BaseFee",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "overhead",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "owner",
- "outputs": [{ "internalType": "address", "name": "", "type": "address" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "renounceOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [],
- "name": "scalar",
- "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }],
- "stateMutability": "view",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "uint256", "name": "_decimals", "type": "uint256" }],
- "name": "setDecimals",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "uint256", "name": "_gasPrice", "type": "uint256" }],
- "name": "setGasPrice",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "uint256", "name": "_baseFee", "type": "uint256" }],
- "name": "setL1BaseFee",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "uint256", "name": "_overhead", "type": "uint256" }],
- "name": "setOverhead",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "uint256", "name": "_scalar", "type": "uint256" }],
- "name": "setScalar",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- },
- {
- "inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }],
- "name": "transferOwnership",
- "outputs": [],
- "stateMutability": "nonpayable",
- "type": "function"
- }
-]
diff --git a/components/withdraw/Withdraw.vue b/components/withdraw/Withdraw.vue
index 350022a..12fc6fa 100644
--- a/components/withdraw/Withdraw.vue
+++ b/components/withdraw/Withdraw.vue
@@ -337,6 +337,7 @@ export default {
})
}
this.$store.dispatch('application/setAndUpdateStatistic', { currency, amount: Number(amount) })
+ this.$store.dispatch('fees/calculateWithdrawalNetworkFee', {})
if (currency !== this.nativeCurrency) {
this.$store.dispatch('application/setDefaultEthToReceive', { currency })
}
diff --git a/components/withdraw/WithdrawTotal.vue b/components/withdraw/WithdrawTotal.vue
index 5fb68da..7c19361 100644
--- a/components/withdraw/WithdrawTotal.vue
+++ b/components/withdraw/WithdrawTotal.vue
@@ -18,7 +18,9 @@
{{ $t('networkFee') }}
- {{ toDecimals(networkFee, 18, 6) }} {{ networkCurrency }}
+ {{ toDecimals(withdrawalNetworkFee, 18, 6) }} {{ networkCurrency }}
{{ $t('relayerFee') }}
@@ -69,13 +71,13 @@ export default {
},
computed: {
...mapState('application', ['selectedStatistic']),
+ ...mapState('fees', ['withdrawalNetworkFee']),
...mapGetters('metamask', ['networkConfig', 'nativeCurrency']),
...mapGetters('metamask', {
networkCurrency: 'currency'
}),
- ...mapGetters('gasPrices', ['gasPriceInGwei']),
+ ...mapGetters('fees', ['gasPriceInGwei']),
...mapGetters('token', ['toDecimals', 'fromDecimals']),
- ...mapGetters('application', ['networkFee']),
...mapGetters('price', ['tokenRate']),
relayerFee() {
const { amount } = this.selectedStatistic
@@ -91,7 +93,7 @@ export default {
const tornadoServiceFee = this.relayerFee
const { currency } = this.selectedStatistic
const { decimals } = this.networkConfig.tokens[currency]
- const ethFee = this.networkFee
+ const ethFee = this.withdrawalNetworkFee
if (currency === this.nativeCurrency) {
return ethFee.add(tornadoServiceFee)
}
diff --git a/layouts/default.vue b/layouts/default.vue
index 0761589..cb45c5e 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -65,7 +65,7 @@ export default {
created() {
this.checkRecoveryKey()
this.newNotify()
- this.$store.dispatch('gasPrices/setDefault')
+ this.$store.dispatch('fees/setDefaultGasPrice')
},
mounted() {
this.$preventMultitabs()
@@ -80,7 +80,7 @@ export default {
await this.selectRpc({ netId: 1, action: this.preselectRpc })
}
- this.$store.dispatch('gasPrices/fetchGasPrice')
+ this.$store.dispatch('fees/fetchGasPrice')
this.$store.dispatch('price/fetchTokenPrice', {}, { root: true })
try {
this.$store.dispatch('application/loadAllNotesData')
diff --git a/package.json b/package.json
index 5f027cb..ca60d27 100644
--- a/package.json
+++ b/package.json
@@ -24,7 +24,7 @@
"@metamask/onboarding": "^1.0.0",
"@nuxtjs/moment": "^1.6.0",
"@tornado/snarkjs": "0.1.20-p2",
- "@tornado/tornado-oracles": "^0.3.0",
+ "@tornado/tornado-oracles": "1.0.0",
"@tornado/websnark": "0.0.4-p1",
"@walletconnect/web3-provider": "1.7.8",
"ajv": "^6.10.2",
diff --git a/store/application.js b/store/application.js
index dfbf7c3..30c9628 100644
--- a/store/application.js
+++ b/store/application.js
@@ -163,18 +163,6 @@ const getters = {
return ACTION_GAS[action]
},
- networkFee: (state, getters, rootState, rootGetters) => {
- const gasPrice = rootGetters['gasPrices/gasPrice']
-
- const networkFee = toBN(gasPrice).mul(toBN(state.relayerWithdrawGasLimit || getters.defaultWithdrawGas))
-
- if (getters.isOptimismConnected) {
- const l1Fee = rootGetters['gasPrices/l1Fee']
- return networkFee.add(toBN(l1Fee))
- }
-
- return networkFee
- },
relayerFee: (state, getters, rootState, rootGetters) => {
const { currency, amount } = rootState.application.selectedStatistic
const { decimals } = rootGetters['metamask/networkConfig'].tokens[currency]
@@ -185,7 +173,7 @@ const getters = {
const roundDecimal = 10 ** decimalsPoint
const aroundFee = toBN(parseInt(fee * roundDecimal, 10))
const tornadoServiceFee = total.mul(aroundFee).div(toBN(roundDecimal * 100))
- const ethFee = getters.networkFee
+ const ethFee = rootState.fees.withdrawalNetworkFee
switch (currency) {
case nativeCurrency: {
return ethFee.add(tornadoServiceFee)
@@ -648,7 +636,7 @@ const actions = {
const tornadoInstance = getters.instanceContract({ currency, amount, netId })
const relayer = rootState.relayer.selectedRelayer.address
- const gasPrice = toBN(rootGetters['gasPrices/gasPrice'])
+ const gasPrice = toBN(rootGetters['fees/gasPrice'])
let gasLimit
try {
@@ -993,7 +981,7 @@ const actions = {
},
calculateEthToReceive({ commit, state, rootGetters }, { currency }) {
const gasLimit = rootGetters['metamask/networkConfig'].tokens[currency].gasLimit
- const gasPrice = toBN(rootGetters['gasPrices/gasPrice'])
+ const gasPrice = toBN(rootGetters['fees/gasPrice'])
const ethToReceive = gasPrice
.mul(toBN(gasLimit))
diff --git a/store/fees.js b/store/fees.js
new file mode 100644
index 0000000..f842af5
--- /dev/null
+++ b/store/fees.js
@@ -0,0 +1,68 @@
+/* eslint-disable no-console */
+import { toWei, fromWei, toBN } from 'web3-utils'
+import { TornadoFeeOracleV4, TornadoFeeOracleV5 } from '@tornado/tornado-oracles'
+
+export const state = () => {
+ return {
+ gasPriceParams: { gasPrice: toWei(toBN(50), 'gwei') },
+ withdrawalNetworkFee: toBN(0)
+ }
+}
+
+export const getters = {
+ oracle: (state, getters, rootState, rootGetters) => {
+ const netId = Number(rootGetters['metamask/netId'])
+ const { url: rpcUrl } = rootState.settings[`netId${netId}`].rpc
+ const { gasPrices } = rootGetters['metamask/networkConfig']
+
+ // Return old oracle for backwards compatibility, if chain is ETH Mainnet
+ return netId === 1
+ ? new TornadoFeeOracleV4(netId, rpcUrl, gasPrices)
+ : new TornadoFeeOracleV5(netId, rpcUrl, gasPrices)
+ },
+ getGasPriceParams: (state) => {
+ return state.gasPriceParams
+ },
+ gasPrice: (state, getters) => {
+ const { gasPrice, maxFeePerGas } = getters.getGasPriceParams
+ return maxFeePerGas || gasPrice
+ },
+ gasPriceInGwei: (state, getters) => {
+ return fromWei(getters.gasPrice, 'gwei')
+ }
+}
+
+export const mutations = {
+ SAVE_GAS_PARAMS(state, payload) {
+ state.gasPriceParams = payload
+ },
+ SAVE_WITHDRAWAL_NETWORK_FEE(state, gasFee) {
+ state.withdrawalNetworkFee = gasFee
+ }
+}
+
+export const actions = {
+ async fetchGasPrice({ getters, dispatch, commit, rootGetters }) {
+ const { pollInterval } = rootGetters['metamask/networkConfig']
+
+ try {
+ const gasPriceParams = await getters.oracle.getGasPriceParams()
+ console.log(gasPriceParams)
+
+ commit('SAVE_GAS_PARAMS', gasPriceParams)
+ } catch (e) {
+ console.error('fetchGasPrice', e)
+ } finally {
+ setTimeout(() => dispatch('fetchGasPrice'), 2000 * pollInterval)
+ }
+ },
+ setDefaultGasPrice({ commit, rootGetters }) {
+ const { gasPrices } = rootGetters['metamask/networkConfig']
+ commit('SAVE_GAS_PARAMS', { gasPrice: toWei(gasPrices?.fast?.toFixed(9) || 0, 'gwei') })
+ },
+ async calculateWithdrawalNetworkFee({ getters, commit }, { tx }) {
+ const withdrawalGas = await getters.oracle.getGas(tx, 'user_withdrawal')
+
+ commit('SAVE_WITHDRAWAL_NETWORK_FEE', toBN(withdrawalGas))
+ }
+}
diff --git a/store/gasPrices.js b/store/gasPrices.js
deleted file mode 100644
index 8498cac..0000000
--- a/store/gasPrices.js
+++ /dev/null
@@ -1,142 +0,0 @@
-/* eslint-disable no-console */
-import Web3 from 'web3'
-import { toHex, toWei, fromWei, toBN } from 'web3-utils'
-import { GasPriceOracle } from '@tornado/gas-price-oracle'
-import { serialize } from '@ethersproject/transactions'
-
-import networkConfig from '@/networkConfig'
-import OvmGasPriceOracleABI from '@/abis/OvmGasPriceOracle.abi.json'
-import { DUMMY_NONCE, DUMMY_WITHDRAW_DATA } from '@/constants/variables'
-
-export const state = () => {
- return {
- gasParams: { gasPrice: toWei(toBN(50), 'gwei') },
- l1Fee: '0'
- }
-}
-
-export const getters = {
- oracle: (state, getters, rootState, rootGetters) => {
- const netId = Number(rootGetters['metamask/netId'])
- const { gasPrices } = rootGetters['metamask/networkConfig']
-
- return new GasPriceOracle({
- chainId: netId,
- defaultRpc: rootGetters['settings/currentRpc'].url,
- minPriority: netId === 1 || netId === 5 ? 2 : 0.05,
- percentile: 5,
- blocksCount: 20,
- defaultFallbackGasPrices: gasPrices
- })
- },
- ovmGasPriceOracleContract: (state, getters, rootState) => ({ netId }) => {
- const config = networkConfig[`netId${netId}`]
- const { url } = rootState.settings[`netId${netId}`].rpc
- const address = config.ovmGasPriceOracleContract
- if (address) {
- const web3 = new Web3(url)
-
- return new web3.eth.Contract(OvmGasPriceOracleABI, address)
- }
-
- return null
- },
- l1Fee: (state) => {
- return state.l1Fee
- },
- getGasParams: (state) => {
- return state.gasParams
- },
- gasPrice: (state, getters) => {
- const { gasPrice, maxFeePerGas } = getters.getGasParams
- return toHex(maxFeePerGas || gasPrice)
- },
- gasPriceInGwei: (state, getters) => {
- return fromWei(getters.gasPrice, 'gwei')
- }
-}
-
-export const mutations = {
- SAVE_GAS_PARAMS(state, payload) {
- state.gasParams = payload
- },
- SAVE_L1_FEE(state, l1Fee) {
- state.l1Fee = l1Fee
- }
-}
-
-export const actions = {
- async fetchGasPrice({ getters, dispatch, commit, rootGetters, rootState }) {
- const { pollInterval } = rootGetters['metamask/networkConfig']
- const netId = Number(rootGetters['metamask/netId'])
- const { url: rpcUrl } = rootState.settings[`netId${netId}`].rpc
-
- try {
- // Bump more for Polygon (MATIC) and for Goerli, because minPriority for this sidechains don't affect correctly
- let bumpPercent
- switch (netId) {
- case 5:
- bumpPercent = 100
- break
- case 137:
- case 43114:
- case 100:
- bumpPercent = 30
- break
- default:
- bumpPercent = 10
- }
-
- let txGasParams = {}
- try {
- // Use maxFeePerGas if eip1599 gas support by chain, use fast if legacy gas fetched
- txGasParams = await getters.oracle.getTxGasParams({ legacySpeed: 'fast', bumpPercent }) // in wei
- } catch (e) {
- const web3 = new Web3(rpcUrl)
- const wei = toBN(await web3.eth.getGasPrice())
- const bumped = wei.add(wei.mul(toBN(bumpPercent)).div(toBN(100)))
- txGasParams = { gasPrice: toHex(bumped) }
- }
-
- commit('SAVE_GAS_PARAMS', txGasParams)
- await dispatch('fetchL1Fee')
- } catch (e) {
- console.error('fetchGasPrice', e)
- } finally {
- setTimeout(() => dispatch('fetchGasPrice'), 2000 * pollInterval)
- }
- },
- setDefault({ commit, rootGetters }) {
- const { gasPrices } = rootGetters['metamask/networkConfig']
- commit('SAVE_GAS_PARAMS', { gasPrice: toWei(gasPrices?.fast?.toFixed(9) || 0, 'gwei') })
- },
- async fetchL1Fee({ commit, getters, rootGetters }) {
- const netId = rootGetters['metamask/netId']
- const isOptimismConnected = rootGetters['application/isOptimismConnected']
-
- const oracleInstance = getters.ovmGasPriceOracleContract({ netId })
-
- if (isOptimismConnected && oracleInstance) {
- try {
- const gasLimit = rootGetters['application/withdrawGas']
- const tornadoProxyInstance = rootGetters['application/tornadoProxyContract']({ netId })
-
- const tx = serialize({
- type: 0,
- gasLimit,
- chainId: netId,
- nonce: DUMMY_NONCE,
- data: DUMMY_WITHDRAW_DATA,
- gasPrice: getters.gasPrice,
- to: tornadoProxyInstance._address
- })
-
- const l1Fee = await oracleInstance.methods.getL1Fee(tx).call()
-
- commit('SAVE_L1_FEE', l1Fee)
- } catch (err) {
- console.error('fetchL1Fee has error:', err.message)
- }
- }
- }
-}
diff --git a/store/metamask.js b/store/metamask.js
index aa2f402..f06691b 100644
--- a/store/metamask.js
+++ b/store/metamask.js
@@ -153,7 +153,7 @@ const actions = {
) {
try {
const { ethAccount, netId } = state
- const gasParams = rootGetters['gasPrices/getGasParams']
+ const gasParams = rootGetters['fees/getGasPriceParams']
const callParams = {
method,
diff --git a/yarn.lock b/yarn.lock
index 4fc508c..953dc42 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2477,10 +2477,10 @@
resolved "https://git.tornado.ws/api/packages/tornado-packages/npm/%40tornado%2Ftornado-config/-/2.0.0/tornado-config-2.0.0.tgz#52bbc179ecb2385f71b4d56e060b68e7dd6fb8b4"
integrity sha512-7EkpWNfEm34VEOrbLnPpvd/aUJYnA1L+6/qx2fZ/AfmuJFkjSZ18Z4jvVGNY7ktKIhTu3/Tbze+9l3eNueCNIA==
-"@tornado/tornado-oracles@^0.3.0":
- version "0.3.0"
- resolved "https://git.tornado.ws/api/packages/tornado-packages/npm/%40tornado%2Ftornado-oracles/-/0.3.0/tornado-oracles-0.3.0.tgz#51dcb0f17662b463ce10c044162b926bcdbb74a8"
- integrity sha512-zyQRr45eSu2Hl8567Zr3J5hkNOhCsL7CKlwp6MW/NRi13yupeQalV2qcSL6RB7uVt/X+1+Hc5O2xNLXxG2gyGw==
+"@tornado/tornado-oracles@1.0.0":
+ version "1.0.0"
+ resolved "https://git.tornado.ws/api/packages/tornado-packages/npm/%40tornado%2Ftornado-oracles/-/1.0.0/tornado-oracles-1.0.0.tgz#d4f1d76c1028aec5ba75fbd5abe0edfcf8e4e412"
+ integrity sha512-zshMYIX3MgRKqhWJ2UA71Y/Plo+ssFBB7L08XqSNCND5rPgeL0CPjyVFrqgruAb343vVcIpo2eaOUPtd+mzLSA==
dependencies:
"@tornado/gas-price-oracle" "^0.5.3"
"@tornado/tornado-config" "^2.0.0"