Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make deposit dust threshold configurable in MockBridge #787

Merged
merged 2 commits into from
Feb 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions solidity/contracts/test/TestTBTCDepositor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ contract MockBridge is IBridge {

mapping(uint256 => IBridgeTypes.DepositRequest) internal _deposits;

uint64 internal _depositDustThreshold = 1000000; // 1000000 satoshi = 0.01 BTC
uint64 internal _depositTreasuryFeeDivisor = 50; // 1/50 == 100 bps == 2% == 0.02
uint64 internal _depositTxMaxFee = 1000; // 1000 satoshi = 0.00001 BTC

Expand Down Expand Up @@ -137,12 +138,16 @@ contract MockBridge is IBridge {
uint32 depositRevealAheadPeriod
)
{
depositDustThreshold = 0;
depositTreasuryFeeDivisor = 0;
depositDustThreshold = _depositDustThreshold;
depositTreasuryFeeDivisor = _depositTreasuryFeeDivisor;
depositTxMaxFee = _depositTxMaxFee;
depositRevealAheadPeriod = 0;
}

function setDepositDustThreshold(uint64 value) external {
_depositDustThreshold = value;
}

function setDepositTreasuryFeeDivisor(uint64 value) external {
_depositTreasuryFeeDivisor = value;
}
Expand Down
Loading