2021-06-08 17:25:48 +02:00
|
|
|
import { addHexPrefix } from 'ethereumjs-util';
|
2021-06-08 22:15:28 +02:00
|
|
|
|
|
|
|
const TWENTY_ONE_THOUSAND = 21000;
|
|
|
|
const ONE_HUNDRED_THOUSAND = 100000;
|
2021-06-08 17:25:48 +02:00
|
|
|
|
|
|
|
export const GAS_LIMITS = {
|
|
|
|
// maximum gasLimit of a simple send
|
2021-06-08 22:15:28 +02:00
|
|
|
SIMPLE: addHexPrefix(TWENTY_ONE_THOUSAND.toString(16)),
|
2021-06-08 17:25:48 +02:00
|
|
|
// a base estimate for token transfers.
|
2021-06-08 22:15:28 +02:00
|
|
|
BASE_TOKEN_ESTIMATE: addHexPrefix(ONE_HUNDRED_THOUSAND.toString(16)),
|
2021-06-08 17:25:48 +02:00
|
|
|
};
|
2021-07-08 22:23:00 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* These are already declared in @metamask/controllers but importing them from
|
|
|
|
* that module and re-exporting causes the UI bundle size to expand beyond 4MB
|
|
|
|
*/
|
|
|
|
export const GAS_ESTIMATE_TYPES = {
|
|
|
|
FEE_MARKET: 'fee-market',
|
|
|
|
LEGACY: 'legacy',
|
|
|
|
ETH_GASPRICE: 'eth_gasPrice',
|
|
|
|
NONE: 'none',
|
|
|
|
};
|