switch @0x/contract-wrappers to generated wrappers (#2037)

* switch @0x/contract-wrappers to generated wrappers

- remove TransactionEncoder
- move TokenUtils to @0x/dev-utils
- detailed changes in #2040
This commit is contained in:
Xianny
2019-08-08 07:29:30 -07:00
committed by GitHub
parent 5ac7ff7084
commit 8ce390be3c
112 changed files with 37252 additions and 7181 deletions

View File

@@ -1,4 +1,13 @@
[
{
"version": "2.3.0",
"changes": [
{
"note": "Move `tokenUtils` here from `@0x/contract-wrappers`",
"pr": 2037
}
]
},
{
"timestamp": 1564604963,
"version": "2.2.6",

View File

@@ -3,3 +3,4 @@ export { web3Factory } from './web3_factory';
export { constants as devConstants } from './constants';
export { env, EnvVars } from './env';
export { callbackErrorReporter } from './callback_error_reporter';
export { tokenUtils } from './token_utils';

View File

@@ -0,0 +1,21 @@
// Those addresses come from migrations. They're deterministic so it's relatively safe to hard-code them here.
// Before we were fetching them from the TokenRegistry but now we can't as it's deprecated and removed.
// TODO(albrow): Import these from the migrations package instead of hard-coding them.
const DUMMY_ERC_20_ADRESSES = [
'0x34d402f14d58e001d8efbe6585051bf9706aa064',
'0x25b8fe1de9daf8ba351890744ff28cf7dfa8f5e3',
'0xcdb594a32b1cc3479d8746279712c39d18a07fc0',
'0x1e2f9e10d02a6b8f8f69fcbf515e75039d2ea30d',
'0xbe0037eaf2d64fe5529bca93c18c9702d3930376',
];
const DUMMY_ERC_721_ADRESSES = ['0x07f96aa816c1f244cbc6ef114bb2b023ba54a2eb'];
export const tokenUtils = {
getDummyERC20TokenAddresses(): string[] {
return DUMMY_ERC_20_ADRESSES;
},
getDummyERC721TokenAddresses(): string[] {
return DUMMY_ERC_721_ADRESSES;
},
};