///
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, PayableTransactionObject, NonPayableTransactionObject, BlockType, ContractEventLog, BaseContract } from "./types";
export interface EventOptions {
filter?: object;
fromBlock?: BlockType;
topics?: string[];
}
export type AddedOwner = ContractEventLog<{
owner: string;
0: string;
}>;
export type ApproveHash = ContractEventLog<{
approvedHash: string;
owner: string;
0: string;
1: string;
}>;
export type ChangedFallbackHandler = ContractEventLog<{
handler: string;
0: string;
}>;
export type ChangedGuard = ContractEventLog<{
guard: string;
0: string;
}>;
export type ChangedThreshold = ContractEventLog<{
threshold: string;
0: string;
}>;
export type DisabledModule = ContractEventLog<{
module: string;
0: string;
}>;
export type EnabledModule = ContractEventLog<{
module: string;
0: string;
}>;
export type ExecutionFailure = ContractEventLog<{
txHash: string;
payment: string;
0: string;
1: string;
}>;
export type ExecutionFromModuleFailure = ContractEventLog<{
module: string;
0: string;
}>;
export type ExecutionFromModuleSuccess = ContractEventLog<{
module: string;
0: string;
}>;
export type ExecutionSuccess = ContractEventLog<{
txHash: string;
payment: string;
0: string;
1: string;
}>;
export type RemovedOwner = ContractEventLog<{
owner: string;
0: string;
}>;
export type SafeReceived = ContractEventLog<{
sender: string;
value: string;
0: string;
1: string;
}>;
export type SafeSetup = ContractEventLog<{
initiator: string;
owners: string[];
threshold: string;
initializer: string;
fallbackHandler: string;
0: string;
1: string[];
2: string;
3: string;
4: string;
}>;
export type SignMsg = ContractEventLog<{
msgHash: string;
0: string;
}>;
export interface Safe extends BaseContract {
constructor(jsonInterface: any[], address?: string, options?: ContractOptions): Safe;
clone(): Safe;
methods: {
VERSION(): NonPayableTransactionObject;
addOwnerWithThreshold(owner: string, _threshold: number | string | BN): NonPayableTransactionObject;
approveHash(hashToApprove: string | number[]): NonPayableTransactionObject;
approvedHashes(arg0: string, arg1: string | number[]): NonPayableTransactionObject;
changeThreshold(_threshold: number | string | BN): NonPayableTransactionObject;
checkNSignatures(dataHash: string | number[], data: string | number[], signatures: string | number[], requiredSignatures: number | string | BN): NonPayableTransactionObject;
checkSignatures(dataHash: string | number[], data: string | number[], signatures: string | number[]): NonPayableTransactionObject;
disableModule(prevModule: string, module: string): NonPayableTransactionObject;
domainSeparator(): NonPayableTransactionObject;
enableModule(module: string): NonPayableTransactionObject;
encodeTransactionData(to: string, value: number | string | BN, data: string | number[], operation: number | string | BN, safeTxGas: number | string | BN, baseGas: number | string | BN, gasPrice: number | string | BN, gasToken: string, refundReceiver: string, _nonce: number | string | BN): NonPayableTransactionObject;
execTransaction(to: string, value: number | string | BN, data: string | number[], operation: number | string | BN, safeTxGas: number | string | BN, baseGas: number | string | BN, gasPrice: number | string | BN, gasToken: string, refundReceiver: string, signatures: string | number[]): PayableTransactionObject;
execTransactionFromModule(to: string, value: number | string | BN, data: string | number[], operation: number | string | BN): NonPayableTransactionObject;
execTransactionFromModuleReturnData(to: string, value: number | string | BN, data: string | number[], operation: number | string | BN): NonPayableTransactionObject<{
success: boolean;
returnData: string;
0: boolean;
1: string;
}>;
getChainId(): NonPayableTransactionObject;
getModulesPaginated(start: string, pageSize: number | string | BN): NonPayableTransactionObject<{
array: string[];
next: string;
0: string[];
1: string;
}>;
getOwners(): NonPayableTransactionObject;
getStorageAt(offset: number | string | BN, length: number | string | BN): NonPayableTransactionObject;
getThreshold(): NonPayableTransactionObject;
getTransactionHash(to: string, value: number | string | BN, data: string | number[], operation: number | string | BN, safeTxGas: number | string | BN, baseGas: number | string | BN, gasPrice: number | string | BN, gasToken: string, refundReceiver: string, _nonce: number | string | BN): NonPayableTransactionObject;
isModuleEnabled(module: string): NonPayableTransactionObject;
isOwner(owner: string): NonPayableTransactionObject;
nonce(): NonPayableTransactionObject;
removeOwner(prevOwner: string, owner: string, _threshold: number | string | BN): NonPayableTransactionObject;
setFallbackHandler(handler: string): NonPayableTransactionObject;
setGuard(guard: string): NonPayableTransactionObject;
setup(_owners: string[], _threshold: number | string | BN, to: string, data: string | number[], fallbackHandler: string, paymentToken: string, payment: number | string | BN, paymentReceiver: string): NonPayableTransactionObject;
signedMessages(arg0: string | number[]): NonPayableTransactionObject;
simulateAndRevert(targetContract: string, calldataPayload: string | number[]): NonPayableTransactionObject;
swapOwner(prevOwner: string, oldOwner: string, newOwner: string): NonPayableTransactionObject;
};
events: {
AddedOwner(cb?: Callback): EventEmitter;
AddedOwner(options?: EventOptions, cb?: Callback): EventEmitter;
ApproveHash(cb?: Callback): EventEmitter;
ApproveHash(options?: EventOptions, cb?: Callback): EventEmitter;
ChangedFallbackHandler(cb?: Callback): EventEmitter;
ChangedFallbackHandler(options?: EventOptions, cb?: Callback): EventEmitter;
ChangedGuard(cb?: Callback): EventEmitter;
ChangedGuard(options?: EventOptions, cb?: Callback): EventEmitter;
ChangedThreshold(cb?: Callback): EventEmitter;
ChangedThreshold(options?: EventOptions, cb?: Callback): EventEmitter;
DisabledModule(cb?: Callback): EventEmitter;
DisabledModule(options?: EventOptions, cb?: Callback): EventEmitter;
EnabledModule(cb?: Callback): EventEmitter;
EnabledModule(options?: EventOptions, cb?: Callback): EventEmitter;
ExecutionFailure(cb?: Callback): EventEmitter;
ExecutionFailure(options?: EventOptions, cb?: Callback): EventEmitter;
ExecutionFromModuleFailure(cb?: Callback): EventEmitter;
ExecutionFromModuleFailure(options?: EventOptions, cb?: Callback): EventEmitter;
ExecutionFromModuleSuccess(cb?: Callback): EventEmitter;
ExecutionFromModuleSuccess(options?: EventOptions, cb?: Callback): EventEmitter;
ExecutionSuccess(cb?: Callback): EventEmitter;
ExecutionSuccess(options?: EventOptions, cb?: Callback): EventEmitter;
RemovedOwner(cb?: Callback): EventEmitter;
RemovedOwner(options?: EventOptions, cb?: Callback): EventEmitter;
SafeReceived(cb?: Callback): EventEmitter;
SafeReceived(options?: EventOptions, cb?: Callback): EventEmitter;
SafeSetup(cb?: Callback): EventEmitter;
SafeSetup(options?: EventOptions, cb?: Callback): EventEmitter;
SignMsg(cb?: Callback): EventEmitter;
SignMsg(options?: EventOptions, cb?: Callback): EventEmitter;
allEvents(options?: EventOptions, cb?: Callback): EventEmitter;
};
once(event: "AddedOwner", cb: Callback): void;
once(event: "AddedOwner", options: EventOptions, cb: Callback): void;
once(event: "ApproveHash", cb: Callback): void;
once(event: "ApproveHash", options: EventOptions, cb: Callback): void;
once(event: "ChangedFallbackHandler", cb: Callback): void;
once(event: "ChangedFallbackHandler", options: EventOptions, cb: Callback): void;
once(event: "ChangedGuard", cb: Callback): void;
once(event: "ChangedGuard", options: EventOptions, cb: Callback): void;
once(event: "ChangedThreshold", cb: Callback): void;
once(event: "ChangedThreshold", options: EventOptions, cb: Callback): void;
once(event: "DisabledModule", cb: Callback): void;
once(event: "DisabledModule", options: EventOptions, cb: Callback): void;
once(event: "EnabledModule", cb: Callback): void;
once(event: "EnabledModule", options: EventOptions, cb: Callback): void;
once(event: "ExecutionFailure", cb: Callback): void;
once(event: "ExecutionFailure", options: EventOptions, cb: Callback): void;
once(event: "ExecutionFromModuleFailure", cb: Callback): void;
once(event: "ExecutionFromModuleFailure", options: EventOptions, cb: Callback): void;
once(event: "ExecutionFromModuleSuccess", cb: Callback): void;
once(event: "ExecutionFromModuleSuccess", options: EventOptions, cb: Callback): void;
once(event: "ExecutionSuccess", cb: Callback): void;
once(event: "ExecutionSuccess", options: EventOptions, cb: Callback): void;
once(event: "RemovedOwner", cb: Callback): void;
once(event: "RemovedOwner", options: EventOptions, cb: Callback): void;
once(event: "SafeReceived", cb: Callback): void;
once(event: "SafeReceived", options: EventOptions, cb: Callback): void;
once(event: "SafeSetup", cb: Callback): void;
once(event: "SafeSetup", options: EventOptions, cb: Callback): void;
once(event: "SignMsg", cb: Callback): void;
once(event: "SignMsg", options: EventOptions, cb: Callback): void;
}