-
Notifications
You must be signed in to change notification settings - Fork 13
/
truffle.d.ts
74 lines (65 loc) · 2.43 KB
/
truffle.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
declare type _contractTest = (accounts: string[]) => void;
declare let contract: ContractFunction;
interface ContractFunction {
(title: string, fn: (this: any) => void): any;
(title: string): any;
only: any;
skip: any;
}
declare interface TransactionMeta {
from: string;
}
declare interface Contract<T> {
"new"(storage: any): Promise<T>;
deployed(): Promise<T>;
at(address: string): T;
address: string;
}
declare interface Artifacts {
require(name: "MetadataStorage"): Contract<MetadataStorageContractInstance>;
require(name: "BakerRegistry"): Contract<BakerRegistryContractInstance>;
require(name: "TokenFA12"): Contract<TokenContractInstance>;
require(name: "TokenFA2"): Contract<TokenContractInstance>;
require(name: "TestFactoryFA12"): Contract<FactoryContractInstance>;
require(name: "TestFactoryFA2"): Contract<FactoryContractInstance>;
require(name: "DexFA12"): Contract<DexContractInstance>;
require(name: "DexFA2"): Contract<DexContractInstance>;
require(name: "TTDex"): Contract<DexContractInstance>;
require(name: "TTDexFA12"): Contract<DexContractInstance>;
}
declare interface TokenContractInstance {
address: string;
transfer(sender: string, receiver: string, amount: number): any;
approve(spender: string, amount: number): any;
getBalance(owner: string, contract: any): any;
getAllowance(owner: string, spender: string, contract: any): any;
getTotalSupply(unit: any, contract: any): any;
}
declare interface MetadataStorageContractInstance {
address: string;
update_storage(storage: any): any;
update_owners(amount: boolean, spender: string): any;
get_metadata(contract: any): any;
}
declare interface BakerRegistryContractInstance {
address: string;
validate(baker: string): any;
}
declare interface FactoryContractInstance {
address: string;
launchExchange(tokenAddress: string, amount: number): any;
setDexFunction(index: number, func: any): any;
setTokenFunction(index: number, func: any): any;
}
declare interface DexContractInstance {
address: string;
transfer(sender: string, receiver: string, amount: number): any;
approve(spender: string, amount: number): any;
getBalance(owner: string, contract: any): any;
getAllowance(owner: string, spender: string, contract: any): any;
getTotalSupply(unit: any, contract: any): any;
use(index: number, funcName: string, ...args: any[]): any;
default(unit: any): any;
}
declare var artifacts: Artifacts;
declare var tezos: any;