Update remaining contract Solidity versions to 0.5.5
This commit is contained in:
parent
87cc1f9415
commit
d35a053efd
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
@ -19,11 +28,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contracts": [
|
"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/ERC20Proxy.sol",
|
||||||
"src/ERC721Proxy.sol",
|
"src/ERC721Proxy.sol",
|
||||||
"src/MixinAuthorizable.sol",
|
"src/MixinAuthorizable.sol",
|
||||||
|
@ -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/@(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."
|
"abis:comment": "This list is auto-generated by contracts-gen. Don't edit manually."
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
|
@ -5,11 +5,6 @@
|
|||||||
*/
|
*/
|
||||||
import { ContractArtifact } from 'ethereum-types';
|
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 ERC20Proxy from '../generated-artifacts/ERC20Proxy.json';
|
||||||
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
|
import * as ERC721Proxy from '../generated-artifacts/ERC721Proxy.json';
|
||||||
import * as IAssetData from '../generated-artifacts/IAssetData.json';
|
import * as IAssetData from '../generated-artifacts/IAssetData.json';
|
||||||
@ -18,11 +13,6 @@ import * as IAuthorizable from '../generated-artifacts/IAuthorizable.json';
|
|||||||
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
|
import * as MixinAuthorizable from '../generated-artifacts/MixinAuthorizable.json';
|
||||||
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
|
import * as MultiAssetProxy from '../generated-artifacts/MultiAssetProxy.json';
|
||||||
export const artifacts = {
|
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,
|
ERC20Proxy: ERC20Proxy as ContractArtifact,
|
||||||
ERC721Proxy: ERC721Proxy as ContractArtifact,
|
ERC721Proxy: ERC721Proxy as ContractArtifact,
|
||||||
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
|
MixinAuthorizable: MixinAuthorizable as ContractArtifact,
|
||||||
|
@ -3,11 +3,6 @@
|
|||||||
* 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/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/erc20_proxy';
|
||||||
export * from '../generated-wrappers/erc721_proxy';
|
export * from '../generated-wrappers/erc721_proxy';
|
||||||
export * from '../generated-wrappers/i_asset_data';
|
export * from '../generated-wrappers/i_asset_data';
|
||||||
|
@ -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 {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
@ -18,12 +30,6 @@ import * as _ from 'lodash';
|
|||||||
|
|
||||||
import {
|
import {
|
||||||
artifacts,
|
artifacts,
|
||||||
DummyERC20TokenContract,
|
|
||||||
DummyERC20TokenTransferEventArgs,
|
|
||||||
DummyERC721ReceiverContract,
|
|
||||||
DummyERC721TokenContract,
|
|
||||||
DummyMultipleReturnERC20TokenContract,
|
|
||||||
DummyNoReturnERC20TokenContract,
|
|
||||||
ERC20ProxyContract,
|
ERC20ProxyContract,
|
||||||
ERC20Wrapper,
|
ERC20Wrapper,
|
||||||
ERC721ProxyContract,
|
ERC721ProxyContract,
|
||||||
@ -148,7 +154,7 @@ describe('Asset Transfer Proxies', () => {
|
|||||||
constants.DUMMY_TOKEN_DECIMALS,
|
constants.DUMMY_TOKEN_DECIMALS,
|
||||||
);
|
);
|
||||||
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
|
noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.DummyNoReturnERC20Token,
|
erc20Artifacts.DummyNoReturnERC20Token,
|
||||||
provider,
|
provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
constants.DUMMY_TOKEN_NAME,
|
constants.DUMMY_TOKEN_NAME,
|
||||||
@ -157,7 +163,7 @@ describe('Asset Transfer Proxies', () => {
|
|||||||
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
|
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
|
||||||
);
|
);
|
||||||
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
|
multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.DummyMultipleReturnERC20Token,
|
erc20Artifacts.DummyMultipleReturnERC20Token,
|
||||||
provider,
|
provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
constants.DUMMY_TOKEN_NAME,
|
constants.DUMMY_TOKEN_NAME,
|
||||||
@ -198,7 +204,7 @@ describe('Asset Transfer Proxies', () => {
|
|||||||
// Deploy and configure ERC721 tokens and receiver
|
// Deploy and configure ERC721 tokens and receiver
|
||||||
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
|
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
|
||||||
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
|
erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.DummyERC721Receiver,
|
erc721Artifacts.DummyERC721Receiver,
|
||||||
provider,
|
provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
);
|
);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { artifacts as erc20Artifacts, DummyERC20TokenContract } from '@0x/contracts-erc20';
|
||||||
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
|
import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
|
||||||
import { assetDataUtils } from '@0x/order-utils';
|
import { assetDataUtils } from '@0x/order-utils';
|
||||||
import { BigNumber } from '@0x/utils';
|
import { BigNumber } from '@0x/utils';
|
||||||
@ -5,7 +6,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
|||||||
import { ZeroExProvider } from 'ethereum-types';
|
import { ZeroExProvider } from 'ethereum-types';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import { artifacts, DummyERC20TokenContract, ERC20ProxyContract } from '../../src';
|
import { artifacts, ERC20ProxyContract } from '../../src';
|
||||||
|
|
||||||
export class ERC20Wrapper {
|
export class ERC20Wrapper {
|
||||||
private readonly _tokenOwnerAddresses: string[];
|
private readonly _tokenOwnerAddresses: string[];
|
||||||
@ -36,7 +37,7 @@ export class ERC20Wrapper {
|
|||||||
for (let i = 0; i < numberToDeploy; i++) {
|
for (let i = 0; i < numberToDeploy; i++) {
|
||||||
this._dummyTokenContracts.push(
|
this._dummyTokenContracts.push(
|
||||||
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
|
await DummyERC20TokenContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.DummyERC20Token,
|
erc20Artifacts.DummyERC20Token,
|
||||||
this._provider,
|
this._provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
constants.DUMMY_TOKEN_NAME,
|
constants.DUMMY_TOKEN_NAME,
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { artifacts as erc721Artifacts, DummyERC721TokenContract } from '@0x/contracts-erc721';
|
||||||
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
|
import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
|
||||||
import { generatePseudoRandomSalt } from '@0x/order-utils';
|
import { generatePseudoRandomSalt } from '@0x/order-utils';
|
||||||
import { BigNumber } from '@0x/utils';
|
import { BigNumber } from '@0x/utils';
|
||||||
@ -5,7 +6,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
|||||||
import { ZeroExProvider } from 'ethereum-types';
|
import { ZeroExProvider } from 'ethereum-types';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
|
|
||||||
import { artifacts, DummyERC721TokenContract, ERC721ProxyContract } from '../../src';
|
import { artifacts, ERC721ProxyContract } from '../../src';
|
||||||
|
|
||||||
export class ERC721Wrapper {
|
export class ERC721Wrapper {
|
||||||
private readonly _tokenOwnerAddresses: string[];
|
private readonly _tokenOwnerAddresses: string[];
|
||||||
@ -28,7 +29,7 @@ export class ERC721Wrapper {
|
|||||||
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
|
for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
|
||||||
this._dummyTokenContracts.push(
|
this._dummyTokenContracts.push(
|
||||||
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
|
await DummyERC721TokenContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.DummyERC721Token,
|
erc721Artifacts.DummyERC721Token,
|
||||||
this._provider,
|
this._provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
constants.DUMMY_TOKEN_NAME,
|
constants.DUMMY_TOKEN_NAME,
|
||||||
|
@ -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 {
|
import {
|
||||||
artifacts as exchangeArtifacts,
|
artifacts as exchangeArtifacts,
|
||||||
ExchangeCancelEventArgs,
|
ExchangeCancelEventArgs,
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
@ -28,7 +37,6 @@
|
|||||||
"src/interfaces/IEtherToken.sol",
|
"src/interfaces/IEtherToken.sol",
|
||||||
"test/DummyERC20Token.sol",
|
"test/DummyERC20Token.sol",
|
||||||
"test/DummyMultipleReturnERC20Token.sol",
|
"test/DummyMultipleReturnERC20Token.sol",
|
||||||
"test/DummyNoReturnERC20Token.sol",
|
"test/DummyNoReturnERC20Token.sol"
|
||||||
"test/ReentrantERC20Token.sol"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./interfaces/IERC20Token.sol";
|
import "./interfaces/IERC20Token.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||||
import "./UnlimitedAllowanceERC20Token.sol";
|
import "./UnlimitedAllowanceERC20Token.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./ERC20Token.sol";
|
import "./ERC20Token.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IERC20Token {
|
contract IERC20Token {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./IERC20Token.sol";
|
import "./IERC20Token.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||||
import "../src/MintableERC20Token.sol";
|
import "../src/MintableERC20Token.sol";
|
||||||
@ -32,8 +32,8 @@ contract DummyERC20Token is
|
|||||||
uint256 public constant MAX_MINT_AMOUNT = 10000000000000000000000;
|
uint256 public constant MAX_MINT_AMOUNT = 10000000000000000000000;
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
string _name,
|
string memory _name,
|
||||||
string _symbol,
|
string memory _symbol,
|
||||||
uint256 _decimals,
|
uint256 _decimals,
|
||||||
uint256 _totalSupply
|
uint256 _totalSupply
|
||||||
)
|
)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./DummyERC20Token.sol";
|
import "./DummyERC20Token.sol";
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ contract DummyMultipleReturnERC20Token is
|
|||||||
DummyERC20Token
|
DummyERC20Token
|
||||||
{
|
{
|
||||||
constructor (
|
constructor (
|
||||||
string _name,
|
string memory _name,
|
||||||
string _symbol,
|
string memory _symbol,
|
||||||
uint256 _decimals,
|
uint256 _decimals,
|
||||||
uint256 _totalSupply
|
uint256 _totalSupply
|
||||||
)
|
)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./DummyERC20Token.sol";
|
import "./DummyERC20Token.sol";
|
||||||
|
|
||||||
@ -26,8 +26,8 @@ contract DummyNoReturnERC20Token is
|
|||||||
DummyERC20Token
|
DummyERC20Token
|
||||||
{
|
{
|
||||||
constructor (
|
constructor (
|
||||||
string _name,
|
string memory _name,
|
||||||
string _symbol,
|
string memory _symbol,
|
||||||
uint256 _decimals,
|
uint256 _decimals,
|
||||||
uint256 _totalSupply
|
uint256 _totalSupply
|
||||||
)
|
)
|
||||||
|
@ -68,8 +68,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^5.0.2",
|
"@0x/base-contract": "^5.0.2",
|
||||||
"@0x/contracts-exchange-libs": "1.0.2",
|
"@0x/contracts-exchange-libs": "^1.1.3",
|
||||||
"@0x/contracts-utils": "2.0.1",
|
"@0x/contracts-utils": "^2.0.8",
|
||||||
"@0x/types": "^2.1.1",
|
"@0x/types": "^2.1.1",
|
||||||
"@0x/typescript-typings": "^4.1.0",
|
"@0x/typescript-typings": "^4.1.0",
|
||||||
"@0x/utils": "^4.2.2",
|
"@0x/utils": "^4.2.2",
|
||||||
|
@ -12,7 +12,6 @@ import * as ERC20Token from '../generated-artifacts/ERC20Token.json';
|
|||||||
import * as IERC20Token from '../generated-artifacts/IERC20Token.json';
|
import * as IERC20Token from '../generated-artifacts/IERC20Token.json';
|
||||||
import * as IEtherToken from '../generated-artifacts/IEtherToken.json';
|
import * as IEtherToken from '../generated-artifacts/IEtherToken.json';
|
||||||
import * as MintableERC20Token from '../generated-artifacts/MintableERC20Token.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 UnlimitedAllowanceERC20Token from '../generated-artifacts/UnlimitedAllowanceERC20Token.json';
|
||||||
import * as WETH9 from '../generated-artifacts/WETH9.json';
|
import * as WETH9 from '../generated-artifacts/WETH9.json';
|
||||||
import * as ZRXToken from '../generated-artifacts/ZRXToken.json';
|
import * as ZRXToken from '../generated-artifacts/ZRXToken.json';
|
||||||
@ -27,5 +26,4 @@ export const artifacts = {
|
|||||||
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
||||||
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
|
DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
|
||||||
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
|
DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
|
||||||
ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
|
|
||||||
};
|
};
|
||||||
|
@ -10,7 +10,6 @@ export * from '../generated-wrappers/erc20_token';
|
|||||||
export * from '../generated-wrappers/i_erc20_token';
|
export * from '../generated-wrappers/i_erc20_token';
|
||||||
export * from '../generated-wrappers/i_ether_token';
|
export * from '../generated-wrappers/i_ether_token';
|
||||||
export * from '../generated-wrappers/mintable_erc20_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/unlimited_allowance_erc20_token';
|
||||||
export * from '../generated-wrappers/weth9';
|
export * from '../generated-wrappers/weth9';
|
||||||
export * from '../generated-wrappers/zrx_token';
|
export * from '../generated-wrappers/zrx_token';
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./interfaces/IERC721Token.sol";
|
import "./interfaces/IERC721Token.sol";
|
||||||
import "./interfaces/IERC721Receiver.sol";
|
import "./interfaces/IERC721Receiver.sol";
|
||||||
@ -59,7 +59,7 @@ contract ERC721Token is
|
|||||||
address _from,
|
address _from,
|
||||||
address _to,
|
address _to,
|
||||||
uint256 _tokenId,
|
uint256 _tokenId,
|
||||||
bytes _data
|
bytes calldata _data
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./ERC721Token.sol";
|
import "./ERC721Token.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IERC721Receiver {
|
contract IERC721Receiver {
|
||||||
@ -37,7 +37,7 @@ contract IERC721Receiver {
|
|||||||
address _operator,
|
address _operator,
|
||||||
address _from,
|
address _from,
|
||||||
uint256 _tokenId,
|
uint256 _tokenId,
|
||||||
bytes _data
|
bytes calldata _data
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
returns (bytes4);
|
returns (bytes4);
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IERC721Token {
|
contract IERC721Token {
|
||||||
@ -66,7 +66,7 @@ contract IERC721Token {
|
|||||||
address _from,
|
address _from,
|
||||||
address _to,
|
address _to,
|
||||||
uint256 _tokenId,
|
uint256 _tokenId,
|
||||||
bytes _data
|
bytes calldata _data
|
||||||
)
|
)
|
||||||
external;
|
external;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/interfaces/IERC721Receiver.sol";
|
import "../src/interfaces/IERC721Receiver.sol";
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ contract DummyERC721Receiver is
|
|||||||
address _operator,
|
address _operator,
|
||||||
address _from,
|
address _from,
|
||||||
uint256 _tokenId,
|
uint256 _tokenId,
|
||||||
bytes _data
|
bytes calldata _data
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
returns (bytes4)
|
returns (bytes4)
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/MintableERC721Token.sol";
|
import "../src/MintableERC721Token.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||||
@ -31,8 +31,8 @@ contract DummyERC721Token is
|
|||||||
string public symbol;
|
string public symbol;
|
||||||
|
|
||||||
constructor (
|
constructor (
|
||||||
string _name,
|
string memory _name,
|
||||||
string _symbol
|
string memory _symbol
|
||||||
)
|
)
|
||||||
public
|
public
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/interfaces/IERC721Receiver.sol";
|
import "../src/interfaces/IERC721Receiver.sol";
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ contract InvalidERC721Receiver is
|
|||||||
address _operator,
|
address _operator,
|
||||||
address _from,
|
address _from,
|
||||||
uint256 _tokenId,
|
uint256 _tokenId,
|
||||||
bytes _data
|
bytes calldata _data
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
returns (bytes4)
|
returns (bytes4)
|
||||||
|
@ -68,7 +68,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^5.0.2",
|
"@0x/base-contract": "^5.0.2",
|
||||||
"@0x/contracts-utils": "2.0.1",
|
"@0x/contracts-utils": "^2.0.8",
|
||||||
"@0x/types": "^2.1.1",
|
"@0x/types": "^2.1.1",
|
||||||
"@0x/typescript-typings": "^4.1.0",
|
"@0x/typescript-typings": "^4.1.0",
|
||||||
"@0x/utils": "^4.2.2",
|
"@0x/utils": "^4.2.2",
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
@ -18,11 +27,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contracts": [
|
"contracts": ["src/Forwarder.sol"]
|
||||||
"@0x/contracts-erc20/contracts/src/WETH9.sol",
|
|
||||||
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
|
|
||||||
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
|
|
||||||
"@0x/contracts-exchange/contracts/src/Exchange.sol",
|
|
||||||
"src/Forwarder.sol"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -70,8 +70,8 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0x/base-contract": "^5.0.2",
|
"@0x/base-contract": "^5.0.2",
|
||||||
"@0x/contracts-asset-proxy": "^1.0.9",
|
"@0x/contracts-asset-proxy": "^1.0.9",
|
||||||
"@0x/contracts-erc20": "^1.0.9",
|
"@0x/contracts-erc20": "1.0.8",
|
||||||
"@0x/contracts-erc721": "^1.0.9",
|
"@0x/contracts-erc721": "1.0.8",
|
||||||
"@0x/contracts-exchange": "1.0.2",
|
"@0x/contracts-exchange": "1.0.2",
|
||||||
"@0x/contracts-exchange-libs": "1.0.2",
|
"@0x/contracts-exchange-libs": "1.0.2",
|
||||||
"@0x/contracts-utils": "2.0.1",
|
"@0x/contracts-utils": "2.0.1",
|
||||||
|
@ -5,15 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
import { ContractArtifact } from 'ethereum-types';
|
import { ContractArtifact } from 'ethereum-types';
|
||||||
|
|
||||||
import * as DummyERC20Token from '../generated-artifacts/DummyERC20Token.json';
|
|
||||||
import * as DummyERC721Token from '../generated-artifacts/DummyERC721Token.json';
|
|
||||||
import * as Exchange from '../generated-artifacts/Exchange.json';
|
|
||||||
import * as Forwarder from '../generated-artifacts/Forwarder.json';
|
import * as Forwarder from '../generated-artifacts/Forwarder.json';
|
||||||
import * as WETH9 from '../generated-artifacts/WETH9.json';
|
|
||||||
export const artifacts = {
|
export const artifacts = {
|
||||||
WETH9: WETH9 as ContractArtifact,
|
|
||||||
DummyERC20Token: DummyERC20Token as ContractArtifact,
|
|
||||||
DummyERC721Token: DummyERC721Token as ContractArtifact,
|
|
||||||
Exchange: Exchange as ContractArtifact,
|
|
||||||
Forwarder: Forwarder as ContractArtifact,
|
Forwarder: Forwarder as ContractArtifact,
|
||||||
};
|
};
|
||||||
|
@ -3,8 +3,4 @@
|
|||||||
* 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/dummy_erc20_token';
|
|
||||||
export * from '../generated-wrappers/dummy_erc721_token';
|
|
||||||
export * from '../generated-wrappers/exchange';
|
|
||||||
export * from '../generated-wrappers/forwarder';
|
export * from '../generated-wrappers/forwarder';
|
||||||
export * from '../generated-wrappers/weth9';
|
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
import {
|
import { ERC20Wrapper, ERC721Wrapper } from '@0x/contracts-asset-proxy';
|
||||||
DummyERC20TokenContract,
|
import { artifacts as erc20Artifacts, DummyERC20TokenContract, WETH9Contract } from '@0x/contracts-erc20';
|
||||||
DummyERC721TokenContract,
|
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
|
||||||
ERC20Wrapper,
|
import { artifacts as exchangeArtifacts, ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
|
||||||
ERC721Wrapper,
|
|
||||||
} from '@0x/contracts-asset-proxy';
|
|
||||||
import { ExchangeContract, ExchangeWrapper } from '@0x/contracts-exchange';
|
|
||||||
import {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
@ -26,7 +23,7 @@ import { Web3Wrapper } from '@0x/web3-wrapper';
|
|||||||
import * as chai from 'chai';
|
import * as chai from 'chai';
|
||||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||||
|
|
||||||
import { artifacts, ForwarderContract, ForwarderWrapper, WETH9Contract } from '../src';
|
import { artifacts, ForwarderContract, ForwarderWrapper } from '../src';
|
||||||
|
|
||||||
chaiSetup.configure();
|
chaiSetup.configure();
|
||||||
const expect = chai.expect;
|
const expect = chai.expect;
|
||||||
@ -91,14 +88,14 @@ describe(ContractName.Forwarder, () => {
|
|||||||
const erc721Balances = await erc721Wrapper.getBalancesAsync();
|
const erc721Balances = await erc721Wrapper.getBalancesAsync();
|
||||||
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
|
erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
|
||||||
|
|
||||||
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults);
|
wethContract = await WETH9Contract.deployFrom0xArtifactAsync(erc20Artifacts.WETH9, provider, txDefaults);
|
||||||
weth = new DummyERC20TokenContract(wethContract.abi, wethContract.address, provider);
|
weth = new DummyERC20TokenContract(wethContract.abi, wethContract.address, provider);
|
||||||
erc20Wrapper.addDummyTokenContract(weth);
|
erc20Wrapper.addDummyTokenContract(weth);
|
||||||
|
|
||||||
wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
|
wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
|
||||||
zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
|
zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
|
||||||
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
|
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.Exchange,
|
exchangeArtifacts.Exchange,
|
||||||
provider,
|
provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
zrxAssetData,
|
zrxAssetData,
|
||||||
@ -169,7 +166,7 @@ describe(ContractName.Forwarder, () => {
|
|||||||
describe('constructor', () => {
|
describe('constructor', () => {
|
||||||
it('should revert if assetProxy is unregistered', async () => {
|
it('should revert if assetProxy is unregistered', async () => {
|
||||||
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
|
const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
|
||||||
artifacts.Exchange,
|
exchangeArtifacts.Exchange,
|
||||||
provider,
|
provider,
|
||||||
txDefaults,
|
txDefaults,
|
||||||
zrxAssetData,
|
zrxAssetData,
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
import { artifacts as erc20Artifacts } from '@0x/contracts-erc20';
|
||||||
|
import { artifacts as erc721Artifacts } from '@0x/contracts-erc721';
|
||||||
|
import { artifacts as exchangeArtifacts } from '@0x/contracts-exchange';
|
||||||
import { constants, formatters, LogDecoder, MarketSellOrders, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
import { constants, formatters, LogDecoder, MarketSellOrders, Web3ProviderEngine } from '@0x/contracts-test-utils';
|
||||||
import { SignedOrder } from '@0x/types';
|
import { SignedOrder } from '@0x/types';
|
||||||
import { BigNumber } from '@0x/utils';
|
import { BigNumber } from '@0x/utils';
|
||||||
@ -58,7 +61,12 @@ export class ForwarderWrapper {
|
|||||||
constructor(contractInstance: ForwarderContract, provider: Web3ProviderEngine) {
|
constructor(contractInstance: ForwarderContract, provider: Web3ProviderEngine) {
|
||||||
this._forwarderContract = contractInstance;
|
this._forwarderContract = contractInstance;
|
||||||
this._web3Wrapper = new Web3Wrapper(provider);
|
this._web3Wrapper = new Web3Wrapper(provider);
|
||||||
this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
|
this._logDecoder = new LogDecoder(this._web3Wrapper, {
|
||||||
|
...artifacts,
|
||||||
|
...exchangeArtifacts,
|
||||||
|
...erc20Artifacts,
|
||||||
|
...erc721Artifacts,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
public async marketSellOrdersWithEthAsync(
|
public async marketSellOrdersWithEthAsync(
|
||||||
orders: SignedOrder[],
|
orders: SignedOrder[],
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "./LibOrder.sol";
|
import "./LibOrder.sol";
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// solhint-disable
|
// solhint-disable
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
/// @dev This contract documents the revert reasons used in the AssetProxy contracts.
|
/// @dev This contract documents the revert reasons used in the AssetProxy contracts.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
// solhint-disable max-line-length
|
// solhint-disable max-line-length
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract LibEIP712 {
|
contract LibEIP712 {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// solhint-disable
|
// solhint-disable
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
/// @dev This contract documents the revert reasons used in the Exchange contract.
|
/// @dev This contract documents the revert reasons used in the Exchange contract.
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract LibExchangeSelectors {
|
contract LibExchangeSelectors {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
import "@0x/contracts-utils/contracts/src/SafeMath.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./LibEIP712.sol";
|
import "./LibEIP712.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.5.3;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "../src/LibMath.sol";
|
import "../src/LibMath.sol";
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
@ -19,14 +28,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contracts": [
|
"contracts": [
|
||||||
"@0x/contracts-asset-proxy/contracts/src/ERC20Proxy.sol",
|
|
||||||
"@0x/contracts-asset-proxy/contracts/src/ERC721Proxy.sol",
|
|
||||||
"@0x/contracts-asset-proxy/contracts/src/MultiAssetProxy.sol",
|
|
||||||
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
|
|
||||||
"@0x/contracts-erc20/contracts/test/DummyNoReturnERC20Token.sol",
|
|
||||||
"@0x/contracts-erc20/contracts/test/ReentrantERC20Token.sol",
|
|
||||||
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
|
|
||||||
"@0x/contracts-exchange-libs/contracts/test/TestLibs.sol",
|
|
||||||
"examples/ExchangeWrapper.sol",
|
"examples/ExchangeWrapper.sol",
|
||||||
"examples/Validator.sol",
|
"examples/Validator.sol",
|
||||||
"examples/Wallet.sol",
|
"examples/Wallet.sol",
|
||||||
@ -44,6 +45,7 @@
|
|||||||
"test/TestAssetProxyDispatcher.sol",
|
"test/TestAssetProxyDispatcher.sol",
|
||||||
"test/TestExchangeInternals.sol",
|
"test/TestExchangeInternals.sol",
|
||||||
"test/TestSignatureValidator.sol",
|
"test/TestSignatureValidator.sol",
|
||||||
"test/TestStaticCallReceiver.sol"
|
"test/TestStaticCallReceiver.sol",
|
||||||
|
"test/ReentrantERC20Token.sol"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "../src/interfaces/IExchange.sol";
|
import "../src/interfaces/IExchange.sol";
|
||||||
@ -43,7 +43,7 @@ contract ExchangeWrapper {
|
|||||||
function cancelOrdersUpTo(
|
function cancelOrdersUpTo(
|
||||||
uint256 targetOrderEpoch,
|
uint256 targetOrderEpoch,
|
||||||
uint256 salt,
|
uint256 salt,
|
||||||
bytes makerSignature
|
bytes calldata makerSignature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/interfaces/IValidator.sol";
|
import "../src/interfaces/IValidator.sol";
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ contract Validator is
|
|||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
view
|
view
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/interfaces/IWallet.sol";
|
import "../src/interfaces/IWallet.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||||
@ -44,7 +44,7 @@ contract Wallet is
|
|||||||
/// @return Validity of signature.
|
/// @return Validity of signature.
|
||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
bytes eip712Signature
|
bytes calldata eip712Signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
view
|
view
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "../src/interfaces/IExchange.sol";
|
import "../src/interfaces/IExchange.sol";
|
||||||
@ -69,7 +69,7 @@ contract Whitelist is
|
|||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
view
|
view
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity 0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibConstants.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibConstants.sol";
|
||||||
@ -37,7 +37,7 @@ contract Exchange is
|
|||||||
MixinAssetProxyDispatcher,
|
MixinAssetProxyDispatcher,
|
||||||
MixinWrapperFunctions
|
MixinWrapperFunctions
|
||||||
{
|
{
|
||||||
string constant public VERSION = "2.0.1-alpha";
|
string constant public VERSION = "3.0.0";
|
||||||
|
|
||||||
// Mixins are instantiated in the order they are inherited
|
// Mixins are instantiated in the order they are inherited
|
||||||
constructor (bytes memory _zrxAssetData)
|
constructor (bytes memory _zrxAssetData)
|
||||||
|
@ -16,11 +16,11 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||||
import "./mixins/MAssetProxyDispatcher.sol";
|
import "./mixins/MAssetProxyDispatcher.sol";
|
||||||
import "@0x/contracts-asset-proxy/contracts/src/interfaces/IAssetProxy.sol";
|
import "./interfaces/IAssetProxy.sol";
|
||||||
|
|
||||||
|
|
||||||
contract MixinAssetProxyDispatcher is
|
contract MixinAssetProxyDispatcher is
|
||||||
@ -28,7 +28,7 @@ contract MixinAssetProxyDispatcher is
|
|||||||
MAssetProxyDispatcher
|
MAssetProxyDispatcher
|
||||||
{
|
{
|
||||||
// Mapping from Asset Proxy Id's to their respective Asset Proxy
|
// Mapping from Asset Proxy Id's to their respective Asset Proxy
|
||||||
mapping (bytes4 => IAssetProxy) public assetProxies;
|
mapping (bytes4 => address) public assetProxies;
|
||||||
|
|
||||||
/// @dev Registers an asset proxy to its asset proxy id.
|
/// @dev Registers an asset proxy to its asset proxy id.
|
||||||
/// Once an asset proxy is registered, it cannot be unregistered.
|
/// Once an asset proxy is registered, it cannot be unregistered.
|
||||||
@ -37,10 +37,8 @@ contract MixinAssetProxyDispatcher is
|
|||||||
external
|
external
|
||||||
onlyOwner
|
onlyOwner
|
||||||
{
|
{
|
||||||
IAssetProxy assetProxyContract = IAssetProxy(assetProxy);
|
|
||||||
|
|
||||||
// Ensure that no asset proxy exists with current id.
|
// Ensure that no asset proxy exists with current id.
|
||||||
bytes4 assetProxyId = assetProxyContract.getProxyId();
|
bytes4 assetProxyId = IAssetProxy(assetProxy).getProxyId();
|
||||||
address currentAssetProxy = assetProxies[assetProxyId];
|
address currentAssetProxy = assetProxies[assetProxyId];
|
||||||
require(
|
require(
|
||||||
currentAssetProxy == address(0),
|
currentAssetProxy == address(0),
|
||||||
@ -48,7 +46,7 @@ contract MixinAssetProxyDispatcher is
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Add asset proxy and log registration.
|
// Add asset proxy and log registration.
|
||||||
assetProxies[assetProxyId] = assetProxyContract;
|
assetProxies[assetProxyId] = assetProxy;
|
||||||
emit AssetProxyRegistered(
|
emit AssetProxyRegistered(
|
||||||
assetProxyId,
|
assetProxyId,
|
||||||
assetProxy
|
assetProxy
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
||||||
@ -46,7 +46,7 @@ contract MixinSignatureValidator is
|
|||||||
function preSign(
|
function preSign(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
{
|
{
|
||||||
@ -233,7 +233,7 @@ contract MixinSignatureValidator is
|
|||||||
function isValidWalletSignature(
|
function isValidWalletSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address walletAddress,
|
address walletAddress,
|
||||||
bytes signature
|
bytes memory signature
|
||||||
)
|
)
|
||||||
internal
|
internal
|
||||||
view
|
view
|
||||||
@ -282,7 +282,7 @@ contract MixinSignatureValidator is
|
|||||||
address validatorAddress,
|
address validatorAddress,
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes memory signature
|
||||||
)
|
)
|
||||||
internal
|
internal
|
||||||
view
|
view
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
pragma solidity ^0.4.24;
|
|
||||||
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibExchangeErrors.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibExchangeErrors.sol";
|
||||||
import "./mixins/MSignatureValidator.sol";
|
import "./mixins/MSignatureValidator.sol";
|
||||||
@ -43,8 +44,8 @@ contract MixinTransactions is
|
|||||||
function executeTransaction(
|
function executeTransaction(
|
||||||
uint256 salt,
|
uint256 salt,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes data,
|
bytes calldata data,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
{
|
{
|
||||||
@ -84,8 +85,9 @@ contract MixinTransactions is
|
|||||||
|
|
||||||
// Execute transaction
|
// Execute transaction
|
||||||
transactions[transactionHash] = true;
|
transactions[transactionHash] = true;
|
||||||
|
(bool success,) = address(this).delegatecall(data);
|
||||||
require(
|
require(
|
||||||
address(this).delegatecall(data),
|
success,
|
||||||
"FAILED_EXECUTION"
|
"FAILED_EXECUTION"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
import "@0x/contracts-utils/contracts/src/ReentrancyGuard.sol";
|
||||||
|
43
contracts/exchange/contracts/src/interfaces/IAssetProxy.sol
Normal file
43
contracts/exchange/contracts/src/interfaces/IAssetProxy.sol
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
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.5;
|
||||||
|
|
||||||
|
|
||||||
|
contract IAssetProxy {
|
||||||
|
|
||||||
|
/// @dev Transfers assets. Either succeeds or throws.
|
||||||
|
/// @param assetData Byte array encoded for the respective asset proxy.
|
||||||
|
/// @param from Address to transfer asset from.
|
||||||
|
/// @param to Address to transfer asset to.
|
||||||
|
/// @param amount Amount of asset to transfer.
|
||||||
|
function transferFrom(
|
||||||
|
bytes calldata assetData,
|
||||||
|
address from,
|
||||||
|
address to,
|
||||||
|
uint256 amount
|
||||||
|
)
|
||||||
|
external;
|
||||||
|
|
||||||
|
/// @dev Gets the proxy id associated with the proxy address.
|
||||||
|
/// @return Proxy id.
|
||||||
|
function getProxyId()
|
||||||
|
external
|
||||||
|
pure
|
||||||
|
returns (bytes4);
|
||||||
|
}
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IAssetProxyDispatcher {
|
contract IAssetProxyDispatcher {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "./IExchangeCore.sol";
|
import "./IExchangeCore.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
pragma solidity ^0.4.24;
|
|
||||||
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract ISignatureValidator {
|
contract ISignatureValidator {
|
||||||
@ -28,7 +28,7 @@ contract ISignatureValidator {
|
|||||||
function preSign(
|
function preSign(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external;
|
external;
|
||||||
|
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
pragma solidity ^0.4.24;
|
|
||||||
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract ITransactions {
|
contract ITransactions {
|
||||||
@ -28,8 +29,8 @@ contract ITransactions {
|
|||||||
function executeTransaction(
|
function executeTransaction(
|
||||||
uint256 salt,
|
uint256 salt,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes data,
|
bytes calldata data,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external;
|
external;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IValidator {
|
contract IValidator {
|
||||||
@ -29,7 +29,7 @@ contract IValidator {
|
|||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
view
|
view
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IWallet {
|
contract IWallet {
|
||||||
@ -27,7 +27,7 @@ contract IWallet {
|
|||||||
/// @return Validity of order signature.
|
/// @return Validity of order signature.
|
||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
view
|
view
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../interfaces/IAssetProxyDispatcher.sol";
|
import "../interfaces/IAssetProxyDispatcher.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
pragma solidity ^0.4.24;
|
|
||||||
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../interfaces/ISignatureValidator.sol";
|
import "../interfaces/ISignatureValidator.sol";
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ contract MSignatureValidator is
|
|||||||
function isValidWalletSignature(
|
function isValidWalletSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address walletAddress,
|
address walletAddress,
|
||||||
bytes signature
|
bytes memory signature
|
||||||
)
|
)
|
||||||
internal
|
internal
|
||||||
view
|
view
|
||||||
@ -67,7 +67,7 @@ contract MSignatureValidator is
|
|||||||
address validatorAddress,
|
address validatorAddress,
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes memory signature
|
||||||
)
|
)
|
||||||
internal
|
internal
|
||||||
view
|
view
|
||||||
|
@ -15,7 +15,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
pragma solidity ^0.4.24;
|
|
||||||
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../interfaces/ITransactions.sol";
|
import "../interfaces/ITransactions.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||||
import "../src/ERC20Token.sol";
|
import "@0x/contracts-erc20/contracts/src/ERC20Token.sol";
|
||||||
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
import "../src/interfaces/IExchange.sol";
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/MixinAssetProxyDispatcher.sol";
|
import "../src/MixinAssetProxyDispatcher.sol";
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "../src/Exchange.sol";
|
import "../src/Exchange.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "../src/MixinSignatureValidator.sol";
|
import "../src/MixinSignatureValidator.sol";
|
||||||
import "../src/MixinTransactions.sol";
|
import "../src/MixinTransactions.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
|
import "@0x/contracts-erc20/contracts/src/interfaces/IERC20Token.sol";
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ contract TestStaticCallReceiver {
|
|||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
returns (bool isValid)
|
returns (bool isValid)
|
||||||
@ -49,7 +49,7 @@ contract TestStaticCallReceiver {
|
|||||||
/// @return Validity of order signature.
|
/// @return Validity of order signature.
|
||||||
function isValidSignature(
|
function isValidSignature(
|
||||||
bytes32 hash,
|
bytes32 hash,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
returns (bool isValid)
|
returns (bool isValid)
|
||||||
|
@ -71,8 +71,8 @@
|
|||||||
"@0x/contracts-asset-proxy": "^1.0.9",
|
"@0x/contracts-asset-proxy": "^1.0.9",
|
||||||
"@0x/contracts-erc20": "^1.0.9",
|
"@0x/contracts-erc20": "^1.0.9",
|
||||||
"@0x/contracts-erc721": "^1.0.9",
|
"@0x/contracts-erc721": "^1.0.9",
|
||||||
"@0x/contracts-exchange-libs": "1.0.2",
|
"@0x/contracts-exchange-libs": "^1.1.3",
|
||||||
"@0x/contracts-utils": "2.0.1",
|
"@0x/contracts-utils": "^2.0.8",
|
||||||
"@0x/order-utils": "^7.0.2",
|
"@0x/order-utils": "^7.0.2",
|
||||||
"@0x/types": "^2.1.1",
|
"@0x/types": "^2.1.1",
|
||||||
"@0x/typescript-typings": "^4.1.0",
|
"@0x/typescript-typings": "^4.1.0",
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import {
|
import {
|
||||||
DummyERC20TokenContract,
|
|
||||||
DummyERC20TokenTransferEventArgs,
|
|
||||||
DummyERC721TokenContract,
|
|
||||||
DummyNoReturnERC20TokenContract,
|
|
||||||
ERC20ProxyContract,
|
ERC20ProxyContract,
|
||||||
ERC20Wrapper,
|
ERC20Wrapper,
|
||||||
ERC721ProxyContract,
|
ERC721ProxyContract,
|
||||||
ERC721Wrapper,
|
ERC721Wrapper,
|
||||||
MultiAssetProxyContract,
|
MultiAssetProxyContract,
|
||||||
} from '@0x/contracts-asset-proxy';
|
} from '@0x/contracts-asset-proxy';
|
||||||
|
import {
|
||||||
|
DummyERC20TokenContract,
|
||||||
|
DummyERC20TokenTransferEventArgs,
|
||||||
|
DummyNoReturnERC20TokenContract,
|
||||||
|
} from '@0x/contracts-erc20';
|
||||||
|
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
|
||||||
import {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
import {
|
import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
|
||||||
DummyERC20TokenContract,
|
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
|
||||||
ERC20ProxyContract,
|
|
||||||
ERC20Wrapper,
|
|
||||||
ERC721ProxyContract,
|
|
||||||
ERC721Wrapper,
|
|
||||||
} from '@0x/contracts-asset-proxy';
|
|
||||||
import {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import {
|
import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
|
||||||
DummyERC20TokenContract,
|
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
|
||||||
DummyERC721TokenContract,
|
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
|
||||||
ERC20ProxyContract,
|
|
||||||
ERC20Wrapper,
|
|
||||||
ERC721ProxyContract,
|
|
||||||
ERC721Wrapper,
|
|
||||||
} from '@0x/contracts-asset-proxy';
|
|
||||||
import {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
|
@ -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 {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
|
@ -1,11 +1,6 @@
|
|||||||
import {
|
import { ERC20ProxyContract, ERC20Wrapper, ERC721ProxyContract, ERC721Wrapper } from '@0x/contracts-asset-proxy';
|
||||||
DummyERC20TokenContract,
|
import { DummyERC20TokenContract } from '@0x/contracts-erc20';
|
||||||
DummyERC721TokenContract,
|
import { DummyERC721TokenContract } from '@0x/contracts-erc721';
|
||||||
ERC20ProxyContract,
|
|
||||||
ERC20Wrapper,
|
|
||||||
ERC721ProxyContract,
|
|
||||||
ERC721Wrapper,
|
|
||||||
} from '@0x/contracts-asset-proxy';
|
|
||||||
import {
|
import {
|
||||||
chaiSetup,
|
chaiSetup,
|
||||||
constants,
|
constants,
|
||||||
|
@ -5,7 +5,16 @@
|
|||||||
"isOfflineMode": false,
|
"isOfflineMode": false,
|
||||||
"compilerSettings": {
|
"compilerSettings": {
|
||||||
"evmVersion": "byzantium",
|
"evmVersion": "byzantium",
|
||||||
"optimizer": { "enabled": true, "runs": 1000000 },
|
"optimizer": {
|
||||||
|
"enabled": true,
|
||||||
|
"runs": 1000000,
|
||||||
|
"details": {
|
||||||
|
"yul": true,
|
||||||
|
"deduplicate": true,
|
||||||
|
"cse": true,
|
||||||
|
"constantOptimizer": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"outputSelection": {
|
"outputSelection": {
|
||||||
"*": {
|
"*": {
|
||||||
"*": [
|
"*": [
|
||||||
@ -19,11 +28,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contracts": [
|
"contracts": [
|
||||||
"@0x/contracts-asset-proxy/contracts/src/ERC20Proxy.sol",
|
|
||||||
"@0x/contracts-asset-proxy/contracts/src/ERC721Proxy.sol",
|
|
||||||
"@0x/contracts-erc20/contracts/src/WETH9.sol",
|
"@0x/contracts-erc20/contracts/src/WETH9.sol",
|
||||||
"@0x/contracts-erc20/contracts/test/DummyERC20Token.sol",
|
|
||||||
"@0x/contracts-erc721/contracts/test/DummyERC721Token.sol",
|
|
||||||
"@0x/contracts-exchange/contracts/examples/ExchangeWrapper.sol",
|
"@0x/contracts-exchange/contracts/examples/ExchangeWrapper.sol",
|
||||||
"@0x/contracts-exchange/contracts/src/Exchange.sol",
|
"@0x/contracts-exchange/contracts/src/Exchange.sol",
|
||||||
"src/BalanceThresholdFilter/BalanceThresholdFilter.sol",
|
"src/BalanceThresholdFilter/BalanceThresholdFilter.sol",
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
||||||
import "./interfaces/IThresholdAsset.sol";
|
import "./interfaces/IThresholdAsset.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibExchangeSelectors.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibExchangeSelectors.sol";
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
@ -57,8 +57,8 @@ contract MixinBalanceThresholdFilterCore is
|
|||||||
function executeTransaction(
|
function executeTransaction(
|
||||||
uint256 salt,
|
uint256 salt,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signedExchangeTransaction,
|
bytes calldata signedExchangeTransaction,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
{
|
{
|
||||||
@ -92,7 +92,8 @@ contract MixinBalanceThresholdFilterCore is
|
|||||||
/// @param signerAddress Address of transaction signer.
|
/// @param signerAddress Address of transaction signer.
|
||||||
/// @return addressesToValidate Array of addresses to validate.
|
/// @return addressesToValidate Array of addresses to validate.
|
||||||
function getAddressesToValidate(address signerAddress)
|
function getAddressesToValidate(address signerAddress)
|
||||||
internal pure
|
internal
|
||||||
|
pure
|
||||||
returns (address[] memory addressesToValidate)
|
returns (address[] memory addressesToValidate)
|
||||||
{
|
{
|
||||||
bytes4 exchangeFunctionSelector = bytes4(exchangeCalldataload(0));
|
bytes4 exchangeFunctionSelector = bytes4(exchangeCalldataload(0));
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "./mixins/MExchangeCalldata.sol";
|
import "./mixins/MExchangeCalldata.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/LibAddressArray.sol";
|
import "@0x/contracts-utils/contracts/src/LibAddressArray.sol";
|
||||||
@ -34,7 +34,8 @@ contract MixinExchangeCalldata is
|
|||||||
/// @param offset Offset into the Exchange calldata.
|
/// @param offset Offset into the Exchange calldata.
|
||||||
/// @return value Corresponding 32 byte value stored at `offset`.
|
/// @return value Corresponding 32 byte value stored at `offset`.
|
||||||
function exchangeCalldataload(uint256 offset)
|
function exchangeCalldataload(uint256 offset)
|
||||||
internal pure
|
internal
|
||||||
|
pure
|
||||||
returns (bytes32 value)
|
returns (bytes32 value)
|
||||||
{
|
{
|
||||||
assembly {
|
assembly {
|
||||||
@ -58,7 +59,8 @@ contract MixinExchangeCalldata is
|
|||||||
/// @param offset Offset into the Exchange calldata (minus the 4 byte selector)
|
/// @param offset Offset into the Exchange calldata (minus the 4 byte selector)
|
||||||
/// @return value Corresponding 32 byte value stored at `offset` + 4.
|
/// @return value Corresponding 32 byte value stored at `offset` + 4.
|
||||||
function loadExchangeData(uint256 offset)
|
function loadExchangeData(uint256 offset)
|
||||||
internal pure
|
internal
|
||||||
|
pure
|
||||||
returns (bytes32 value)
|
returns (bytes32 value)
|
||||||
{
|
{
|
||||||
value = exchangeCalldataload(offset + 4);
|
value = exchangeCalldataload(offset + 4);
|
||||||
@ -70,12 +72,13 @@ contract MixinExchangeCalldata is
|
|||||||
/// @param orderParamIndex Index of the order in the Exchange function's signature.
|
/// @param orderParamIndex Index of the order in the Exchange function's signature.
|
||||||
/// @return makerAddress The extracted maker address.
|
/// @return makerAddress The extracted maker address.
|
||||||
function loadMakerAddressFromOrder(uint256 orderParamIndex)
|
function loadMakerAddressFromOrder(uint256 orderParamIndex)
|
||||||
internal pure
|
internal
|
||||||
|
pure
|
||||||
returns (address makerAddress)
|
returns (address makerAddress)
|
||||||
{
|
{
|
||||||
uint256 orderOffsetInBytes = orderParamIndex * 32;
|
uint256 orderOffsetInBytes = orderParamIndex * 32;
|
||||||
uint256 orderPtr = uint256(loadExchangeData(orderOffsetInBytes));
|
uint256 orderPtr = uint256(loadExchangeData(orderOffsetInBytes));
|
||||||
makerAddress = address(loadExchangeData(orderPtr));
|
makerAddress = address(uint256(loadExchangeData(orderPtr)));
|
||||||
return makerAddress;
|
return makerAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,8 +87,9 @@ contract MixinExchangeCalldata is
|
|||||||
/// @param orderArrayParamIndex Index of the order array in the Exchange function's signature
|
/// @param orderArrayParamIndex Index of the order array in the Exchange function's signature
|
||||||
/// @return makerAddresses The extracted maker addresses.
|
/// @return makerAddresses The extracted maker addresses.
|
||||||
function loadMakerAddressesFromOrderArray(uint256 orderArrayParamIndex)
|
function loadMakerAddressesFromOrderArray(uint256 orderArrayParamIndex)
|
||||||
internal pure
|
internal
|
||||||
returns (address[] makerAddresses)
|
pure
|
||||||
|
returns (address[] memory makerAddresses)
|
||||||
{
|
{
|
||||||
uint256 orderArrayOffsetInBytes = orderArrayParamIndex * 32;
|
uint256 orderArrayOffsetInBytes = orderArrayParamIndex * 32;
|
||||||
uint256 orderArrayPtr = uint256(loadExchangeData(orderArrayOffsetInBytes));
|
uint256 orderArrayPtr = uint256(loadExchangeData(orderArrayOffsetInBytes));
|
||||||
@ -95,7 +99,7 @@ contract MixinExchangeCalldata is
|
|||||||
uint256 orderArrayElementEndPtr = orderArrayElementPtr + orderArrayLengthInBytes;
|
uint256 orderArrayElementEndPtr = orderArrayElementPtr + orderArrayLengthInBytes;
|
||||||
for (uint orderPtrOffset = orderArrayElementPtr; orderPtrOffset < orderArrayElementEndPtr; orderPtrOffset += 32) {
|
for (uint orderPtrOffset = orderArrayElementPtr; orderPtrOffset < orderArrayElementEndPtr; orderPtrOffset += 32) {
|
||||||
uint256 orderPtr = uint256(loadExchangeData(orderPtrOffset));
|
uint256 orderPtr = uint256(loadExchangeData(orderPtrOffset));
|
||||||
address makerAddress = address(loadExchangeData(orderPtr + orderArrayElementPtr));
|
address makerAddress = address(uint256(loadExchangeData(orderPtr + orderArrayElementPtr)));
|
||||||
makerAddresses = makerAddresses.append(makerAddress);
|
makerAddresses = makerAddresses.append(makerAddress);
|
||||||
}
|
}
|
||||||
return makerAddresses;
|
return makerAddresses;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IBalanceThresholdFilterCore {
|
contract IBalanceThresholdFilterCore {
|
||||||
@ -48,8 +48,8 @@ contract IBalanceThresholdFilterCore {
|
|||||||
function executeTransaction(
|
function executeTransaction(
|
||||||
uint256 salt,
|
uint256 salt,
|
||||||
address signerAddress,
|
address signerAddress,
|
||||||
bytes signedExchangeTransaction,
|
bytes calldata signedExchangeTransaction,
|
||||||
bytes signature
|
bytes calldata signature
|
||||||
)
|
)
|
||||||
external;
|
external;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IThresholdAsset {
|
contract IThresholdAsset {
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
||||||
import "../interfaces/IThresholdAsset.sol";
|
import "../interfaces/IThresholdAsset.sol";
|
||||||
@ -49,6 +49,7 @@ contract MBalanceThresholdFilterCore is
|
|||||||
/// @param signerAddress Address of transaction signer.
|
/// @param signerAddress Address of transaction signer.
|
||||||
/// @return addressesToValidate Array of addresses to validate.
|
/// @return addressesToValidate Array of addresses to validate.
|
||||||
function getAddressesToValidate(address signerAddress)
|
function getAddressesToValidate(address signerAddress)
|
||||||
internal pure
|
internal
|
||||||
|
pure
|
||||||
returns (address[] memory addressesToValidate);
|
returns (address[] memory addressesToValidate);
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract MExchangeCalldata {
|
contract MExchangeCalldata {
|
||||||
@ -51,6 +51,7 @@ contract MExchangeCalldata {
|
|||||||
/// @param orderArrayParamIndex Index of the order array in the Exchange function's signature
|
/// @param orderArrayParamIndex Index of the order array in the Exchange function's signature
|
||||||
/// @return makerAddresses The extracted maker addresses.
|
/// @return makerAddresses The extracted maker addresses.
|
||||||
function loadMakerAddressesFromOrderArray(uint256 orderArrayParamIndex)
|
function loadMakerAddressesFromOrderArray(uint256 orderArrayParamIndex)
|
||||||
internal pure
|
internal
|
||||||
returns (address[] makerAddresses);
|
pure
|
||||||
|
returns (address[] memory makerAddresses);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
import "@0x/contracts-exchange/contracts/src/interfaces/IExchange.sol";
|
||||||
@ -139,9 +139,7 @@ contract DutchAuction is
|
|||||||
/// @dev Calculates the Auction Details for the given order
|
/// @dev Calculates the Auction Details for the given order
|
||||||
/// @param order The sell order
|
/// @param order The sell order
|
||||||
/// @return AuctionDetails
|
/// @return AuctionDetails
|
||||||
function getAuctionDetails(
|
function getAuctionDetails(LibOrder.Order memory order)
|
||||||
LibOrder.Order memory order
|
|
||||||
)
|
|
||||||
public
|
public
|
||||||
returns (AuctionDetails memory auctionDetails)
|
returns (AuctionDetails memory auctionDetails)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
import "@0x/contracts-utils/contracts/src/LibBytes.sol";
|
||||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||||
@ -39,7 +39,7 @@ contract MixinAssets is
|
|||||||
/// @param assetData Byte array encoded for the respective asset proxy.
|
/// @param assetData Byte array encoded for the respective asset proxy.
|
||||||
/// @param amount Amount of asset to withdraw.
|
/// @param amount Amount of asset to withdraw.
|
||||||
function withdrawAsset(
|
function withdrawAsset(
|
||||||
bytes assetData,
|
bytes calldata assetData,
|
||||||
uint256 amount
|
uint256 amount
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
@ -52,7 +52,7 @@ contract MixinAssets is
|
|||||||
/// @param assetData Byte array encoded for the respective asset proxy.
|
/// @param assetData Byte array encoded for the respective asset proxy.
|
||||||
/// @param amount Amount of asset to approve for respective proxy.
|
/// @param amount Amount of asset to approve for respective proxy.
|
||||||
function approveAssetProxy(
|
function approveAssetProxy(
|
||||||
bytes assetData,
|
bytes calldata assetData,
|
||||||
uint256 amount
|
uint256 amount
|
||||||
)
|
)
|
||||||
external
|
external
|
||||||
@ -104,7 +104,7 @@ contract MixinAssets is
|
|||||||
// Transfer tokens.
|
// Transfer tokens.
|
||||||
// We do a raw call so we can check the success separate
|
// We do a raw call so we can check the success separate
|
||||||
// from the return data.
|
// from the return data.
|
||||||
bool success = token.call(abi.encodeWithSelector(
|
(bool success,) = token.call(abi.encodeWithSelector(
|
||||||
ERC20_TRANSFER_SELECTOR,
|
ERC20_TRANSFER_SELECTOR,
|
||||||
msg.sender,
|
msg.sender,
|
||||||
amount
|
amount
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "./libs/LibConstants.sol";
|
import "./libs/LibConstants.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity 0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
import "@0x/contracts-utils/contracts/src/Ownable.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
|
|
||||||
contract IAssets {
|
contract IAssets {
|
||||||
@ -27,7 +27,7 @@ contract IAssets {
|
|||||||
/// @param assetData Byte array encoded for the respective asset proxy.
|
/// @param assetData Byte array encoded for the respective asset proxy.
|
||||||
/// @param amount Amount of asset to withdraw.
|
/// @param amount Amount of asset to withdraw.
|
||||||
function withdrawAsset(
|
function withdrawAsset(
|
||||||
bytes assetData,
|
bytes calldata assetData,
|
||||||
uint256 amount
|
uint256 amount
|
||||||
)
|
)
|
||||||
external;
|
external;
|
||||||
@ -36,7 +36,7 @@ contract IAssets {
|
|||||||
/// @param assetData Byte array encoded for the respective asset proxy.
|
/// @param assetData Byte array encoded for the respective asset proxy.
|
||||||
/// @param amount Amount of asset to approve for respective proxy.
|
/// @param amount Amount of asset to approve for respective proxy.
|
||||||
function approveAssetProxy(
|
function approveAssetProxy(
|
||||||
bytes assetData,
|
bytes calldata assetData,
|
||||||
uint256 amount
|
uint256 amount
|
||||||
)
|
)
|
||||||
external;
|
external;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
pragma experimental ABIEncoderV2;
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
import "@0x/contracts-exchange-libs/contracts/src/LibOrder.sol";
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
pragma solidity ^0.4.24;
|
pragma solidity ^0.5.5;
|
||||||
|
|
||||||
import "@0x/contract-utils/contracts/src/interfaces/IOwnable.sol";
|
import "@0x/contract-utils/contracts/src/interfaces/IOwnable.sol";
|
||||||
import "./IMatchOrders.sol";
|
import "./IMatchOrders.sol";
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user