Function getFeeHandlerAddress

  • Retrieves the fee handler address for the given domain ID and resource ID from the FeeHandlerRouter contract.

    Example

    const provider = new ethers.providers.JsonRpcProvider('http://localhost:8545');
    const feeRouterAddress = '0x1234...';
    const domainId = '1';
    const resourceId = '0x123ABCD...';

    getFeeHandlerAddress(provider, feeRouterAddress, domainId, resourceId)
    .then(feeHandlerAddress => {
    console.log('Fee Handler Address:', feeHandlerAddress);
    })
    .catch(error => {
    console.error('Error:', error);
    });

    Returns

    A promise that resolves to the fee handler address.

    Parameters

    • signerOrProvider: Signer | JsonRpcProvider

      The JSON RPC provider or signer object.

    • feeRouterAddress: string

      The address of the FeeHandlerRouter contract.

    • domainId: string

      The domain ID for which the fee handler address is to be fetched.

    • resourceId: string

      The resource ID for which the fee handler address is to be fetched.

    Returns Promise<string>

Generated using TypeDoc