Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Commit

Permalink
Update remaining contract Solidity versions to 0.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
abandeali1 committed Mar 7, 2019
1 parent 87cc1f9 commit d35a053
Show file tree
Hide file tree
Showing 125 changed files with 453 additions and 321 deletions.
16 changes: 10 additions & 6 deletions contracts/asset-proxy/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
"isOfflineMode": false,
"compilerSettings": {
"evmVersion": "byzantium",
"optimizer": { "enabled": true, "runs": 1000000 },
"optimizer": {
"enabled": true,
"runs": 1000000,
"details": {
"yul": true,
"deduplicate": true,
"cse": true,
"constantOptimizer": true
}
},
"outputSelection": {
"*": {
"*": [
Expand All @@ -19,11 +28,6 @@
}
},
"contracts": [
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
"@0x/contracts-erc20/contracts/test/DummyMultipleReturnERC20Token.sol",
"@0x/contracts-erc20/contracts/test/DummyNoReturnERC20Token.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Receiver.sol",
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
"src/ERC20Proxy.sol",
"src/ERC721Proxy.sol",
"src/MixinAuthorizable.sol",
Expand Down
2 changes: 1 addition & 1 deletion contracts/asset-proxy/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
},
"config": {
"abis": "./generated-artifacts/@(DummyERC20Token|DummyERC721Receiver|DummyERC721Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|ERC20Proxy|ERC721Proxy|IAssetData|IAssetProxy|IAuthorizable|MixinAuthorizable|MultiAssetProxy).json",
"abis": "./generated-artifacts/@(ERC20Proxy|ERC721Proxy|IAssetData|IAssetProxy|IAuthorizable|MixinAuthorizable|MultiAssetProxy).json",
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
},
"repository": {
Expand Down
10 changes: 0 additions & 10 deletions contracts/asset-proxy/src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
*/
import { ContractArtifact } from 'ethereum-types';

import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
import * as DummyERC721Receiver from '../generated-artifacts/DummyERC721Receiver.json';
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
import * as DummyMultipleReturnERC20Token from '../generated-artifacts/DummyMultipleReturnERC20Token.json';
import * as DummyNoReturnERC20Token from '../generated-artifacts/DummyNoReturnERC20Token.json';
import * as ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
import * as IAssetData from '../generated-artifacts/IAssetData.json';
Expand All @@ -18,11 +13,6 @@ import * as IAuthorizable from '../generated-artifacts/IAuthorizable.json';
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
export const artifacts = {
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
DummyERC721Token: DummyERC721Token as ContractArtifact,
ERC20Proxy: ERC20Proxy as ContractArtifact,
ERC721Proxy: ERC721Proxy as ContractArtifact,
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
Expand Down
5 changes: 0 additions & 5 deletions contracts/asset-proxy/src/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
* Warning: This file is auto-generated by contracts-gen. Don't edit manually.
* -----------------------------------------------------------------------------
*/
export * from '../generated-wrappers/dummy_erc20_token';
export * from '../generated-wrappers/dummy_erc721_receiver';
export * from '../generated-wrappers/dummy_erc721_token';
export * from '../generated-wrappers/dummy_multiple_return_erc20_token';
export * from '../generated-wrappers/dummy_no_return_erc20_token';
export * from '../generated-wrappers/erc20_proxy';
export * from '../generated-wrappers/erc721_proxy';
export * from '../generated-wrappers/i_asset_data';
Expand Down
24 changes: 15 additions & 9 deletions contracts/asset-proxy/test/proxies.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
import {
artifacts as erc20Artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyMultipleReturnERC20TokenContract,
DummyNoReturnERC20TokenContract,
} from '@0x/contracts-erc20';
import {
artifacts as erc721Artifacts,
DummyERC721ReceiverContract,
DummyERC721TokenContract,
} from '@0x/contracts-erc721';
import {
chaiSetup,
constants,
Expand All @@ -18,12 +30,6 @@ import * as _ from 'lodash';

import {
artifacts,
DummyERC20TokenContract,
DummyERC20TokenTransferEventArgs,
DummyERC721ReceiverContract,
DummyERC721TokenContract,
DummyMultipleReturnERC20TokenContract,
DummyNoReturnERC20TokenContract,
ERC20ProxyContract,
ERC20Wrapper,
ERC721ProxyContract,
Expand Down Expand Up @@ -148,7 +154,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_DECIMALS,
);
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyNoReturnERC20Token,
erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
Expand All @@ -157,7 +163,7 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyMultipleReturnERC20Token,
erc20Artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
Expand Down Expand Up @@ -198,7 +204,7 @@ describe('Asset Transfer Proxies', () => {
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
artifacts.DummyERC721Receiver,
erc721Artifacts.DummyERC721Receiver,
provider,
txDefaults,
);
Expand Down
5 changes: 3 additions & 2 deletions contracts/asset-proxy/test/utils/erc20_wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { artifacts as erc20Artifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
import { assetDataUtils } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { ZeroExProvider } from 'ethereum-types';
import * as _ from 'lodash';

import { artifacts, DummyERC20TokenContract, ERC20ProxyContract } from '../../src';
import { artifacts, ERC20ProxyContract } from '../../src';

export class ERC20Wrapper {
private readonly _tokenOwnerAddresses: string[];
Expand Down Expand Up @@ -36,7 +37,7 @@ export class ERC20Wrapper {
for (let i = 0; i < numberToDeploy; i++) {
this._dummyTokenContracts.push(
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyERC20Token,
erc20Artifacts.DummyERC20Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
Expand Down
5 changes: 3 additions & 2 deletions contracts/asset-proxy/test/utils/erc721_wrapper.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { artifacts as erc721Artifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
import { generatePseudoRandomSalt } from '@0x/order-utils';
import { BigNumber } from '@0x/utils';
import { Web3Wrapper } from '@0x/web3-wrapper';
import { ZeroExProvider } from 'ethereum-types';
import * as _ from 'lodash';

import { artifacts, DummyERC721TokenContract, ERC721ProxyContract } from '../../src';
import { artifacts, ERC721ProxyContract } from '../../src';

export class ERC721Wrapper {
private readonly _tokenOwnerAddresses: string[];
Expand All @@ -28,7 +29,7 @@ export class ERC721Wrapper {
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
this._dummyTokenContracts.push(
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
artifacts.DummyERC721Token,
erc721Artifacts.DummyERC721Token,
this._provider,
txDefaults,
constants.DUMMY_TOKEN_NAME,
Expand Down
3 changes: 2 additions & 1 deletion contracts/coordinator/test/coordinator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DummyERC20TokenContract, ERC20ProxyContract, ERC20Wrapper } from '@0x/contracts-asset-proxy';
import { ERC20ProxyContract, ERC20Wrapper } from '@0x/contracts-asset-proxy';
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
import {
artifacts as exchangeArtifacts,
ExchangeCancelEventArgs,
Expand Down
14 changes: 11 additions & 3 deletions contracts/erc20/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
"isOfflineMode": false,
"compilerSettings": {
"evmVersion": "byzantium",
"optimizer": { "enabled": true, "runs": 1000000 },
"optimizer": {
"enabled": true,
"runs": 1000000,
"details": {
"yul": true,
"deduplicate": true,
"cse": true,
"constantOptimizer": true
}
},
"outputSelection": {
"*": {
"*": [
Expand All @@ -28,7 +37,6 @@
"src/interfaces/IEtherToken.sol",
"test/DummyERC20Token.sol",
"test/DummyMultipleReturnERC20Token.sol",
"test/DummyNoReturnERC20Token.sol",
"test/ReentrantERC20Token.sol"
"test/DummyNoReturnERC20Token.sol"
]
}
2 changes: 1 addition & 1 deletion contracts/erc20/contracts/src/ERC20Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;

import "./interfaces/IERC20Token.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/erc20/contracts/src/MintableERC20Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;

import "@0x/contracts-utils/contracts/src/SafeMath.sol";
import "./UnlimitedAllowanceERC20Token.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;

import "./ERC20Token.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/erc20/contracts/src/interfaces/IERC20Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;


contract IERC20Token {
Expand Down
2 changes: 1 addition & 1 deletion contracts/erc20/contracts/src/interfaces/IEtherToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;

import "./IERC20Token.sol";

Expand Down
6 changes: 3 additions & 3 deletions contracts/erc20/contracts/test/DummyERC20Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity 0.4.24;
pragma solidity ^0.5.5;

import "@0x/contracts-utils/contracts/src/Ownable.sol";
import "../src/MintableERC20Token.sol";
Expand All @@ -32,8 +32,8 @@ contract DummyERC20Token is
uint256 public constant MAX_MINT_AMOUNT = 10000000000000000000000;

constructor (
string _name,
string _symbol,
string memory _name,
string memory _symbol,
uint256 _decimals,
uint256 _totalSupply
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity 0.4.24;
pragma solidity ^0.5.5;

import "./DummyERC20Token.sol";

Expand All @@ -26,8 +26,8 @@ contract DummyMultipleReturnERC20Token is
DummyERC20Token
{
constructor (
string _name,
string _symbol,
string memory _name,
string memory _symbol,
uint256 _decimals,
uint256 _totalSupply
)
Expand Down
6 changes: 3 additions & 3 deletions contracts/erc20/contracts/test/DummyNoReturnERC20Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity 0.4.24;
pragma solidity ^0.5.5;

import "./DummyERC20Token.sol";

Expand All @@ -26,8 +26,8 @@ contract DummyNoReturnERC20Token is
DummyERC20Token
{
constructor (
string _name,
string _symbol,
string memory _name,
string memory _symbol,
uint256 _decimals,
uint256 _totalSupply
)
Expand Down
4 changes: 2 additions & 2 deletions contracts/erc20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@
},
"dependencies": {
"@0x/base-contract": "^5.0.2",
"@0x/contracts-exchange-libs": "1.0.2",
"@0x/contracts-utils": "2.0.1",
"@0x/contracts-exchange-libs": "^1.1.3",
"@0x/contracts-utils": "^2.0.8",
"@0x/types": "^2.1.1",
"@0x/typescript-typings": "^4.1.0",
"@0x/utils": "^4.2.2",
Expand Down
2 changes: 0 additions & 2 deletions contracts/erc20/src/artifacts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import * as ERC20Token from '../generated-artifacts/ERC20Token.json';
import * as IERC20Token from '../generated-artifacts/IERC20Token.json';
import * as IEtherToken from '../generated-artifacts/IEtherToken.json';
import * as MintableERC20Token from '../generated-artifacts/MintableERC20Token.json';
import * as ReentrantERC20Token from '../generated-artifacts/ReentrantERC20Token.json';
import * as UnlimitedAllowanceERC20Token from '../generated-artifacts/UnlimitedAllowanceERC20Token.json';
import * as WETH9 from '../generated-artifacts/WETH9.json';
import * as ZRXToken from '../generated-artifacts/ZRXToken.json';
Expand All @@ -27,5 +26,4 @@ export const artifacts = {
DummyERC20Token: DummyERC20Token as ContractArtifact,
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
};
1 change: 0 additions & 1 deletion contracts/erc20/src/wrappers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export * from '../generated-wrappers/erc20_token';
export * from '../generated-wrappers/i_erc20_token';
export * from '../generated-wrappers/i_ether_token';
export * from '../generated-wrappers/mintable_erc20_token';
export * from '../generated-wrappers/reentrant_erc20_token';
export * from '../generated-wrappers/unlimited_allowance_erc20_token';
export * from '../generated-wrappers/weth9';
export * from '../generated-wrappers/zrx_token';
11 changes: 10 additions & 1 deletion contracts/erc721/compiler.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,16 @@
"isOfflineMode": false,
"compilerSettings": {
"evmVersion": "byzantium",
"optimizer": { "enabled": true, "runs": 1000000 },
"optimizer": {
"enabled": true,
"runs": 1000000,
"details": {
"yul": true,
"deduplicate": true,
"cse": true,
"constantOptimizer": true
}
},
"outputSelection": {
"*": {
"*": [
Expand Down
4 changes: 2 additions & 2 deletions contracts/erc721/contracts/src/ERC721Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;

import "./interfaces/IERC721Token.sol";
import "./interfaces/IERC721Receiver.sol";
Expand Down Expand Up @@ -59,7 +59,7 @@ contract ERC721Token is
address _from,
address _to,
uint256 _tokenId,
bytes _data
bytes calldata _data
)
external
{
Expand Down
2 changes: 1 addition & 1 deletion contracts/erc721/contracts/src/MintableERC721Token.sol
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/

pragma solidity ^0.4.24;
pragma solidity ^0.5.5;

import "./ERC721Token.sol";

Expand Down
Loading

0 comments on commit d35a053

Please sign in to comment.