Fix compile errors
This commit is contained in:
parent
7d63c5d982
commit
d2be2ee6cd
@ -86,7 +86,7 @@ contract MixinWrapperFunctions is
|
||||
|
||||
// Allocate memory for input
|
||||
uint256 signatureLength = signature.length;
|
||||
uint256 paddingLength = (32 - signatureLength) % 32
|
||||
uint256 paddingLength = (32 - signatureLength) % 32;
|
||||
uint256 inputSize = 452 + signatureLength + paddingLength;
|
||||
bytes memory input = new bytes(inputSize);
|
||||
|
||||
@ -106,7 +106,7 @@ contract MixinWrapperFunctions is
|
||||
// is stored by value as 256-bit and right-padded with zeros.
|
||||
bytes4 FILL_ORDER_FUNCTION_SIGNATURE = bytes4(keccak256("fillOrder(address[5],uint256[6],uint256,uint8,bytes32,bytes32)"));
|
||||
assembly {
|
||||
mstore(start, FILL_ORDER_FUNCTION_SIGNATURE);
|
||||
mstore(start, FILL_ORDER_FUNCTION_SIGNATURE)
|
||||
}
|
||||
|
||||
// Write orderAddresses, orderValues, takerTokenFillAmount,
|
||||
@ -135,7 +135,7 @@ contract MixinWrapperFunctions is
|
||||
for (uint256 i = 0; i < signatureLength; i++) {
|
||||
input[452 + i] = signature[i];
|
||||
}
|
||||
for (uint256 i = 0; i < paddingLength; i++) {
|
||||
for (i = 0; i < paddingLength; i++) {
|
||||
input[452 + signatureLength + i] = 0x00;
|
||||
}
|
||||
|
||||
@ -166,7 +166,7 @@ contract MixinWrapperFunctions is
|
||||
uint256[6][] orderValues,
|
||||
uint256[] takerTokenFillAmounts,
|
||||
bytes[] signatures)
|
||||
external
|
||||
public
|
||||
{
|
||||
for (uint256 i = 0; i < orderAddresses.length; i++) {
|
||||
fillOrder(
|
||||
@ -188,7 +188,7 @@ contract MixinWrapperFunctions is
|
||||
uint[6][] orderValues,
|
||||
uint[] takerTokenFillAmounts,
|
||||
bytes[] signatures)
|
||||
external
|
||||
public
|
||||
{
|
||||
for (uint256 i = 0; i < orderAddresses.length; i++) {
|
||||
fillOrKillOrder(
|
||||
@ -203,14 +203,14 @@ contract MixinWrapperFunctions is
|
||||
/// @dev Fills an order with specified parameters and ECDSA signature. Returns false if the transaction would otherwise revert.
|
||||
/// @param orderAddresses Array of order's maker, taker, makerToken, takerToken, and feeRecipient.
|
||||
/// @param orderValues Array of order's makerTokenAmount, takerTokenAmount, makerFee, takerFee, expirationTimestampInSec, and salt.
|
||||
/// @param takerTokenFillAmount Desired amount of takerToken to fill.
|
||||
/// @param takerTokenFillAmounts Array of desired amounts of takerToken to fill in orders.
|
||||
/// @param signatures Maker's signatures of the orders.
|
||||
function batchFillOrdersNoThrow(
|
||||
address[5][] orderAddresses,
|
||||
uint[6][] orderValues,
|
||||
uint[] takerTokenFillAmounts,
|
||||
bytes[] signatures)
|
||||
external
|
||||
public
|
||||
{
|
||||
for (uint256 i = 0; i < orderAddresses.length; i++) {
|
||||
fillOrderNoThrow(
|
||||
@ -233,7 +233,7 @@ contract MixinWrapperFunctions is
|
||||
uint256[6][] orderValues,
|
||||
uint256 takerTokenFillAmount,
|
||||
bytes[] signatures)
|
||||
external
|
||||
public
|
||||
returns (uint256 totalTakerTokenFilledAmount)
|
||||
{
|
||||
for (uint256 i = 0; i < orderAddresses.length; i++) {
|
||||
@ -260,7 +260,7 @@ contract MixinWrapperFunctions is
|
||||
uint256[6][] orderValues,
|
||||
uint256 takerTokenFillAmount,
|
||||
bytes[] signatures)
|
||||
external
|
||||
public
|
||||
returns (uint256 totalTakerTokenFilledAmount)
|
||||
{
|
||||
for (uint256 i = 0; i < orderAddresses.length; i++) {
|
||||
|
@ -1,9 +1,9 @@
|
||||
pragma solidity ^0.4.19;
|
||||
|
||||
import { Exchange } from "../../protocol/Exchange/Exchange.sol";
|
||||
import { IExchange_v1 as Exchange } from "../Exchange/IExchange_v1.sol";
|
||||
import { EtherDelta } from "../EtherDelta/EtherDelta.sol";
|
||||
import { Ownable } from "../../utils/Ownable/Ownable.sol";
|
||||
import { Token } from "../../tokens/Token/Token.sol";
|
||||
import { Ownable_v1 as Ownable } from "../Ownable/Ownable_v1.sol";
|
||||
import { IToken_v1 as Token } from "../Token/IToken_v1.sol";
|
||||
|
||||
/// @title Arbitrage - Facilitates atomic arbitrage of ERC20 tokens between EtherDelta and 0x Exchange contract.
|
||||
/// @author Leonid Logvinov - <leo@0xProject.com>
|
@ -689,7 +689,7 @@ describe('Exchange', () => {
|
||||
const res = await exWrapper.fillOrderAsync(signedOrder, taker);
|
||||
expect(res.logs).to.have.length(1);
|
||||
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
|
||||
const errCode = log.args.errorId.toNumber();
|
||||
const errCode = log.args.errorId;
|
||||
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED);
|
||||
});
|
||||
|
||||
@ -700,7 +700,7 @@ describe('Exchange', () => {
|
||||
const res = await exWrapper.fillOrderAsync(signedOrder, taker);
|
||||
expect(res.logs).to.have.length(1);
|
||||
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
|
||||
const errCode = log.args.errorId.toNumber();
|
||||
const errCode = log.args.errorId;
|
||||
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED);
|
||||
});
|
||||
});
|
||||
@ -827,7 +827,7 @@ describe('Exchange', () => {
|
||||
const res = await exWrapper.cancelOrderAsync(signedOrder, maker);
|
||||
expect(res.logs).to.have.length(1);
|
||||
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
|
||||
const errCode = log.args.errorId.toNumber();
|
||||
const errCode = log.args.errorId;
|
||||
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED);
|
||||
});
|
||||
|
||||
@ -839,7 +839,7 @@ describe('Exchange', () => {
|
||||
const res = await exWrapper.cancelOrderAsync(signedOrder, maker);
|
||||
expect(res.logs).to.have.length(1);
|
||||
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
|
||||
const errCode = log.args.errorId.toNumber();
|
||||
const errCode = log.args.errorId;
|
||||
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED);
|
||||
});
|
||||
});
|
||||
|
@ -9,12 +9,12 @@ import * as Web3 from 'web3';
|
||||
import { ArbitrageContract } from '../../src/contract_wrappers/generated/arbitrage';
|
||||
import { EtherDeltaContract } from '../../src/contract_wrappers/generated/ether_delta';
|
||||
import { ExchangeContract } from '../../src/contract_wrappers/generated/exchange';
|
||||
import { Balances } from '../../util/balances';
|
||||
import { constants } from '../../util/constants';
|
||||
import { crypto } from '../../util/crypto';
|
||||
import { ExchangeWrapper } from '../../util/exchange_wrapper';
|
||||
import { OrderFactory } from '../../util/order_factory';
|
||||
import { BalancesByOwner, ContractName, ExchangeContractErrs } from '../../util/types';
|
||||
import { Balances } from '../../src/utils/balances';
|
||||
import { constants } from '../../src/utils/constants';
|
||||
import { crypto } from '../../src/utils/crypto';
|
||||
import { ExchangeWrapper } from '../../src/utils/exchange_wrapper';
|
||||
import { OrderFactory } from '../../src/utils/order_factory';
|
||||
import { BalancesByOwner, ContractName, ExchangeContractErrs } from '../../src/utils/types';
|
||||
import { chaiSetup } from '../utils/chai_setup';
|
||||
import { deployer } from '../utils/deployer';
|
||||
import { provider, web3Wrapper } from '../utils/web3_wrapper';
|
||||
|
Loading…
x
Reference in New Issue
Block a user