Skip to content

Commit

Permalink
Merge branch 'main' into arbitrum
Browse files Browse the repository at this point in the history
  • Loading branch information
JSanchezFDZ authored Aug 31, 2024
2 parents 1af79f8 + 2ab5728 commit 08653f8
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 16 deletions.
33 changes: 31 additions & 2 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
anyone, and even the smallest of fixes is appreciated!

The following is a set of guidelines for contributing to Keep and its packages.
These are mostly guidelines, not rules. Use your best judgment, and feel free to
propose changes to this document in a pull request.
Feel free to propose changes to this document in a pull request.

== Getting started

Expand Down Expand Up @@ -55,3 +54,33 @@ Solidity linting, please propose these changes to our
https://github.com/keep-network/solium-config-keep[solium-config-keep] and
https://github.com/keep-network/eslint-config-keep[eslint-config-keep] packages.
All other packages have it as a dependency.

== Commit Messages

When composing commit messages, please follow the general guidelines listed in
https://cbea.ms/git-commit/[Chris Beams’s How to Write a Git Commit Message].
Many editors have git modes that will highlight overly long first lines of
commit messages, etc. The GitHub UI itself will warn you if your commit summary
is too long, and will auto-wrap commit messages made through the UI to 72
characters.

The above goes into good commit style. Some additional guidelines do apply,
however:

* The target audience of your commit messages is always "some person 10 years
from now who never got a chance to talk to present you" (that person could be
future you!).
* Commit messages with a summary and no description should be very rare. This
means you should probably break any habit of using `git commit -m`.
* A fundamental principle that informs our use of GitHub: assume GitHub will
someday go away, and ensure git has captured all important information about
the development of the code. Commit messages are the piece of knowledge that
is second most likely to survive tool transitions (the first is the code
itself); as such, they must stand alone. Do not reference tickets or issues
in your commit messages. Summarize any conclusions from the issue or ticket
that inform the commit itself, and capture any additional reasoning or context
in the merge commit.
* Make your commits as atomic as you can manage. This means each commit contains
a single logical unit of work.
* Run a quick `git log --graph --all --oneline --decorate` before pushing.
It’s much easier to fix typos and minor mistakes locally.
25 changes: 13 additions & 12 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:toc: macro

= TBTC v2
= tBTC v2

https://github.com/keep-network/tbtc-v2/actions/workflows/contracts.yml[image:https://img.shields.io/github/actions/workflow/status/keep-network/tbtc-v2/contracts.yml?branch=main&event=push&label=Core%20contracts%20build[Core contracts build status]]
https://github.com/keep-network/tbtc-v2/actions/workflows/typescript.yml[image:https://img.shields.io/github/actions/workflow/status/keep-network/tbtc-v2/typescript.yml?branch=main&event=push&label=SDK%20build[SDK build status]]
Expand All @@ -20,28 +20,29 @@ original asset. This centralized model requires you to trust a third party and
is prone to censorship, threatening Bitcoin's promise of secure, permissionless
decentralization.

Threshold aims to solve this problem with TBTC v2.
Threshold aims to solve this problem with tBTC v2.

The second generation of TBTC is a truly decentralized bridge between Bitcoin
The second generation of tBTC is a truly decentralized bridge between Bitcoin
and Ethereum. It provides Bitcoin holders permissionless access to DeFi and the
expanding web3 universe.

TBTC v2 replaces centralized intermediaries with a randomly selected group of
tBTC v2 replaces centralized intermediaries with a randomly selected group of
node operators on the Threshold Network. This group of independent operators
works together to secure your deposited Bitcoin through threshold cryptography.
That means TBTC v2 requires a majority threshold agreement before operators
That means tBTC v2 requires a majority threshold agreement before operators
perform any action with your Bitcoin. By rotating the selection of operators,
TBTC v2 protects against any malicious individual or group of operators seizing
control. Unlike other solutions on the market, users on TBTC v2 are reliant on
math, not hardware or people. Additionally, TBTC v2 is open and accessible to
tBTC v2 protects against any malicious individual or group of operators seizing
control. Unlike other solutions on the market, users on tBTC v2 are reliant on
math, not hardware or people. Additionally, tBTC v2 is open and accessible to
anyone.
TBTC v2 allows anyone to use Bitcoin in the expanding DeFi and Web3 universe

tBTC v2 allows anyone to use Bitcoin in the expanding DeFi and Web3 universe
without a third-party intermediary.

toc::[]

== Overview

tBTCv2 uses the
link:https://github.com/keep-network/keep-core/tree/main/solidity/random-beacon[Random
Beacon] and link:https://github.com/keep-network/sortition-pools[Sortition Pool]
Expand All @@ -51,7 +52,7 @@ Bitcoin wallets at a governable frequency (starting weekly). The youngest
wallet accepts new deposits, and the oldest wallet serves redemptions.

Depositing Bitcoin into the tBTCv2 bridge grants a transferable Bank balance, which
can be used to mint a supply-pegged ERC-20: TBTC. For an in-depth explanation
can be used to mint a supply-pegged ERC-20: tBTC. For an in-depth explanation
about the design, see link:docs/rfc/rfc-1.adoc[RFC 1: tBTCv2 Design].

== Repository structure
Expand All @@ -78,4 +79,4 @@ learn more.
== Security

Please see link:SECURITY.adoc[SECURITY.adoc] to learn more about
tBTC v2 security policy.
tBTC v2 security policy.
4 changes: 3 additions & 1 deletion typescript/src/services/redemptions/redemptions-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ export class RedemptionsService {

if (!walletData)
throw new Error(
`Could not find a wallet with enough funds. Maximum redemption amount is ${maxAmount} Satoshi.`
`Could not find a wallet with enough funds. Maximum redemption amount is ${maxAmount} Satoshi ( ${maxAmount.div(
BigNumber.from(1e8)
)} BTC ) .`
)

return walletData
Expand Down
4 changes: 3 additions & 1 deletion typescript/test/services/redemptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ describe("Redemptions", () => {
amount
)
).to.be.rejectedWith(
`Could not find a wallet with enough funds. Maximum redemption amount is ${expectedMaxAmount.toString()} Satoshi.`
`Could not find a wallet with enough funds. Maximum redemption amount is ${expectedMaxAmount.toString()} Satoshi ( ${expectedMaxAmount.div(
BigNumber.from(1e8)
)} BTC ) `
)
})
}
Expand Down

0 comments on commit 08653f8

Please sign in to comment.