aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-07-23 07:15:35 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-07-23 22:34:47 +0800
commitd8b44283a2247858c84fc2c319634c3118091a71 (patch)
treead25124e008aaad22b155d42911d76323a9d9e6d /packages
parent2c1daf9c9a35972f388fe7cfa14c5f35f23a4119 (diff)
downloaddexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.tar
dexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.tar.gz
dexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.tar.bz2
dexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.tar.lz
dexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.tar.xz
dexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.tar.zst
dexon-sol-tools-d8b44283a2247858c84fc2c319634c3118091a71.zip
Move example contracts into new examples dir
Diffstat (limited to 'packages')
-rw-r--r--packages/contracts/compiler.json4
-rw-r--r--packages/contracts/package.json12
-rw-r--r--packages/contracts/src/2.0.0/examples/ExchangeWrapper/ExchangeWrapper.sol (renamed from packages/contracts/src/2.0.0/test/ExchangeWrapper/ExchangeWrapper.sol)0
-rw-r--r--packages/contracts/src/2.0.0/examples/Validator/Validator.sol (renamed from packages/contracts/src/2.0.0/test/TestValidator/TestValidator.sol)4
-rw-r--r--packages/contracts/src/2.0.0/examples/Wallet/Wallet.sol (renamed from packages/contracts/src/2.0.0/test/TestWallet/TestWallet.sol)4
-rw-r--r--packages/contracts/src/2.0.0/examples/Whitelist/Whitelist.sol (renamed from packages/contracts/src/2.0.0/test/Whitelist/Whitelist.sol)0
-rw-r--r--packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol5
-rw-r--r--packages/contracts/src/2.0.0/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol4
-rw-r--r--packages/contracts/test/exchange/signature_validator.ts16
-rw-r--r--packages/contracts/test/utils/artifacts.ts8
10 files changed, 33 insertions, 24 deletions
diff --git a/packages/contracts/compiler.json b/packages/contracts/compiler.json
index 2a7f8bbb9..047a75b07 100644
--- a/packages/contracts/compiler.json
+++ b/packages/contracts/compiler.json
@@ -42,9 +42,9 @@
"TestLibBytes",
"TestLibs",
"TestSignatureValidator",
- "TestValidator",
- "TestWallet",
"TokenRegistry",
+ "Validator",
+ "Wallet",
"Whitelist",
"WETH9",
"ZRXToken"
diff --git a/packages/contracts/package.json b/packages/contracts/package.json
index 066f9b41a..a6a7bdf6c 100644
--- a/packages/contracts/package.json
+++ b/packages/contracts/package.json
@@ -20,11 +20,14 @@
"test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
"test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
"test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
+ "run_mocha":
+ "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
"compile": "sol-compiler --contracts-dir src",
"clean": "shx rm -rf lib generated_contract_wrappers",
- "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output generated_contract_wrappers --backend ethers",
- "lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/* --exclude **/lib/**/* && yarn lint-contracts",
+ "generate_contract_wrappers":
+ "abi-gen --abis ${npm_package_config_abis} --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output generated_contract_wrappers --backend ethers",
+ "lint":
+ "tslint --project . --exclude **/src/generated_contract_wrappers/**/* --exclude **/lib/**/* && yarn lint-contracts",
"coverage:report:text": "istanbul report text",
"coverage:report:html": "istanbul report html && open coverage/index.html",
"profiler:report:html": "istanbul report html && open coverage/index.html",
@@ -33,7 +36,8 @@
"lint-contracts": "solhint src/2.0.0/**/**/**/**/*.sol"
},
"config": {
- "abis": "../migrations/artifacts/2.0.0/@(AssetProxyOwner|DummyERC20Token|DummyERC721Receiver|DummyERC721Token|ERC20Proxy|ERC721Proxy|Forwarder|Exchange|ExchangeWrapper|IAssetData|IAssetProxy|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestAssetProxyDispatcher|TestLibBytes|TestLibs|TestSignatureValidator|TestValidator|TestWallet|TokenRegistry|Whitelist|WETH9|ZRXToken).json"
+ "abis":
+ "../migrations/artifacts/2.0.0/@(AssetProxyOwner|DummyERC20Token|DummyERC721Receiver|DummyERC721Token|ERC20Proxy|ERC721Proxy|Forwarder|Exchange|ExchangeWrapper|IAssetData|IAssetProxy|MixinAuthorizable|MultiSigWallet|MultiSigWalletWithTimeLock|TestAssetProxyOwner|TestAssetProxyDispatcher|TestLibBytes|TestLibs|TestSignatureValidator|Validator|Wallet|TokenRegistry|Whitelist|WETH9|ZRXToken).json"
},
"repository": {
"type": "git",
diff --git a/packages/contracts/src/2.0.0/test/ExchangeWrapper/ExchangeWrapper.sol b/packages/contracts/src/2.0.0/examples/ExchangeWrapper/ExchangeWrapper.sol
index 2fa0e3c5e..2fa0e3c5e 100644
--- a/packages/contracts/src/2.0.0/test/ExchangeWrapper/ExchangeWrapper.sol
+++ b/packages/contracts/src/2.0.0/examples/ExchangeWrapper/ExchangeWrapper.sol
diff --git a/packages/contracts/src/2.0.0/test/TestValidator/TestValidator.sol b/packages/contracts/src/2.0.0/examples/Validator/Validator.sol
index 6278aede0..72ed528ba 100644
--- a/packages/contracts/src/2.0.0/test/TestValidator/TestValidator.sol
+++ b/packages/contracts/src/2.0.0/examples/Validator/Validator.sol
@@ -21,7 +21,7 @@ pragma solidity 0.4.24;
import "../../protocol/Exchange/interfaces/IValidator.sol";
-contract TestValidator is
+contract Validator is
IValidator
{
@@ -29,7 +29,7 @@ contract TestValidator is
// solhint-disable-next-line var-name-mixedcase
address internal VALID_SIGNER;
- /// @dev constructs a new `TestValidator` with a single valid signer.
+ /// @dev constructs a new `Validator` with a single valid signer.
/// @param validSigner The sole, valid signer.
constructor (address validSigner) public {
VALID_SIGNER = validSigner;
diff --git a/packages/contracts/src/2.0.0/test/TestWallet/TestWallet.sol b/packages/contracts/src/2.0.0/examples/Wallet/Wallet.sol
index 0415823e3..b75021a31 100644
--- a/packages/contracts/src/2.0.0/test/TestWallet/TestWallet.sol
+++ b/packages/contracts/src/2.0.0/examples/Wallet/Wallet.sol
@@ -22,7 +22,7 @@ import "../../protocol/Exchange/interfaces/IWallet.sol";
import "../../utils/LibBytes/LibBytes.sol";
-contract TestWallet is
+contract Wallet is
IWallet
{
using LibBytes for bytes;
@@ -31,7 +31,7 @@ contract TestWallet is
// solhint-disable-next-line var-name-mixedcase
address internal WALLET_OWNER;
- /// @dev constructs a new `TestWallet` with a single owner.
+ /// @dev constructs a new `Wallet` with a single owner.
/// @param walletOwner The owner of this wallet.
constructor (address walletOwner) public {
WALLET_OWNER = walletOwner;
diff --git a/packages/contracts/src/2.0.0/test/Whitelist/Whitelist.sol b/packages/contracts/src/2.0.0/examples/Whitelist/Whitelist.sol
index 60cac26ea..60cac26ea 100644
--- a/packages/contracts/src/2.0.0/test/Whitelist/Whitelist.sol
+++ b/packages/contracts/src/2.0.0/examples/Whitelist/Whitelist.sol
diff --git a/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol b/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol
index 97801166a..9272b18a8 100644
--- a/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol
+++ b/packages/contracts/src/2.0.0/test/DummyERC20Token/DummyERC20Token.sol
@@ -22,7 +22,10 @@ import "../Mintable/Mintable.sol";
import "../../utils/Ownable/Ownable.sol";
-contract DummyERC20Token is Mintable, Ownable {
+contract DummyERC20Token is
+ Mintable,
+ Ownable
+{
string public name;
string public symbol;
uint256 public decimals;
diff --git a/packages/contracts/src/2.0.0/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol b/packages/contracts/src/2.0.0/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol
index 07986f4bb..ad71fc9a1 100644
--- a/packages/contracts/src/2.0.0/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol
+++ b/packages/contracts/src/2.0.0/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol
@@ -21,7 +21,9 @@ pragma solidity 0.4.24;
import "../../protocol/Exchange/MixinAssetProxyDispatcher.sol";
-contract TestAssetProxyDispatcher is MixinAssetProxyDispatcher {
+contract TestAssetProxyDispatcher is
+ MixinAssetProxyDispatcher
+{
function publicDispatchTransferFrom(
bytes memory assetData,
address from,
diff --git a/packages/contracts/test/exchange/signature_validator.ts b/packages/contracts/test/exchange/signature_validator.ts
index ef154bf9b..f2bb42c75 100644
--- a/packages/contracts/test/exchange/signature_validator.ts
+++ b/packages/contracts/test/exchange/signature_validator.ts
@@ -9,8 +9,8 @@ import {
TestSignatureValidatorContract,
TestSignatureValidatorSignatureValidatorApprovalEventArgs,
} from '../../generated_contract_wrappers/test_signature_validator';
-import { TestValidatorContract } from '../../generated_contract_wrappers/test_validator';
-import { TestWalletContract } from '../../generated_contract_wrappers/test_wallet';
+import { ValidatorContract } from '../../generated_contract_wrappers/validator';
+import { WalletContract } from '../../generated_contract_wrappers/wallet';
import { addressUtils } from '../utils/address_utils';
import { artifacts } from '../utils/artifacts';
import { expectContractCallFailed } from '../utils/assertions';
@@ -29,8 +29,8 @@ describe('MixinSignatureValidator', () => {
let signedOrder: SignedOrder;
let orderFactory: OrderFactory;
let signatureValidator: TestSignatureValidatorContract;
- let testWallet: TestWalletContract;
- let testValidator: TestValidatorContract;
+ let testWallet: WalletContract;
+ let testValidator: ValidatorContract;
let signerAddress: string;
let signerPrivateKey: Buffer;
let notSignerAddress: string;
@@ -53,14 +53,14 @@ describe('MixinSignatureValidator', () => {
provider,
txDefaults,
);
- testWallet = await TestWalletContract.deployFrom0xArtifactAsync(
- artifacts.TestWallet,
+ testWallet = await WalletContract.deployFrom0xArtifactAsync(
+ artifacts.Wallet,
provider,
txDefaults,
signerAddress,
);
- testValidator = await TestValidatorContract.deployFrom0xArtifactAsync(
- artifacts.TestValidator,
+ testValidator = await ValidatorContract.deployFrom0xArtifactAsync(
+ artifacts.Validator,
provider,
txDefaults,
signerAddress,
diff --git a/packages/contracts/test/utils/artifacts.ts b/packages/contracts/test/utils/artifacts.ts
index d3f808218..854c1cd06 100644
--- a/packages/contracts/test/utils/artifacts.ts
+++ b/packages/contracts/test/utils/artifacts.ts
@@ -18,9 +18,9 @@ import * as TestAssetProxyOwner from '../../artifacts/TestAssetProxyOwner.json';
import * as TestLibBytes from '../../artifacts/TestLibBytes.json';
import * as TestLibs from '../../artifacts/TestLibs.json';
import * as TestSignatureValidator from '../../artifacts/TestSignatureValidator.json';
-import * as TestValidator from '../../artifacts/TestValidator.json';
-import * as TestWallet from '../../artifacts/TestWallet.json';
import * as TokenRegistry from '../../artifacts/TokenRegistry.json';
+import * as Validator from '../../artifacts/Validator.json';
+import * as Wallet from '../../artifacts/Wallet.json';
import * as EtherToken from '../../artifacts/WETH9.json';
import * as Whitelist from '../../artifacts/Whitelist.json';
import * as ZRX from '../../artifacts/ZRXToken.json';
@@ -45,8 +45,8 @@ export const artifacts = {
TestLibBytes: (TestLibBytes as any) as ContractArtifact,
TestLibs: (TestLibs as any) as ContractArtifact,
TestSignatureValidator: (TestSignatureValidator as any) as ContractArtifact,
- TestValidator: (TestValidator as any) as ContractArtifact,
- TestWallet: (TestWallet as any) as ContractArtifact,
+ Validator: (Validator as any) as ContractArtifact,
+ Wallet: (Wallet as any) as ContractArtifact,
TokenRegistry: (TokenRegistry as any) as ContractArtifact,
Whitelist: (Whitelist as any) as ContractArtifact,
ZRX: (ZRX as any) as ContractArtifact,