@orionprotocol/contracts
Version:
Orion Protocol contracts typings
105 lines (104 loc) • 5.13 kB
TypeScript
/// <reference types="node" />
import type BN from "bn.js";
import type { ContractOptions } from "web3-eth-contract";
import type { EventLog } from "web3-core";
import type { EventEmitter } from "events";
import type { Callback, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
export interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type RoleAdminChanged = ContractEventLog<{
role: string;
previousAdminRole: string;
newAdminRole: string;
0: string;
1: string;
2: string;
}>;
export type RoleGranted = ContractEventLog<{
role: string;
account: string;
sender: string;
0: string;
1: string;
2: string;
}>;
export type RoleRevoked = ContractEventLog<{
role: string;
account: string;
sender: string;
0: string;
1: string;
2: string;
}>;
export type TokensClaimed = ContractEventLog<{
receiver: string;
amount: string;
time: string;
0: string;
1: string;
2: string;
}>;
export type UserParticipated = ContractEventLog<{
participant: string;
amount: string;
time: string;
0: string;
1: string;
2: string;
}>;
export interface IDOCollector extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): IDOCollector;
clone(): IDOCollector;
methods: {
DEFAULT_ADMIN_ROLE(): NonPayableTransactionObject<string>;
ORNToken(): NonPayableTransactionObject<string>;
OWNER_ROLE(): NonPayableTransactionObject<string>;
addOwner(_owner: string): NonPayableTransactionObject<void>;
allocation(): NonPayableTransactionObject<string>;
claimTokens(): NonPayableTransactionObject<void>;
emergencyAssetWithdrawal(asset: string, wallet: string): NonPayableTransactionObject<void>;
finishTime(): NonPayableTransactionObject<string>;
getRoleAdmin(role: string | number[]): NonPayableTransactionObject<string>;
getRoleMember(role: string | number[], index: number | string | BN): NonPayableTransactionObject<string>;
getRoleMemberCount(role: string | number[]): NonPayableTransactionObject<string>;
grantRole(role: string | number[], account: string): NonPayableTransactionObject<void>;
hasRole(role: string | number[], account: string): NonPayableTransactionObject<boolean>;
idoToken(): NonPayableTransactionObject<string>;
initialize(): NonPayableTransactionObject<void>;
participate(amount: number | string | BN): NonPayableTransactionObject<void>;
renounceRole(role: string | number[], account: string): NonPayableTransactionObject<void>;
revokeRole(role: string | number[], account: string): NonPayableTransactionObject<void>;
setIDOParams(_ornToken: string, _idoToken: string, _startTime: number | string | BN, _finishTime: number | string | BN, _allocation: number | string | BN, _startClaimTime: number | string | BN): NonPayableTransactionObject<boolean>;
startClaimTime(): NonPayableTransactionObject<string>;
startTime(): NonPayableTransactionObject<string>;
supportsInterface(interfaceId: string | number[]): NonPayableTransactionObject<boolean>;
totalORN(): NonPayableTransactionObject<string>;
userBalances(arg0: string): NonPayableTransactionObject<string>;
};
events: {
RoleAdminChanged(cb?: Callback<RoleAdminChanged>): EventEmitter;
RoleAdminChanged(options?: EventOptions, cb?: Callback<RoleAdminChanged>): EventEmitter;
RoleGranted(cb?: Callback<RoleGranted>): EventEmitter;
RoleGranted(options?: EventOptions, cb?: Callback<RoleGranted>): EventEmitter;
RoleRevoked(cb?: Callback<RoleRevoked>): EventEmitter;
RoleRevoked(options?: EventOptions, cb?: Callback<RoleRevoked>): EventEmitter;
TokensClaimed(cb?: Callback<TokensClaimed>): EventEmitter;
TokensClaimed(options?: EventOptions, cb?: Callback<TokensClaimed>): EventEmitter;
UserParticipated(cb?: Callback<UserParticipated>): EventEmitter;
UserParticipated(options?: EventOptions, cb?: Callback<UserParticipated>): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "RoleAdminChanged", cb: Callback<RoleAdminChanged>): void;
once(event: "RoleAdminChanged", options: EventOptions, cb: Callback<RoleAdminChanged>): void;
once(event: "RoleGranted", cb: Callback<RoleGranted>): void;
once(event: "RoleGranted", options: EventOptions, cb: Callback<RoleGranted>): void;
once(event: "RoleRevoked", cb: Callback<RoleRevoked>): void;
once(event: "RoleRevoked", options: EventOptions, cb: Callback<RoleRevoked>): void;
once(event: "TokensClaimed", cb: Callback<TokensClaimed>): void;
once(event: "TokensClaimed", options: EventOptions, cb: Callback<TokensClaimed>): void;
once(event: "UserParticipated", cb: Callback<UserParticipated>): void;
once(event: "UserParticipated", options: EventOptions, cb: Callback<UserParticipated>): void;
}