Skip to content

Commit

Permalink
feat: add getFeeRecipient function
Browse files Browse the repository at this point in the history
  • Loading branch information
Polybius93 committed Feb 5, 2025
1 parent ccee06d commit 364f078
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/functions/ethereum/ethereum-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,16 @@ export async function getRawVault(
}
}

export async function getFeeRecipient(dlcManagerContract: Contract): Promise<string> {
try {
const feeRecipient: string = await dlcManagerContract.btcFeeRecipient();
if (!feeRecipient) throw new EthereumError('Fee Recipient not found');
return feeRecipient;
} catch (error) {
throw new EthereumError(`Could not fetch Fee Recipient: ${error}`);
}
}

export async function setupVault(dlcManagerContract: Contract): Promise<any | undefined> {
try {
await dlcManagerContract.callStatic.setupVault();
Expand Down

0 comments on commit 364f078

Please sign in to comment.