Removed DummyERC1155Token

This commit is contained in:
Greg Hysen 2019-02-27 13:36:44 -08:00
parent c4a467fa96
commit b3106cd932
8 changed files with 24 additions and 60 deletions

View File

@ -19,9 +19,11 @@
"contracts": [ "contracts": [
"src/ERC1155.sol", "src/ERC1155.sol",
"src/ERC1155Mintable.sol", "src/ERC1155Mintable.sol",
"src/MixinNonFungibleToken.sol",
"src/interfaces/IERC1155.sol", "src/interfaces/IERC1155.sol",
"src/interfaces/IERC1155Receiver.sol", "src/interfaces/IERC1155Receiver.sol",
"test/DummyERC1155Receiver.sol", "src/lib/Address.sol",
"test/DummyERC1155Token.sol" "src/lib/SafeMath.sol",
"test/DummyERC1155Receiver.sol"
] ]
} }

View File

@ -1,40 +0,0 @@
/*
Copyright 2018 ZeroEx Intl.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
pragma solidity ^0.5.3;
import "../src/ERC1155Mintable.sol";
contract DummyERC1155Token is
ERC1155Mintable
{
string public name;
string public symbol;
constructor (
string memory _name,
string memory _symbol
)
public
{
name = _name;
symbol = _symbol;
}
}

View File

@ -33,7 +33,7 @@
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol" "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
}, },
"config": { "config": {
"abis": "generated-artifacts/@(DummyERC1155Receiver|DummyERC1155Token|ERC1155|ERC1155Mintable|IERC1155|IERC1155Receiver|InvalidERC1155Receiver).json", "abis": "generated-artifacts/@(Address|DummyERC1155Receiver|ERC1155|ERC1155Mintable|IERC1155|IERC1155Receiver|MixinNonFungibleToken|SafeMath).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually." "abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
}, },
"repository": { "repository": {

View File

@ -5,19 +5,21 @@
*/ */
import { ContractArtifact } from 'ethereum-types'; import { ContractArtifact } from 'ethereum-types';
import * as Address from '../generated-artifacts/Address.json';
import * as DummyERC1155Receiver from '../generated-artifacts/DummyERC1155Receiver.json'; import * as DummyERC1155Receiver from '../generated-artifacts/DummyERC1155Receiver.json';
import * as DummyERC1155Token from '../generated-artifacts/DummyERC1155Token.json';
import * as ERC1155 from '../generated-artifacts/ERC1155.json'; import * as ERC1155 from '../generated-artifacts/ERC1155.json';
import * as ERC1155Mintable from '../generated-artifacts/ERC1155Mintable.json'; import * as ERC1155Mintable from '../generated-artifacts/ERC1155Mintable.json';
import * as IERC1155 from '../generated-artifacts/IERC1155.json'; import * as IERC1155 from '../generated-artifacts/IERC1155.json';
import * as IERC1155Receiver from '../generated-artifacts/IERC1155Receiver.json'; import * as IERC1155Receiver from '../generated-artifacts/IERC1155Receiver.json';
import * as InvalidERC1155Receiver from '../generated-artifacts/InvalidERC1155Receiver.json'; import * as MixinNonFungibleToken from '../generated-artifacts/MixinNonFungibleToken.json';
import * as SafeMath from '../generated-artifacts/SafeMath.json';
export const artifacts = { export const artifacts = {
ERC1155: ERC1155 as ContractArtifact, ERC1155: ERC1155 as ContractArtifact,
ERC1155Mintable: ERC1155Mintable as ContractArtifact, ERC1155Mintable: ERC1155Mintable as ContractArtifact,
MixinNonFungibleToken: MixinNonFungibleToken as ContractArtifact,
IERC1155: IERC1155 as ContractArtifact, IERC1155: IERC1155 as ContractArtifact,
IERC1155Receiver: IERC1155Receiver as ContractArtifact, IERC1155Receiver: IERC1155Receiver as ContractArtifact,
Address: Address as ContractArtifact,
SafeMath: SafeMath as ContractArtifact,
DummyERC1155Receiver: DummyERC1155Receiver as ContractArtifact, DummyERC1155Receiver: DummyERC1155Receiver as ContractArtifact,
DummyERC1155Token: DummyERC1155Token as ContractArtifact,
InvalidERC1155Receiver: InvalidERC1155Receiver as ContractArtifact,
}; };

View File

@ -3,10 +3,11 @@
* Warning: This file is auto-generated by contracts-gen. Don't edit manually. * Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* ----------------------------------------------------------------------------- * -----------------------------------------------------------------------------
*/ */
export * from '../generated-wrappers/address';
export * from '../generated-wrappers/dummy_erc1155_receiver'; export * from '../generated-wrappers/dummy_erc1155_receiver';
export * from '../generated-wrappers/dummy_erc1155_token';
export * from '../generated-wrappers/erc1155'; export * from '../generated-wrappers/erc1155';
export * from '../generated-wrappers/erc1155_mintable'; export * from '../generated-wrappers/erc1155_mintable';
export * from '../generated-wrappers/i_erc1155_receiver'; export * from '../generated-wrappers/i_erc1155_receiver';
export * from '../generated-wrappers/ierc1155'; export * from '../generated-wrappers/ierc1155';
export * from '../generated-wrappers/invalid_erc1155_receiver'; export * from '../generated-wrappers/mixin_non_fungible_token';
export * from '../generated-wrappers/safe_math';

