Documentation Index
Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
Use this file to discover all available pages before exploring further.
function resolveAddress(target): string | Promise<string>
Resolves to an address for the target, which may be any supported address type, an
Addressable or a Promise which resolves to an address.
Parameters
| Parameter | Type | Description |
|---|
target | AddressLike | The target to resolve to an address. |
Returns
string | Promise<string>
The resolved address.
Example
addr = '0x6B175474E89094C44Da98b954EedeAC495271d0F';
// Addresses are return synchronously
resolveAddress(addr, provider);
// Address promises are resolved asynchronously
resolveAddress(Promise.resolve(addr));
// Addressable objects are resolved asynchronously
contract = new Contract(addr, []);
resolveAddress(contract, provider);
Source
address/checks.ts:87