Skip to content

Commit

Permalink
fixes for integration tests and deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
nuevoalex committed Jul 19, 2018
1 parent 4b9174f commit bd5a225
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 3 deletions.
2 changes: 1 addition & 1 deletion source/contracts/external/OrdersFinder.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import 'reporting/IMarket.sol';
contract OrdersFinder {
IOrders public orders;

function OrdersFinder(IOrders _orders) {
function OrdersFinder(IOrders _orders) public {
orders = _orders;
}

Expand Down
2 changes: 1 addition & 1 deletion source/libraries/ContractDeployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { CompilerOutput } from "solc";
import { Abi, AbiFunction } from 'ethereum';
import { DeployerConfiguration } from './DeployerConfiguration';
import { Connector } from './Connector';
import { Augur, ContractFactory, Controller, Controlled, Universe, ReputationToken, LegacyReputationToken, TimeControlled, OrdersFinder } from './ContractInterfaces';
import { Augur, ContractFactory, Controller, Controlled, Universe, ReputationToken, LegacyReputationToken, TimeControlled } from './ContractInterfaces';
import { NetworkConfiguration } from './NetworkConfiguration';
import { AccountManager } from './AccountManager';
import { Contracts, Contract } from './Contracts';
Expand Down
70 changes: 70 additions & 0 deletions source/libraries/ContractInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,76 @@
}


export class OrdersFinder extends Contract {
public constructor(connector: Connector, accountManager: AccountManager, address: string, defaultGasPrice: BN) {
super(connector, accountManager, address, defaultGasPrice);
}

public getExistingOrders5_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders5","outputs":[{"name":"_results","type":"bytes32[5]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public getExistingOrders20_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders20","outputs":[{"name":"_results","type":"bytes32[20]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public orders_ = async( options?: { sender?: string }): Promise<string> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[],"name":"orders","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [], options.sender);
return <string>result[0];
}

public getExistingOrders1000_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders1000","outputs":[{"name":"_results","type":"bytes32[1000]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public getExistingOrders50_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders50","outputs":[{"name":"_results","type":"bytes32[50]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public getExistingOrders500_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders500","outputs":[{"name":"_results","type":"bytes32[500]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public getExistingOrders200_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders200","outputs":[{"name":"_results","type":"bytes32[200]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public getExistingOrders100_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders100","outputs":[{"name":"_results","type":"bytes32[100]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}

public getExistingOrders10_ = async(type: BN, market: string, outcome: BN, options?: { sender?: string }): Promise<Array<string>> => {
options = options || {};
const abi: AbiFunction = {"constant":true,"inputs":[{"name":"_type","type":"uint8"},{"name":"_market","type":"address"},{"name":"_outcome","type":"uint256"}],"name":"getExistingOrders10","outputs":[{"name":"_results","type":"bytes32[10]"}],"payable":false,"stateMutability":"view","type":"function"};
const result = await this.localCall(abi, [type, market, outcome], options.sender);
return <Array<string>>result[0];
}
}


export class DisputeCrowdsourcerFactory extends Contract {
public constructor(connector: Connector, accountManager: AccountManager, address: string, defaultGasPrice: BN) {
super(connector, accountManager, address, defaultGasPrice);
Expand Down
8 changes: 8 additions & 0 deletions source/libraries/ContractInterfacesGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ ${contractMethods.join("\n\n")}
case 'uint256[]': {
return 'Array<BN>';
}
case 'bytes32[5]':
case 'bytes32[10]':
case 'bytes32[20]':
case 'bytes32[50]':
case 'bytes32[100]':
case 'bytes32[200]':
case 'bytes32[500]':
case 'bytes32[1000]':
case 'bytes32[]': {
return 'Array<string>';
}
Expand Down
2 changes: 1 addition & 1 deletion typings/ethereum/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type Primitive = 'uint8' | 'uint64' | 'uint256' | 'bool' | 'string' | 'address' | 'bytes20' | 'bytes32' | 'bytes' | 'int256' | 'address[]' | 'uint256[]' | 'bytes32[]';
export type Primitive = 'uint8' | 'uint64' | 'uint256' | 'bool' | 'string' | 'address' | 'bytes20' | 'bytes32' | 'bytes' | 'int256' | 'address[]' | 'uint256[]' | 'bytes32[]' | 'bytes32[5]' | 'bytes32[10]' | 'bytes32[20]' | 'bytes32[50]' | 'bytes32[100]' | 'bytes32[200]' | 'bytes32[500]' | 'bytes32[1000]';

export interface AbiParameter {
name: string,
Expand Down

0 comments on commit bd5a225

Please sign in to comment.