View File

@ -17,7 +17,7 @@ import {
artifacts, artifacts,
DummyERC1155ReceiverBatchTokenReceivedEventArgs, DummyERC1155ReceiverBatchTokenReceivedEventArgs,
DummyERC1155ReceiverContract, DummyERC1155ReceiverContract,
DummyERC1155TokenContract, ERC1155MintableContract,
} from '../src'; } from '../src';
import { Erc1155Wrapper } from './utils/erc1155_wrapper'; import { Erc1155Wrapper } from './utils/erc1155_wrapper';
@ -39,7 +39,7 @@ describe('ERC1155Token', () => {
let owner: string; let owner: string;
let spender: string; let spender: string;
let receiver: string; let receiver: string;
let token: DummyERC1155TokenContract; let token: ERC1155MintableContract;
let erc1155Receiver: DummyERC1155ReceiverContract; let erc1155Receiver: DummyERC1155ReceiverContract;
let nonFungibleToken: BigNumber; let nonFungibleToken: BigNumber;
let erc1155Wrapper: Erc1155Wrapper; let erc1155Wrapper: Erc1155Wrapper;
@ -55,12 +55,10 @@ describe('ERC1155Token', () => {
// deploy erc1155 contract & receiver // deploy erc1155 contract & receiver
const accounts = await web3Wrapper.getAvailableAddressesAsync(); const accounts = await web3Wrapper.getAvailableAddressesAsync();
[owner, spender] = accounts; [owner, spender] = accounts;
token = await DummyERC1155TokenContract.deployFrom0xArtifactAsync( token = await ERC1155MintableContract.deployFrom0xArtifactAsync(
artifacts.DummyERC1155Token, artifacts.ERC1155Mintable,
provider, provider,
txDefaults, txDefaults,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
); );
erc1155Receiver = await DummyERC1155ReceiverContract.deployFrom0xArtifactAsync( erc1155Receiver = await DummyERC1155ReceiverContract.deployFrom0xArtifactAsync(
artifacts.DummyERC1155Receiver, artifacts.DummyERC1155Receiver,

View File

@ -8,19 +8,19 @@ import { BigNumber } from '@0x/utils';
import { import {
artifacts, artifacts,
DummyERC1155TokenContract, ERC1155MintableContract,
ERC1155TransferSingleEventArgs, ERC1155TransferSingleEventArgs,
} from '../../src'; } from '../../src';
const expect = chai.expect; const expect = chai.expect;
export class Erc1155Wrapper { export class Erc1155Wrapper {
private readonly _erc1155Contract: DummyERC1155TokenContract; private readonly _erc1155Contract: ERC1155MintableContract;
private readonly _web3Wrapper: Web3Wrapper; private readonly _web3Wrapper: Web3Wrapper;
private readonly _contractOwner: string; private readonly _contractOwner: string;
private readonly _logDecoder: LogDecoder; private readonly _logDecoder: LogDecoder;
constructor(contractInstance: DummyERC1155TokenContract, provider: Web3ProviderEngine, contractOwner: string) { constructor(contractInstance: ERC1155MintableContract, provider: Web3ProviderEngine, contractOwner: string) {
this._erc1155Contract = contractInstance; this._erc1155Contract = contractInstance;
this._web3Wrapper = new Web3Wrapper(provider); this._web3Wrapper = new Web3Wrapper(provider);
this._contractOwner = contractOwner; this._contractOwner = contractOwner;

View File

@ -3,13 +3,14 @@
"compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true }, "compilerOptions": { "outDir": "lib", "rootDir": ".", "resolveJsonModule": true },
"include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"], "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
"files": [ "files": [
"generated-artifacts/Address.json",
"generated-artifacts/DummyERC1155Receiver.json", "generated-artifacts/DummyERC1155Receiver.json",
"generated-artifacts/DummyERC1155Token.json",
"generated-artifacts/ERC1155.json", "generated-artifacts/ERC1155.json",
"generated-artifacts/ERC1155Mintable.json", "generated-artifacts/ERC1155Mintable.json",
"generated-artifacts/IERC1155.json", "generated-artifacts/IERC1155.json",
"generated-artifacts/IERC1155Receiver.json", "generated-artifacts/IERC1155Receiver.json",
"generated-artifacts/InvalidERC1155Receiver.json" "generated-artifacts/MixinNonFungibleToken.json",
"generated-artifacts/SafeMath.json"
], ],
"exclude": ["./deploy/solc/solc_bin"] "exclude": ["./deploy/solc/solc_bin"]
} }