Skip to content

Commit

Permalink
contract instead of library
Browse files Browse the repository at this point in the history
  • Loading branch information
dpiatkivskyi authored and bullet-tooth committed Jul 8, 2024
1 parent 78aae62 commit 694da6c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/BTCDepositAddressDeriver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ error CannotParseBtcAddress(

// Types of Bitcoin Network

contract BTCDepositAddressDeriver {
contract BTCDepositAddressDeriver is Bech32m, Deriver {

event SeedChanged(string btcAddr1, string btcAddr2, string hrp);

Expand Down
4 changes: 2 additions & 2 deletions src/Bech32m.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pragma solidity ^0.8.24;

error EncodingIsUnknown();

library Bech32m {
contract Bech32m {

enum BechEncoding {
// Used is SegWit v.0
Expand Down Expand Up @@ -617,7 +617,7 @@ library Bech32m {

// Decode a segwit address
function decodeSegwitAddress(
bytes calldata expectedHrp,
bytes memory expectedHrp,
bytes calldata addr
) public pure returns (uint8, bytes memory, DecodeError) {
(
Expand Down
2 changes: 1 addition & 1 deletion src/Deriver.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {EllipticCurve} from "../lib/elliptic-curve-solidity/contracts/EllipticCu

import {Bech32m} from "./Bech32m.sol";

library Deriver {
contract Deriver is Bech32m {

// BEGIN SECP256k1 CONSTANTS
uint256 public constant GX =
Expand Down

0 comments on commit 694da6c

Please sign in to comment.