Skip to content

Commit

Permalink
chore(web3):update web3 to 1.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime committed Oct 30, 2019
1 parent a4787fe commit 0dac44a
Show file tree
Hide file tree
Showing 15 changed files with 1,042 additions and 237 deletions.
35 changes: 24 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,18 @@
},
"main": "",
"scripts": {
"generate": "./node_modules/.bin/typechain --target=web3-1.0.0 './abi/*.json' --outDir=./types",
"generate": "./node_modules/.bin/typechain --target=web3-v1.2.2/dist './abi/*.json' --outDir=./types",
"minify": "node ./minify.js",
"build": "npm run generate && npm run minify"
},
"author": "",
"license": "ISC",
"devDependencies": {
"typechain": "^0.3.21",
"web3": "^1.2.2"
"typechain": "1.0.3",
"web3": "1.2.2"
},
"dependencies": {
"bn": "^1.0.5"
"bn": "1.0.5",
"lodash": "4.17.15"
}
}
42 changes: 31 additions & 11 deletions types/Aria.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/* tslint:disable */

import BN from "bn.js";
import {Contract, ContractOptions } from "web3-eth-contract";

import {TransactionObject} from "./types";
import { Contract, ContractOptions, EventOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { TransactionObject, ContractEvent, Callback } from "./types";

export class Aria extends Contract {
constructor(
Expand All @@ -18,28 +18,48 @@ export class Aria extends Contract {
_interfaceID: string | number[]
): TransactionObject<boolean>;

balanceOf(_owner: string): TransactionObject<BN>;

allowance(_owner: string, _spender: string): TransactionObject<BN>;
name(): TransactionObject<string>;

approve(
_spender: string,
_value: number | string
): TransactionObject<boolean>;

totalSupply(): TransactionObject<BN>;

transferFrom(
_from: string,
_to: string,
_value: number | string
): TransactionObject<boolean>;

transfer(_to: string, _value: number | string): TransactionObject<boolean>;

name(): TransactionObject<string>;
totalSupply(): TransactionObject<BN>;
decimals(): TransactionObject<BN>;

balanceOf(_owner: string): TransactionObject<BN>;

symbol(): TransactionObject<string>;

};
transfer(_to: string, _value: number | string): TransactionObject<boolean>;

allowance(_owner: string, _spender: string): TransactionObject<BN>;
};
events: {
Transfer: ContractEvent<{
_from: string;
_to: string;
_value: BN;
0: string;
1: string;
2: BN;
}>;
Approval: ContractEvent<{
_owner: string;
_spender: string;
_value: BN;
0: string;
1: string;
2: BN;
}>;
allEvents: (options?: EventOptions, cb?: Callback<EventLog>) => any;
};
}
38 changes: 23 additions & 15 deletions types/ArianeeCreditHistory.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@
/* tslint:disable */

import BN from "bn.js";
import Contract, { contractOptions } from "web3/eth/contract";
import { EventLog, Callback, EventEmitter } from "web3/types";
import { TransactionObject, BlockType } from "web3/eth/types";
import { ContractEvent } from "./types";

interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
import { Contract, ContractOptions, EventOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { TransactionObject, ContractEvent, Callback } from "./types";

export class ArianeeCreditHistory extends Contract {
constructor(
jsonInterface: any[],
address?: string,
options?: contractOptions
options?: ContractOptions
);
clone(): ArianeeCreditHistory;
methods: {
Expand All @@ -36,6 +29,8 @@ export class ArianeeCreditHistory extends Contract {

userIndex(_spender: string, _type: number | string): TransactionObject<BN>;

owner(): TransactionObject<string>;

addCreditHistory(
_spender: string,
_price: number | string,
Expand All @@ -53,10 +48,23 @@ export class ArianeeCreditHistory extends Contract {
_quantity: number | string
): TransactionObject<BN>;

transferOwnership(_newOwner: string): TransactionObject<void>;

owner(): TransactionObject<string>;
arianeeStoreAddress(): TransactionObject<string>;
};

transferOwnership(_newOwner: string): TransactionObject<void>;
};
events: {
SetAddress: ContractEvent<{
_addressType: string;
_newAddress: string;
0: string;
1: string;
}>;
OwnershipTransferred: ContractEvent<{
previousOwner: string;
newOwner: string;
0: string;
1: string;
}>;
allEvents: (options?: EventOptions, cb?: Callback<EventLog>) => any;
};
}
102 changes: 73 additions & 29 deletions types/ArianeeEvent.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
/* tslint:disable */

import BN from "bn.js";
import {Contract, ContractOptions } from "web3-eth-contract";
import { TransactionObject } from "./types";
import { Contract, ContractOptions, EventOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { TransactionObject, ContractEvent, Callback } from "./types";

export class ArianeeEvent extends Contract {
constructor(
Expand All @@ -20,30 +21,6 @@ export class ArianeeEvent extends Contract {
arg1: number | string
): TransactionObject<BN>;

pendingEventsLength(_tokenId: number | string): TransactionObject<BN>;

getEvent(
_eventId: number | string
): TransactionObject<{
0: string;
1: string;
2: string;
3: BN;
}>;

eventsLength(_tokenId: number | string): TransactionObject<BN>;

eventIdToToken(arg0: number | string): TransactionObject<BN>;

idToTokenEventIndex(arg0: number | string): TransactionObject<BN>;

pendingEvents(
arg0: number | string,
arg1: number | string
): TransactionObject<BN>;

rewards(arg0: number | string): TransactionObject<BN>;

create(
_eventId: number | string,
_tokenId: number | string,
Expand All @@ -53,6 +30,8 @@ export class ArianeeEvent extends Contract {
_provider: string
): TransactionObject<void>;

pendingEventsLength(_tokenId: number | string): TransactionObject<BN>;

unpause(): TransactionObject<void>;

updateDestroyRequest(
Expand All @@ -62,24 +41,89 @@ export class ArianeeEvent extends Contract {

accept(_eventId: number | string, _sender: string): TransactionObject<BN>;

paused(): TransactionObject<boolean>;

setStoreAddress(_storeAddress: string): TransactionObject<void>;

getEvent(
_eventId: number | string
): TransactionObject<{
0: string;
1: string;
2: string;
3: BN;
}>;

eventsLength(_tokenId: number | string): TransactionObject<BN>;

pause(): TransactionObject<void>;

owner(): TransactionObject<string>;

destroy(_eventId: number | string): TransactionObject<void>;

eventIdToToken(arg0: number | string): TransactionObject<BN>;

idToTokenEventIndex(arg0: number | string): TransactionObject<BN>;

validDestroyRequest(_eventId: number | string): TransactionObject<void>;

refuse(_eventId: number | string, _sender: string): TransactionObject<BN>;

pendingEvents(
arg0: number | string,
arg1: number | string
): TransactionObject<BN>;

updateEventDestroyDelay(
_newDelay: number | string
): TransactionObject<void>;

transferOwnership(_newOwner: string): TransactionObject<void>;

paused(): TransactionObject<boolean>;
owner(): TransactionObject<string>;
rewards(arg0: number | string): TransactionObject<BN>;
};
events: {
EventCreated: ContractEvent<{
_tokenId: BN;
_eventId: BN;
_imprint: string;
_uri: string;
_provider: string;
0: BN;
1: BN;
2: string;
3: string;
4: string;
}>;
EventAccepted: ContractEvent<{
_eventId: BN;
_sender: string;
0: BN;
1: string;
}>;
EventRefused: ContractEvent<{
_eventId: BN;
_sender: string;
0: BN;
1: string;
}>;
EventDestroyed: ContractEvent<BN>;
DestroyRequestUpdated: ContractEvent<{
_eventId: BN;
_active: boolean;
0: BN;
1: boolean;
}>;
EventDestroyDelayUpdated: ContractEvent<BN>;
Pause: ContractEvent<{}>;
Unpause: ContractEvent<{}>;
OwnershipTransferred: ContractEvent<{
previousOwner: string;
newOwner: string;
0: string;
1: string;
}>;
allEvents: (options?: EventOptions, cb?: Callback<EventLog>) => any;
};

}
Loading

0 comments on commit 0dac44a

Please sign in to comment.