Comparing version 6.0.0 to 6.1.0
[ | ||
{ | ||
"version": "6.1.0", | ||
"changes": [ | ||
{ | ||
"note": "Restore revert error definitions :-(", | ||
"pr": 4 | ||
} | ||
], | ||
"timestamp": 1603947853 | ||
}, | ||
{ | ||
"version": "6.0.0", | ||
@@ -4,0 +14,0 @@ "changes": [ |
@@ -8,2 +8,6 @@ <!-- | ||
## v6.1.0 - _October 29, 2020_ | ||
* Restore revert error definitions :-( (#4) | ||
## v6.0.0 - _October 29, 2020_ | ||
@@ -10,0 +14,0 @@ |
@@ -21,2 +21,29 @@ export { promisify } from './promisify'; | ||
export { fromTokenUnitAmount, toTokenUnitAmount } from './token_utils'; | ||
export import BrokerRevertErrors = require('./revert_errors/broker/revert_errors'); | ||
export import CoordinatorRevertErrors = require('./revert_errors/coordinator/revert_errors'); | ||
export import ExchangeForwarderRevertErrors = require('./revert_errors/exchange-forwarder/revert_errors'); | ||
export import LibMathRevertErrors = require('./revert_errors/exchange-libs/lib_math_revert_errors'); | ||
export import ExchangeRevertErrors = require('./revert_errors/exchange/revert_errors'); | ||
export import LibAssetDataTransferRevertErrors = require('./revert_errors/extensions/lib_asset_data_transfer_revert_errors'); | ||
export import MixinWethUtilsRevertErrors = require('./revert_errors/extensions/mixin_weth_utils_revert_errors'); | ||
export import FixedMathRevertErrors = require('./revert_errors/staking/fixed_math_revert_errors'); | ||
export import StakingRevertErrors = require('./revert_errors/staking/staking_revert_errors'); | ||
export import AuthorizableRevertErrors = require('./revert_errors/utils/authorizable_revert_errors'); | ||
export import LibAddressArrayRevertErrors = require('./revert_errors/utils/lib_address_array_revert_errors'); | ||
export import LibBytesRevertErrors = require('./revert_errors/utils/lib_bytes_revert_errors'); | ||
export import OwnableRevertErrors = require('./revert_errors/utils/ownable_revert_errors'); | ||
export import ReentrancyGuardRevertErrors = require('./revert_errors/utils/reentrancy_guard_revert_errors'); | ||
export import SafeMathRevertErrors = require('./revert_errors/utils/safe_math_revert_errors'); | ||
export declare const ZeroExRevertErrors: { | ||
Common: any; | ||
Proxy: any; | ||
SimpleFunctionRegistry: any; | ||
Ownable: any; | ||
Spender: any; | ||
TransformERC20: any; | ||
Wallet: any; | ||
MetaTransactions: any; | ||
SignatureValidator: any; | ||
LiquidityProvider: any; | ||
}; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -49,2 +49,29 @@ "use strict"; | ||
exports.toTokenUnitAmount = token_utils_1.toTokenUnitAmount; | ||
exports.BrokerRevertErrors = require("./revert_errors/broker/revert_errors"); | ||
exports.CoordinatorRevertErrors = require("./revert_errors/coordinator/revert_errors"); | ||
exports.ExchangeForwarderRevertErrors = require("./revert_errors/exchange-forwarder/revert_errors"); | ||
exports.LibMathRevertErrors = require("./revert_errors/exchange-libs/lib_math_revert_errors"); | ||
exports.ExchangeRevertErrors = require("./revert_errors/exchange/revert_errors"); | ||
exports.LibAssetDataTransferRevertErrors = require("./revert_errors/extensions/lib_asset_data_transfer_revert_errors"); | ||
exports.MixinWethUtilsRevertErrors = require("./revert_errors/extensions/mixin_weth_utils_revert_errors"); | ||
exports.FixedMathRevertErrors = require("./revert_errors/staking/fixed_math_revert_errors"); | ||
exports.StakingRevertErrors = require("./revert_errors/staking/staking_revert_errors"); | ||
exports.AuthorizableRevertErrors = require("./revert_errors/utils/authorizable_revert_errors"); | ||
exports.LibAddressArrayRevertErrors = require("./revert_errors/utils/lib_address_array_revert_errors"); | ||
exports.LibBytesRevertErrors = require("./revert_errors/utils/lib_bytes_revert_errors"); | ||
exports.OwnableRevertErrors = require("./revert_errors/utils/ownable_revert_errors"); | ||
exports.ReentrancyGuardRevertErrors = require("./revert_errors/utils/reentrancy_guard_revert_errors"); | ||
exports.SafeMathRevertErrors = require("./revert_errors/utils/safe_math_revert_errors"); | ||
exports.ZeroExRevertErrors = { | ||
Common: require('./revert_errors/zero-ex/common_revert_errors'), | ||
Proxy: require('./revert_errors/zero-ex/proxy_revert_errors'), | ||
SimpleFunctionRegistry: require('./revert_errors/zero-ex/simple_function_registry_revert_errors'), | ||
Ownable: require('./revert_errors/zero-ex/ownable_revert_errors'), | ||
Spender: require('./revert_errors/zero-ex/spender_revert_errors'), | ||
TransformERC20: require('./revert_errors/zero-ex/transform_erc20_revert_errors'), | ||
Wallet: require('./revert_errors/zero-ex/wallet_revert_errors'), | ||
MetaTransactions: require('./revert_errors/zero-ex/meta_transaction_revert_errors'), | ||
SignatureValidator: require('./revert_errors/zero-ex/signature_validator_revert_errors'), | ||
LiquidityProvider: require('./revert_errors/zero-ex/liquidity_provider_revert_errors'), | ||
}; | ||
//# sourceMappingURL=index.js.map |
@@ -13,4 +13,5 @@ import { ObjectMap } from '@0x/types'; | ||
* @param revertClass A class that inherits from RevertError. | ||
* @param force Allow overwriting registered types. | ||
*/ | ||
export declare function registerRevertErrorType(revertClass: RevertErrorType): void; | ||
export declare function registerRevertErrorType(revertClass: RevertErrorType, force?: boolean): void; | ||
/** | ||
@@ -58,4 +59,5 @@ * Decode an ABI encoded revert error. | ||
* @param revertClass A class that inherits from RevertError. | ||
* @param force Allow overwriting existing registrations. | ||
*/ | ||
static registerType(revertClass: RevertErrorType): void; | ||
static registerType(revertClass: RevertErrorType, force?: boolean): void; | ||
/** | ||
@@ -62,0 +64,0 @@ * Create a RevertError instance with optional parameter values. |
@@ -12,5 +12,6 @@ "use strict"; | ||
* @param revertClass A class that inherits from RevertError. | ||
* @param force Allow overwriting registered types. | ||
*/ | ||
function registerRevertErrorType(revertClass) { | ||
RevertError.registerType(revertClass); | ||
function registerRevertErrorType(revertClass, force = false) { | ||
RevertError.registerType(revertClass, force); | ||
} | ||
@@ -131,6 +132,7 @@ exports.registerRevertErrorType = registerRevertErrorType; | ||
* @param revertClass A class that inherits from RevertError. | ||
* @param force Allow overwriting existing registrations. | ||
*/ | ||
static registerType(revertClass) { | ||
static registerType(revertClass, force = false) { | ||
const instance = new revertClass(); | ||
if (instance.selector in RevertError._typeRegistry) { | ||
if (!force && instance.selector in RevertError._typeRegistry) { | ||
throw new Error(`RevertError type with signature "${instance.signature}" is already registered`); | ||
@@ -137,0 +139,0 @@ } |
{ | ||
"name": "@0x/utils", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"engines": { | ||
@@ -65,3 +65,3 @@ "node": ">=6.12" | ||
}, | ||
"gitHead": "392db5e0f19938a48a46c9cf41810e0ec1242d8e" | ||
"gitHead": "ccea611ace0f5d6827631222ba967a2581418392" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
515924
305
7579