forked from tornado-packages/tornado-oracles
Compare commits
3 Commits
3271e88b13
...
simple
| Author | SHA1 | Date | |
|---|---|---|---|
|
0fa430f85d
|
|||
|
0649c2da4c
|
|||
|
15b7967c03
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tornado/tornado-oracles",
|
"name": "@tornado/tornado-oracles",
|
||||||
"version": "3.3.0",
|
"version": "4.0.0",
|
||||||
"description": "Oracles for Tornado-specific transactions & actions",
|
"description": "Oracles for Tornado-specific transactions & actions",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { convertETHToTokenAmount } from './utils';
|
|||||||
|
|
||||||
const DUMMY_ADDRESS = '0x1111111111111111111111111111111111111111';
|
const DUMMY_ADDRESS = '0x1111111111111111111111111111111111111111';
|
||||||
|
|
||||||
const DUMMY_NONCE = '0x1111111111111111111111111111111111111111111111111111111111111111';
|
const DUMMY_NONCE = 1024;
|
||||||
|
|
||||||
const DUMMY_WITHDRAW_DATA =
|
const DUMMY_WITHDRAW_DATA =
|
||||||
'0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
|
'0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111';
|
||||||
@@ -54,10 +54,9 @@ export class TornadoFeeOracle {
|
|||||||
tx = {
|
tx = {
|
||||||
type: 0,
|
type: 0,
|
||||||
gasLimit: 1_000_000,
|
gasLimit: 1_000_000,
|
||||||
nonce: Number(DUMMY_NONCE),
|
nonce: DUMMY_NONCE,
|
||||||
data: DUMMY_WITHDRAW_DATA,
|
data: DUMMY_WITHDRAW_DATA,
|
||||||
gasPrice: parseUnits('1', 'gwei'),
|
gasPrice: parseUnits('1', 'gwei'),
|
||||||
from: DUMMY_ADDRESS,
|
|
||||||
to: DUMMY_ADDRESS,
|
to: DUMMY_ADDRESS,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export class TokenPriceOracle {
|
|||||||
return prices.reduce((acc, price, index) => {
|
return prices.reduce((acc, price, index) => {
|
||||||
const tokenPriceInwei = (price * BigInt(10 ** tokens[index].decimals)) / BigInt(10 ** 18);
|
const tokenPriceInwei = (price * BigInt(10 ** tokens[index].decimals)) / BigInt(10 ** 18);
|
||||||
|
|
||||||
acc[tokens[index].symbol] = tokenPriceInwei.toString();
|
acc[tokens[index].symbol.toLowerCase()] = tokenPriceInwei.toString();
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
}, {} as TokenPrices);
|
}, {} as TokenPrices);
|
||||||
|
|||||||
Reference in New Issue
Block a user