mirror of
https://github.com/tornadocash/tornado-relayer
synced 2024-02-02 15:04:06 +01:00
fix: add optimism gas
This commit is contained in:
parent
4a28d4646e
commit
96b6e722d8
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "relay",
|
||||
"version": "5.0.0-beta.8",
|
||||
"version": "5.0.0-beta.9",
|
||||
"description": "Relayer for Tornado.cash privacy solution. https://tornado.cash",
|
||||
"scripts": {
|
||||
"server": "node src/server.js",
|
||||
|
@ -23,6 +23,7 @@ module.exports = {
|
||||
gasPrices,
|
||||
gasLimits: {
|
||||
[jobType.TORNADO_WITHDRAW]: 390000,
|
||||
[jobType.OP_TORNADO_WITHDRAW]: 440000,
|
||||
[jobType.ARB_TORNADO_WITHDRAW]: 1900000,
|
||||
},
|
||||
proxyLight,
|
||||
|
@ -1,5 +1,6 @@
|
||||
const jobType = Object.freeze({
|
||||
TORNADO_WITHDRAW: 'TORNADO_WITHDRAW',
|
||||
OP_TORNADO_WITHDRAW: 'OP_TORNADO_WITHDRAW',
|
||||
ARB_TORNADO_WITHDRAW: 'ARB_TORNADO_WITHDRAW',
|
||||
})
|
||||
|
||||
|
@ -55,7 +55,18 @@ function getGasPrices() {
|
||||
}
|
||||
|
||||
function getGasLimit() {
|
||||
const action = Number(netId) === 42161 ? jobType.ARB_TORNADO_WITHDRAW : jobType.TORNADO_WITHDRAW
|
||||
let action
|
||||
|
||||
switch (Number(netId)) {
|
||||
case 10:
|
||||
action = jobType.OP_TORNADO_WITHDRAW
|
||||
break
|
||||
case 42161:
|
||||
action = jobType.ARB_TORNADO_WITHDRAW
|
||||
break
|
||||
default:
|
||||
action = jobType.TORNADO_WITHDRAW
|
||||
}
|
||||
|
||||
return gasLimits[action]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user