From 2f9f9caf3dc86391d6c6b74280bef04b873724f5 Mon Sep 17 00:00:00 2001 From: Oleg Date: Mon, 23 Sep 2024 12:15:54 +0100 Subject: [PATCH] Feat: add pubkey functions (#36) --- .gitignore | 1 + src/BTCDepositAddressDeriver.sol | 8 ++++++++ src/Deriver.sol | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 6e292f6..83c4244 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,5 @@ docs/ __pycache__ .vscode +.idea temp/ diff --git a/src/BTCDepositAddressDeriver.sol b/src/BTCDepositAddressDeriver.sol index 6e8ff61..ac4b75b 100644 --- a/src/BTCDepositAddressDeriver.sol +++ b/src/BTCDepositAddressDeriver.sol @@ -105,4 +105,12 @@ contract BTCDepositAddressDeriver { ethAddr ); } + + function getBtcAddress1() public view returns (string memory) { + return btcAddr1; + } + + function getBtcAddress2() public view returns (string memory) { + return btcAddr2; + } } diff --git a/src/Deriver.sol b/src/Deriver.sol index 17717f9..a82ed3e 100644 --- a/src/Deriver.sol +++ b/src/Deriver.sol @@ -84,7 +84,7 @@ library Deriver { bytes memory hrp, address ethAddr ) internal pure returns (string memory) { - (uint256 x, uint256 y) = getPubkeyFromAddress( + (uint256 x, uint256 _y) = getPubkeyFromAddress( p1x, p1y, p2x,