@wttp/site
Version:
Web3 Transfer Protocol (WTTP) - Site Contracts and deployment tools
27 lines • 1.3 kB
TypeScript
import { Contract, Provider, Signer } from "ethers";
export declare function getChainSymbol(provider?: Provider): Promise<string>;
export declare function getChainSymbolFromChainId(chainId: number): string;
/**
* Creates a properly typed WTTP site contract instance
* Using the ABI ensures TypeScript knows about all contract methods
*/
export declare function getWttpSite(wttpSiteAddress: string, provider?: Provider, signer?: Signer): Contract;
/**
* Waits for a transaction to be fully confirmed and ensures nonce is updated
* This is critical for Hardhat's automining to prevent nonce conflicts
*/
export declare function waitForTransactionWithNonceUpdate(txPromise: Promise<{
wait: (confirmations?: number) => Promise<any>;
}>, signer?: Signer, confirmations?: number): Promise<any>;
/**
* Waits for a transaction to be fully confirmed
* This ensures the transaction is mined and the nonce is updated before proceeding
*/
export declare function waitForTransactionConfirmation(txPromise: Promise<{
wait: (confirmations?: number) => Promise<any>;
}>, confirmations?: number): Promise<any>;
/**
* Gets the current nonce for an address and ensures it's up to date
*/
export declare function getCurrentNonce(signer: Signer): Promise<number>;
//# sourceMappingURL=utils.d.ts.map