From 237cb60908aededeab7a27c1f2dacee2fb69bff2 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Tue, 23 Apr 2024 13:17:50 +0200 Subject: [PATCH] Update minimum deposit amount for Sepolia BitcoinDepositor defines minimum deposit amount which relates to the tBTC Bridge dust threshold. To simplyfy testing the deposit dust threshold was lowered for Sepolia, we need to align the min deposit amount in BitcoinDepositor too, as this value is enforced in deposit form in the dApp. --- ...itor_update_minimum_deposit_amount copy.ts | 25 +++++++++++++++++++ ...tbtc.ts => 15_update_pause_admin_stbtc.ts} | 0 2 files changed, 25 insertions(+) create mode 100644 solidity/deploy/14_bitcoin_depositor_update_minimum_deposit_amount copy.ts rename solidity/deploy/{14_update_pause_admin_stbtc.ts => 15_update_pause_admin_stbtc.ts} (100%) diff --git a/solidity/deploy/14_bitcoin_depositor_update_minimum_deposit_amount copy.ts b/solidity/deploy/14_bitcoin_depositor_update_minimum_deposit_amount copy.ts new file mode 100644 index 000000000..4657d8c51 --- /dev/null +++ b/solidity/deploy/14_bitcoin_depositor_update_minimum_deposit_amount copy.ts @@ -0,0 +1,25 @@ +import type { HardhatRuntimeEnvironment } from "hardhat/types" +import type { DeployFunction } from "hardhat-deploy/types" + +const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { + const { getNamedAccounts, deployments } = hre + const { deployer } = await getNamedAccounts() + + const minimumDepositAmount = 150000000000000 // 0.00015 tBTC + + await deployments.execute( + "BitcoinDepositor", + { from: deployer, log: true, waitConfirmations: 1 }, + "updateMinDepositAmount", + minimumDepositAmount, + ) +} + +export default func + +func.tags = ["BitcoinDepositorUpdateMinimumDepositAmount"] +func.dependencies = ["BitcoinDepositor"] + +// Run only on Sepolia testnet. +func.skip = async (hre: HardhatRuntimeEnvironment): Promise => + Promise.resolve(hre.network.name !== "sepolia") diff --git a/solidity/deploy/14_update_pause_admin_stbtc.ts b/solidity/deploy/15_update_pause_admin_stbtc.ts similarity index 100% rename from solidity/deploy/14_update_pause_admin_stbtc.ts rename to solidity/deploy/15_update_pause_admin_stbtc.ts