evm-blockchain-tools
Version:
This is a collection of resuseable tools to support development for EVM-powered blockchains
30 lines (29 loc) • 1.88 kB
TypeScript
import { ethers } from "ethers";
import Safe from "@safe-global/safe-core-sdk";
import EthersAdapter from "@safe-global/safe-ethers-lib";
import { SafeTransactionDataPartial } from "@safe-global/safe-core-sdk-types";
import SafeServiceClient, { SafeMultisigTransactionListResponse } from "@safe-global/safe-service-client";
import { IWeb3Gateway, MultisigTxStatus } from "../common/interfaces";
export declare class MultisigService {
protected provider: IWeb3Gateway;
protected isInitialized: boolean;
protected adapter: EthersAdapter;
protected serviceClient: SafeServiceClient;
constructor(provider: IWeb3Gateway);
init(): Promise<void>;
protected ensureInit(): void;
getSafeByAddress(safeAddress: string): Promise<Safe>;
protected get serviceNetworkUrl(): "https://safe-transaction-mainnet.safe.global" | "https://safe-transaction-bsc.safe.global" | "https://safe-transaction-goerli.safe.global";
checkTxStatus(multisigAddress: string, internalHash: string): Promise<MultisigTxStatus>;
getTxByNonce(multisigAddress: string, nonce: number): Promise<SafeMultisigTransactionListResponse>;
getPendingTransactions(multisigAddress: string, endingNonce: number): Promise<SafeMultisigTransactionListResponse>;
protected proposeTx(multisigAddress: string, data: SafeTransactionDataPartial & {
sender: string;
signature: string;
origin: string;
contractTransactionHash: string;
}): Promise<void>;
getTransaction(hash: string): Promise<import("@safe-global/safe-core-sdk-types").SafeMultisigTransactionResponse>;
createTransactionData(toAddress: string, abi: ethers.utils.Interface, functionName: string, params: any[], transfersEth?: string): SafeTransactionDataPartial;
sendMultisigTx(multisigAddress: string, signerAddress: string, txData: SafeTransactionDataPartial): Promise<string>;
}