update fill-scenarios to use new artifacts and abi-gen wrappers packages
This commit is contained in:
parent
57d9fcf9e5
commit
d0b37fcab5
@ -5,17 +5,10 @@
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"scripts": {
|
||||
"build": "yarn pre_build && tsc -b",
|
||||
"build": "yarn tsc -b",
|
||||
"build:ci": "yarn build",
|
||||
"pre_build": "run-s update_artifacts generate_contract_wrappers",
|
||||
"update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0-trimmed/$i.json lib/artifacts; done;",
|
||||
"generate_contract_wrappers": "abi-gen --abis 'lib/artifacts/@(Exchange|DummyERC20Token|DummyERC721Token).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
|
||||
"copy_monorepo_scripts": "copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
||||
"clean": "shx rm -rf lib src/generated_contract_wrappers",
|
||||
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*"
|
||||
},
|
||||
"config": {
|
||||
"contracts": "Exchange DummyERC20Token DummyERC721Token"
|
||||
"lint": "tslint --project ."
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
@ -27,18 +20,17 @@
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/fill-scenarios/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/abi-gen": "^1.0.13",
|
||||
"@0xproject/tslint-config": "^1.0.8",
|
||||
"@types/lodash": "4.14.104",
|
||||
"copyfiles": "^2.0.0",
|
||||
"make-promises-safe": "^1.1.0",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"tslint": "5.11.0",
|
||||
"typescript": "3.0.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/abi-gen-wrappers": "^1.0.0",
|
||||
"@0xproject/base-contract": "^3.0.1",
|
||||
"@0xproject/contract-artifacts": "^1.0.0",
|
||||
"@0xproject/order-utils": "^1.0.7",
|
||||
"@0xproject/types": "^1.1.4",
|
||||
"@0xproject/typescript-typings": "^3.0.2",
|
||||
|
@ -1,11 +0,0 @@
|
||||
import { ContractArtifact } from 'ethereum-types';
|
||||
|
||||
import * as DummyERC20Token from './artifacts/DummyERC20Token.json';
|
||||
import * as DummyERC721Token from './artifacts/DummyERC721Token.json';
|
||||
import * as Exchange from './artifacts/Exchange.json';
|
||||
|
||||
export const artifacts = {
|
||||
DummyERC20Token: (DummyERC20Token as any) as ContractArtifact,
|
||||
DummyERC721Token: (DummyERC721Token as any) as ContractArtifact,
|
||||
Exchange: (Exchange as any) as ContractArtifact,
|
||||
};
|
@ -1,3 +1,5 @@
|
||||
import { DummyERC20TokenContract, DummyERC721TokenContract, ExchangeContract } from '@0xproject/abi-gen-wrappers';
|
||||
import * as artifacts from '@0xproject/contract-artifacts';
|
||||
import { assetDataUtils } from '@0xproject/order-utils';
|
||||
import { orderFactory } from '@0xproject/order-utils/lib/src/order_factory';
|
||||
import { AssetProxyId, ERC721AssetData, OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types';
|
||||
@ -6,11 +8,7 @@ import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import { Provider } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
import { artifacts } from './artifacts';
|
||||
import { constants } from './constants';
|
||||
import { DummyERC20TokenContract } from './generated_contract_wrappers/dummy_erc20_token';
|
||||
import { DummyERC721TokenContract } from './generated_contract_wrappers/dummy_erc721_token';
|
||||
import { ExchangeContract } from './generated_contract_wrappers/exchange';
|
||||
|
||||
export class FillScenarios {
|
||||
private readonly _web3Wrapper: Web3Wrapper;
|
||||
|
6
packages/fill-scenarios/src/globals.d.ts
vendored
6
packages/fill-scenarios/src/globals.d.ts
vendored
@ -1,6 +0,0 @@
|
||||
declare module '*.json' {
|
||||
const json: any;
|
||||
/* tslint:disable */
|
||||
export default json;
|
||||
/* tslint:enable */
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user