You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The L2/sidechain token will be upgradeable, owned by Threshold Council, will delegate the minting authority to multiple parties, and have a pause functionality for mints and burns. A generic implementation of the token will be provided in the solidity smart contracts directory.
The text was updated successfully, but these errors were encountered:
…550)
Closes#543
# The contract
`L2TBTC` is a canonical L2/sidechain token implementation. tBTC token is
minted on L1 and locked there to be moved to L2/sidechain. By deploying
a canonical token on each L2/sidechain, we can ensure the supply of tBTC
remains sacrosanct, while enabling quick, interoperable cross-chain
bridges and localizing ecosystem risk.
This contract is flexible enough to:
- Delegate minting authority to a native bridge on the chain, if
present.
- Delegate minting authority to a short list of ecosystem bridges.
- Have mints and burns paused by any one of n guardians, allowing
avoidance of contagion in case of a chain- or bridge-specific incident.
- Be governed and upgradeable.
The token is burnable by the token holder and supports EIP2612 permits.
Token holder can authorize a transfer of their token with a signature
conforming EIP712 standard instead of an on-chain transaction from their
address. Anyone can submit this signature on the user's behalf by
calling the permit function, paying gas fees, and possibly performing
other actions in the same transaction. The governance can recover ERC20
and ERC721 tokens sent mistakenly to `L2TBTC` token contract.
# Testing
All functions defined in `L2TBTC` contract are fully covered with tests.
`L2TBTC` contract inherits from OpenZeppelin contracts and we do not
want to test the framework. At the same time, we need to make sure all
the declared functionalities are exposed by the contract and that they
work. The tests must fail if the contract initialization gets broken or
if one of the OpenZeppelin extensions is dropped from the inheritance.
To make it happen, the tests cover really basic scenarios for the code
implemented in OpenZeppelin ERC20 and extensions.
The tests use `helpers.upgrades.deployProxy` to deploy `L2TBTC` and to
test it as a contract deployed behind a proxy. There is a [small
complication](https://github.com/keep-network/tbtc-v2/pull/550/files/7ae7122334a75cbbcd3a2b117082ad4e5ddde3d3#diff-35dc35185324e88cdeb94aa85d52542cd9bf3fb6b3bddddb2e2fcbf7a42c4ebd)
with this approach that led to opening an issue in our hardhat plugins
repo: keep-network/hardhat-helpers#38.
See #542
The L2/sidechain token will be upgradeable, owned by Threshold Council, will delegate the minting authority to multiple parties, and have a pause functionality for mints and burns. A generic implementation of the token will be provided in the
solidity
smart contracts directory.The text was updated successfully, but these errors were encountered: