@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
190 lines (163 loc) • 4.66 kB
TypeScript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import BN from "bn.js";
import { ContractOptions } from "web3-eth-contract";
import { EventLog } from "web3-core";
import { EventEmitter } from "events";
import {
Callback,
PayableTransactionObject,
NonPayableTransactionObject,
BlockType,
ContractEventLog,
BaseContract,
} from "./types";
interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type AddressAdded = ContractEventLog<{
_addr: string;
0: string;
}>;
export type AddressRemoved = ContractEventLog<{
_addr: string;
0: string;
}>;
export type DelegatedStakeUpdated = ContractEventLog<{
_addr: string;
_stake: string;
0: string;
1: string;
}>;
export type OwnershipTransferred = ContractEventLog<{
previousOwner: string;
newOwner: string;
0: string;
1: string;
}>;
export type StakeDecreased = ContractEventLog<{
_addr: string;
_stake: string;
0: string;
1: string;
}>;
export type StakeIncreased = ContractEventLog<{
_addr: string;
_stake: string;
0: string;
1: string;
}>;
export interface AddressStorageStakes extends BaseContract {
constructor(
jsonInterface: any[],
address?: string,
options?: ContractOptions
): AddressStorageStakes;
clone(): AddressStorageStakes;
methods: {
addrList(arg0: number | string | BN): NonPayableTransactionObject<string>;
addrStake(
arg0: string
): NonPayableTransactionObject<{
listIndex: string;
stake: string;
delegatedStake: string;
0: string;
1: string;
2: string;
}>;
owner(): NonPayableTransactionObject<string>;
renounceOwnership(): NonPayableTransactionObject<void>;
transferOwnership(newOwner: string): NonPayableTransactionObject<void>;
add(
_addr: string,
_stake: number | string | BN
): NonPayableTransactionObject<boolean>;
sub(
_addr: string,
_stake: number | string | BN
): NonPayableTransactionObject<boolean>;
setDelegated(
_addr: string,
_delegatedStake: number | string | BN
): NonPayableTransactionObject<boolean>;
size(): NonPayableTransactionObject<string>;
getAddresses(): NonPayableTransactionObject<string[]>;
contains(_addr: string): NonPayableTransactionObject<boolean>;
};
events: {
AddressAdded(cb?: Callback<AddressAdded>): EventEmitter;
AddressAdded(
options?: EventOptions,
cb?: Callback<AddressAdded>
): EventEmitter;
AddressRemoved(cb?: Callback<AddressRemoved>): EventEmitter;
AddressRemoved(
options?: EventOptions,
cb?: Callback<AddressRemoved>
): EventEmitter;
DelegatedStakeUpdated(cb?: Callback<DelegatedStakeUpdated>): EventEmitter;
DelegatedStakeUpdated(
options?: EventOptions,
cb?: Callback<DelegatedStakeUpdated>
): EventEmitter;
OwnershipTransferred(cb?: Callback<OwnershipTransferred>): EventEmitter;
OwnershipTransferred(
options?: EventOptions,
cb?: Callback<OwnershipTransferred>
): EventEmitter;
StakeDecreased(cb?: Callback<StakeDecreased>): EventEmitter;
StakeDecreased(
options?: EventOptions,
cb?: Callback<StakeDecreased>
): EventEmitter;
StakeIncreased(cb?: Callback<StakeIncreased>): EventEmitter;
StakeIncreased(
options?: EventOptions,
cb?: Callback<StakeIncreased>
): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback<EventLog>): EventEmitter;
};
once(event: "AddressAdded", cb: Callback<AddressAdded>): void;
once(
event: "AddressAdded",
options: EventOptions,
cb: Callback<AddressAdded>
): void;
once(event: "AddressRemoved", cb: Callback<AddressRemoved>): void;
once(
event: "AddressRemoved",
options: EventOptions,
cb: Callback<AddressRemoved>
): void;
once(
event: "DelegatedStakeUpdated",
cb: Callback<DelegatedStakeUpdated>
): void;
once(
event: "DelegatedStakeUpdated",
options: EventOptions,
cb: Callback<DelegatedStakeUpdated>
): void;
once(event: "OwnershipTransferred", cb: Callback<OwnershipTransferred>): void;
once(
event: "OwnershipTransferred",
options: EventOptions,
cb: Callback<OwnershipTransferred>
): void;
once(event: "StakeDecreased", cb: Callback<StakeDecreased>): void;
once(
event: "StakeDecreased",
options: EventOptions,
cb: Callback<StakeDecreased>
): void;
once(event: "StakeIncreased", cb: Callback<StakeIncreased>): void;
once(
event: "StakeIncreased",
options: EventOptions,
cb: Callback<StakeIncreased>
): void;
}