mirror of
https://github.com/tornadocash/tornado-relayer.git
synced 2025-08-21 20:28:21 -04:00
set relayer mode on init()
This commit is contained in:
parent
6f66b34288
commit
9f17840034
2 changed files with 77 additions and 49 deletions
|
@ -1,13 +1,9 @@
|
|||
import { jobType } from './types';
|
||||
import tornConfig from 'torn-token';
|
||||
import { EnsResolver } from './modules';
|
||||
import { getProvider } from './modules/contracts';
|
||||
|
||||
import tornConfig, { availableIds } from 'torn-token';
|
||||
|
||||
require('dotenv').config();
|
||||
|
||||
|
||||
export const netId = Number(process.env.NET_ID) || 1;
|
||||
export const netId = <availableIds>Number(process.env.NET_ID || 1);
|
||||
export const redisUrl = process.env.REDIS_URL || 'redis://127.0.0.1:6379';
|
||||
export const httpRpcUrl = process.env.HTTP_RPC_URL;
|
||||
export const wsRpcUrl = process.env.WS_RPC_URL;
|
||||
|
@ -21,7 +17,7 @@ export const instances = tornConfig.instances;
|
|||
export const torn = tornConfig;
|
||||
export const port = process.env.APP_PORT || 8000;
|
||||
export const tornadoServiceFee = Number(process.env.REGULAR_TORNADO_WITHDRAW_FEE);
|
||||
export const miningServiceFee = Number(process.env.MINING_SERVICE_FEE);
|
||||
// export const miningServiceFee = Number(process.env.MINING_SERVICE_FEE);
|
||||
export const rewardAccount = process.env.REWARD_ACCOUNT;
|
||||
export const governanceAddress = '0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce';
|
||||
export const tornadoGoerliProxy = '0x454d870a72e29d5E5697f635128D18077BD04C60';
|
||||
|
@ -33,19 +29,8 @@ export const gasLimits = {
|
|||
};
|
||||
export const minimumBalance = '1000000000000000000';
|
||||
export const baseFeeReserve = Number(process.env.BASE_FEE_RESERVE_PERCENTAGE);
|
||||
|
||||
let tornadoProxyAddress: string;
|
||||
let tornadoMiningAddress: string;
|
||||
|
||||
export const initConfig = async () => {
|
||||
const provider = getProvider();
|
||||
const resolver = new EnsResolver(provider);
|
||||
if (netId === 5) {
|
||||
tornadoProxyAddress = tornadoGoerliProxy;
|
||||
} else {
|
||||
tornadoProxyAddress = await resolver.resolve(torn.tornadoRouter.address);
|
||||
}
|
||||
tornadoMiningAddress = await resolver.resolve(torn.miningV2.address);
|
||||
export const tornToken = {
|
||||
tokenAddress: '0x77777FeDdddFfC19Ff86DB637967013e6C6A116C',
|
||||
symbol: 'TORN',
|
||||
decimals: 18,
|
||||
};
|
||||
|
||||
export { tornadoProxyAddress, tornadoMiningAddress };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue