From 427921d943ad49636aeea99d5b637b09a8c7a967 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 3 Apr 2024 20:49:15 +0200 Subject: [PATCH 1/2] Rename Bitcoin Depositor contract We renamed the depositor contract from AcreBitcoinDepositor to BitcoinDepositor, as there is no point in prefixing the contract with Acre. We used to do that for ethereum typed messages clear signing, but we no longer need ethereum messages signing with Bitcoin-only experience. --- ...coinDepositor.sol => BitcoinDepositor.sol} | 9 +++---- ...arness.sol => BitcoinDepositorHarness.sol} | 10 +++++--- ....sol => BitcoinDepositorMisplacedSlot.sol} | 10 ++++---- ...ot.sol => BitcoinDepositorMissingSlot.sol} | 10 ++++---- ...DepositorV2.sol => BitcoinDepositorV2.sol} | 11 +++----- ...itor.ts => 03_deploy_bitcoin_depositor.ts} | 22 ++++++---------- ...3_transfer_ownership_bitcoin_depositor.ts} | 12 ++++----- ...inDepositor.json => BitcoinDepositor.json} | 0 ...sitor.test.ts => BitcoinDepositor.test.ts} | 6 ++--- ...st.ts => BitcoinDepositor.upgrade.test.ts} | 25 +++++++++---------- core/test/helpers/context.ts | 6 ++--- sdk/src/lib/contracts/bitcoin-depositor.ts | 2 +- ...inDepositor.json => BitcoinDepositor.json} | 0 sdk/src/lib/ethereum/bitcoin-depositor.ts | 8 +++--- .../modules/staking/stake-initialization.ts | 2 +- sdk/test/lib/ethereum/eip712.test.ts | 2 +- sdk/test/modules/staking.test.ts | 2 +- 17 files changed, 62 insertions(+), 75 deletions(-) rename core/contracts/{AcreBitcoinDepositor.sol => BitcoinDepositor.sol} (99%) rename core/contracts/test/{AcreBitcoinDepositorHarness.sol => BitcoinDepositorHarness.sol} (90%) rename core/contracts/test/upgrades/{AcreBitcoinDepositorMisplacedSlot.sol => BitcoinDepositorMisplacedSlot.sol} (98%) rename core/contracts/test/upgrades/{AcreBitcoinDepositorMissingSlot.sol => BitcoinDepositorMissingSlot.sol} (98%) rename core/contracts/test/upgrades/{AcreBitcoinDepositorV2.sol => BitcoinDepositorV2.sol} (98%) rename core/deploy/{03_deploy_acre_bitcoin_depositor.ts => 03_deploy_bitcoin_depositor.ts} (68%) rename core/deploy/{23_transfer_ownership_acre_bitcoin_depositor.ts => 23_transfer_ownership_bitcoin_depositor.ts} (72%) rename core/deployments/sepolia/{AcreBitcoinDepositor.json => BitcoinDepositor.json} (100%) rename core/test/{AcreBitcoinDepositor.test.ts => BitcoinDepositor.test.ts} (99%) rename core/test/{AcreBitcoinDepositor.upgrade.test.ts => BitcoinDepositor.upgrade.test.ts} (90%) rename sdk/src/lib/ethereum/artifacts/sepolia/{AcreBitcoinDepositor.json => BitcoinDepositor.json} (100%) diff --git a/core/contracts/AcreBitcoinDepositor.sol b/core/contracts/BitcoinDepositor.sol similarity index 99% rename from core/contracts/AcreBitcoinDepositor.sol rename to core/contracts/BitcoinDepositor.sol index 6e46fbcab..f2d514ac5 100644 --- a/core/contracts/AcreBitcoinDepositor.sol +++ b/core/contracts/BitcoinDepositor.sol @@ -13,7 +13,7 @@ import {stBTC} from "./stBTC.sol"; // TODO: Make Pausable -/// @title Acre Bitcoin Depositor contract. +/// @title Bitcoin Depositor contract. /// @notice The contract integrates Acre staking with tBTC minting. /// User who wants to stake BTC in Acre should submit a Bitcoin transaction /// to the most recently created off-chain ECDSA wallets of the tBTC Bridge @@ -37,10 +37,7 @@ import {stBTC} from "./stBTC.sol"; /// Depositor address. After tBTC is minted to the Depositor, on the stake /// finalization tBTC is staked in Acre and stBTC shares are emitted /// to the staker. -contract AcreBitcoinDepositor is - AbstractTBTCDepositor, - Ownable2StepUpgradeable -{ +contract BitcoinDepositor is AbstractTBTCDepositor, Ownable2StepUpgradeable { using SafeERC20 for IERC20; /// @notice State of the stake request. @@ -270,7 +267,7 @@ contract AcreBitcoinDepositor is _disableInitializers(); } - /// @notice Acre Bitcoin Depositor contract initializer. + /// @notice Bitcoin Depositor contract initializer. /// @param bridge tBTC Bridge contract instance. /// @param tbtcVault tBTC Vault contract instance. /// @param _tbtcToken tBTC token contract instance. diff --git a/core/contracts/test/AcreBitcoinDepositorHarness.sol b/core/contracts/test/BitcoinDepositorHarness.sol similarity index 90% rename from core/contracts/test/AcreBitcoinDepositorHarness.sol rename to core/contracts/test/BitcoinDepositorHarness.sol index 71b0b3a33..3a87bb3af 100644 --- a/core/contracts/test/AcreBitcoinDepositorHarness.sol +++ b/core/contracts/test/BitcoinDepositorHarness.sol @@ -2,17 +2,17 @@ /* solhint-disable func-name-mixedcase */ pragma solidity ^0.8.21; -import {AcreBitcoinDepositor} from "../AcreBitcoinDepositor.sol"; +import {BitcoinDepositor} from "../BitcoinDepositor.sol"; import {MockBridge, MockTBTCVault} from "@keep-network/tbtc-v2/contracts/test/TestTBTCDepositor.sol"; import {IBridge} from "@keep-network/tbtc-v2/contracts/integrator/IBridge.sol"; import {IBridgeTypes} from "@keep-network/tbtc-v2/contracts/integrator/IBridge.sol"; import {TestERC20} from "./TestERC20.sol"; -/// @dev A test contract to expose internal function from AcreBitcoinDepositor contract. +/// @dev A test contract to expose internal function from BitcoinDepositor contract. /// This solution follows Foundry recommendation: /// https://book.getfoundry.sh/tutorials/best-practices#internal-functions -contract AcreBitcoinDepositorHarness is AcreBitcoinDepositor { +contract BitcoinDepositorHarness is BitcoinDepositor { function exposed_finalizeBridging( uint256 depositKey ) external returns (uint256 amountToStake, address staker) { @@ -25,7 +25,9 @@ contract AcreBitcoinDepositorHarness is AcreBitcoinDepositor { } /// @dev A test contract to stub tBTC Bridge contract. -contract BridgeStub is MockBridge {} +contract BridgeStub is MockBridge { + +} /// @dev A test contract to stub tBTC Vault contract. contract TBTCVaultStub is MockTBTCVault { diff --git a/core/contracts/test/upgrades/AcreBitcoinDepositorMisplacedSlot.sol b/core/contracts/test/upgrades/BitcoinDepositorMisplacedSlot.sol similarity index 98% rename from core/contracts/test/upgrades/AcreBitcoinDepositorMisplacedSlot.sol rename to core/contracts/test/upgrades/BitcoinDepositorMisplacedSlot.sol index 744ebe5bb..848facd99 100644 --- a/core/contracts/test/upgrades/AcreBitcoinDepositorMisplacedSlot.sol +++ b/core/contracts/test/upgrades/BitcoinDepositorMisplacedSlot.sol @@ -11,11 +11,11 @@ import "@keep-network/tbtc-v2/contracts/integrator/AbstractTBTCDepositor.sol"; import {stBTC} from "../../stBTC.sol"; -/// @title AcreBitcoinDepositorMisplacedSlot -/// @dev This is a contract used to test Acre Bitcoin Depositor upgradeability. -/// It is a copy of AcreBitcoinDepositor contract with some differences +/// @title BitcoinDepositorMisplacedSlot +/// @dev This is a contract used to test Bitcoin Depositor upgradeability. +/// It is a copy of BitcoinDepositor contract with some differences /// marked with `TEST:` comments. -contract AcreBitcoinDepositorMisplacedSlot is +contract BitcoinDepositorMisplacedSlot is AbstractTBTCDepositor, Ownable2StepUpgradeable { @@ -251,7 +251,7 @@ contract AcreBitcoinDepositorMisplacedSlot is _disableInitializers(); } - /// @notice Acre Bitcoin Depositor contract initializer. + /// @notice Bitcoin Depositor contract initializer. /// @param bridge tBTC Bridge contract instance. /// @param tbtcVault tBTC Vault contract instance. /// @param _tbtcToken tBTC token contract instance. diff --git a/core/contracts/test/upgrades/AcreBitcoinDepositorMissingSlot.sol b/core/contracts/test/upgrades/BitcoinDepositorMissingSlot.sol similarity index 98% rename from core/contracts/test/upgrades/AcreBitcoinDepositorMissingSlot.sol rename to core/contracts/test/upgrades/BitcoinDepositorMissingSlot.sol index 13213eac7..83190769c 100644 --- a/core/contracts/test/upgrades/AcreBitcoinDepositorMissingSlot.sol +++ b/core/contracts/test/upgrades/BitcoinDepositorMissingSlot.sol @@ -11,11 +11,11 @@ import "@keep-network/tbtc-v2/contracts/integrator/AbstractTBTCDepositor.sol"; import {stBTC} from "../../stBTC.sol"; -/// @title AcreBitcoinDepositorMissingSlot -/// @dev This is a contract used to test Acre Bitcoin Depositor upgradeability. -/// It is a copy of AcreBitcoinDepositor contract with some differences +/// @title BitcoinDepositorMissingSlot +/// @dev This is a contract used to test Bitcoin Depositor upgradeability. +/// It is a copy of BitcoinDepositor contract with some differences /// marked with `TEST:` comments. -contract AcreBitcoinDepositorMissingSlot is +contract BitcoinDepositorMissingSlot is AbstractTBTCDepositor, Ownable2StepUpgradeable { @@ -249,7 +249,7 @@ contract AcreBitcoinDepositorMissingSlot is _disableInitializers(); } - /// @notice Acre Bitcoin Depositor contract initializer. + /// @notice Bitcoin Depositor contract initializer. /// @param bridge tBTC Bridge contract instance. /// @param tbtcVault tBTC Vault contract instance. /// @param _tbtcToken tBTC token contract instance. diff --git a/core/contracts/test/upgrades/AcreBitcoinDepositorV2.sol b/core/contracts/test/upgrades/BitcoinDepositorV2.sol similarity index 98% rename from core/contracts/test/upgrades/AcreBitcoinDepositorV2.sol rename to core/contracts/test/upgrades/BitcoinDepositorV2.sol index 911570891..f826bc95f 100644 --- a/core/contracts/test/upgrades/AcreBitcoinDepositorV2.sol +++ b/core/contracts/test/upgrades/BitcoinDepositorV2.sol @@ -11,14 +11,11 @@ import "@keep-network/tbtc-v2/contracts/integrator/AbstractTBTCDepositor.sol"; import {stBTC} from "../../stBTC.sol"; -/// @title AcreBitcoinDepositorV2 -/// @dev This is a contract used to test Acre Bitcoin Depositor upgradeability. -/// It is a copy of AcreBitcoinDepositor contract with some differences +/// @title BitcoinDepositorV2 +/// @dev This is a contract used to test Bitcoin Depositor upgradeability. +/// It is a copy of BitcoinDepositor contract with some differences /// marked with `TEST:` comments. -contract AcreBitcoinDepositorV2 is - AbstractTBTCDepositor, - Ownable2StepUpgradeable -{ +contract BitcoinDepositorV2 is AbstractTBTCDepositor, Ownable2StepUpgradeable { using SafeERC20 for IERC20; /// @notice State of the stake request. diff --git a/core/deploy/03_deploy_acre_bitcoin_depositor.ts b/core/deploy/03_deploy_bitcoin_depositor.ts similarity index 68% rename from core/deploy/03_deploy_acre_bitcoin_depositor.ts rename to core/deploy/03_deploy_bitcoin_depositor.ts index 73df43e9c..476cd4e08 100644 --- a/core/deploy/03_deploy_acre_bitcoin_depositor.ts +++ b/core/deploy/03_deploy_bitcoin_depositor.ts @@ -12,13 +12,13 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const tbtc = await deployments.get("TBTC") const stbtc = await deployments.get("stBTC") - const [, acreBitcoinDepositorDeployment] = await helpers.upgrades.deployProxy( - "AcreBitcoinDepositor", + const [, deployment] = await helpers.upgrades.deployProxy( + "BitcoinDepositor", { contractName: process.env.HARDHAT_TEST === "true" - ? "AcreBitcoinDepositorHarness" - : "AcreBitcoinDepositor", + ? "BitcoinDepositorHarness" + : "BitcoinDepositor", factoryOpts: { signer: deployer, }, @@ -35,15 +35,9 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { }, ) - if ( - acreBitcoinDepositorDeployment.transactionHash && - hre.network.tags.etherscan - ) { - await waitForTransaction( - hre, - acreBitcoinDepositorDeployment.transactionHash, - ) - await helpers.etherscan.verify(acreBitcoinDepositorDeployment) + if (deployment.transactionHash && hre.network.tags.etherscan) { + await waitForTransaction(hre, deployment.transactionHash) + await helpers.etherscan.verify(deployment) } // TODO: Add Tenderly verification @@ -51,5 +45,5 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { export default func -func.tags = ["AcreBitcoinDepositor"] +func.tags = ["BitcoinDepositor"] func.dependencies = ["TBTC", "stBTC"] diff --git a/core/deploy/23_transfer_ownership_acre_bitcoin_depositor.ts b/core/deploy/23_transfer_ownership_bitcoin_depositor.ts similarity index 72% rename from core/deploy/23_transfer_ownership_acre_bitcoin_depositor.ts rename to core/deploy/23_transfer_ownership_bitcoin_depositor.ts index c04f6f679..8d6d5ffde 100644 --- a/core/deploy/23_transfer_ownership_acre_bitcoin_depositor.ts +++ b/core/deploy/23_transfer_ownership_bitcoin_depositor.ts @@ -6,12 +6,10 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { const { deployer, governance } = await getNamedAccounts() const { log } = deployments - log( - `transferring ownership of AcreBitcoinDepositor contract to ${governance}`, - ) + log(`transferring ownership of BitcoinDepositor contract to ${governance}`) await deployments.execute( - "AcreBitcoinDepositor", + "BitcoinDepositor", { from: deployer, log: true, waitConfirmations: 1 }, "transferOwnership", governance, @@ -19,7 +17,7 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { if (hre.network.name !== "mainnet") { await deployments.execute( - "AcreBitcoinDepositor", + "BitcoinDepositor", { from: governance, log: true, waitConfirmations: 1 }, "acceptOwnership", ) @@ -28,5 +26,5 @@ const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => { export default func -func.tags = ["TransferOwnershipAcreBitcoinDepositor"] -func.dependencies = ["AcreBitcoinDepositor"] +func.tags = ["TransferOwnershipBitcoinDepositor"] +func.dependencies = ["BitcoinDepositor"] diff --git a/core/deployments/sepolia/AcreBitcoinDepositor.json b/core/deployments/sepolia/BitcoinDepositor.json similarity index 100% rename from core/deployments/sepolia/AcreBitcoinDepositor.json rename to core/deployments/sepolia/BitcoinDepositor.json diff --git a/core/test/AcreBitcoinDepositor.test.ts b/core/test/BitcoinDepositor.test.ts similarity index 99% rename from core/test/AcreBitcoinDepositor.test.ts rename to core/test/BitcoinDepositor.test.ts index 313ba35a3..498edd0d5 100644 --- a/core/test/AcreBitcoinDepositor.test.ts +++ b/core/test/BitcoinDepositor.test.ts @@ -12,7 +12,7 @@ import type { StBTC, BridgeStub, TBTCVaultStub, - AcreBitcoinDepositorHarness, + BitcoinDepositorHarness, TestERC20, } from "../typechain" import { deployment } from "./helpers" @@ -30,7 +30,7 @@ async function fixture() { const { lastBlockTime } = helpers.time const { getNamedSigners, getUnnamedSigners } = helpers.signers -describe("AcreBitcoinDepositor", () => { +describe("BitcoinDepositor", () => { const defaultDepositDustThreshold = 1000000 // 1000000 satoshi = 0.01 BTC const defaultDepositTreasuryFeeDivisor = 2000 // 1/2000 = 0.05% = 0.0005 const defaultDepositTxMaxFee = 1000 // 1000 satoshi = 0.00001 BTC @@ -50,7 +50,7 @@ describe("AcreBitcoinDepositor", () => { const depositorFee = to1ePrecision(10, 10) // 10 satoshi const amountToStake = to1ePrecision(896501, 8) // 8965,01 satoshi - let bitcoinDepositor: AcreBitcoinDepositorHarness + let bitcoinDepositor: BitcoinDepositorHarness let tbtcBridge: BridgeStub let tbtcVault: TBTCVaultStub let stbtc: StBTC diff --git a/core/test/AcreBitcoinDepositor.upgrade.test.ts b/core/test/BitcoinDepositor.upgrade.test.ts similarity index 90% rename from core/test/AcreBitcoinDepositor.upgrade.test.ts rename to core/test/BitcoinDepositor.upgrade.test.ts index 7bad1eda9..3016d2ed9 100644 --- a/core/test/AcreBitcoinDepositor.upgrade.test.ts +++ b/core/test/BitcoinDepositor.upgrade.test.ts @@ -8,10 +8,10 @@ import { beforeAfterSnapshotWrapper, deployment } from "./helpers" import { TestERC20, StBTC, - AcreBitcoinDepositor, + BitcoinDepositor, BridgeStub, TBTCVaultStub, - AcreBitcoinDepositorV2, + BitcoinDepositorV2, } from "../typechain" import { to1e18 } from "./utils" @@ -24,12 +24,12 @@ async function fixture() { return { tbtc, stbtc, bitcoinDepositor, tbtcBridge, tbtcVault } } -describe("AcreBitcoinDepositor contract upgrade", () => { +describe("BitcoinDepositor contract upgrade", () => { let tbtc: TestERC20 let tbtcBridge: BridgeStub let tbtcVault: TBTCVaultStub let stbtc: StBTC - let bitcoinDepositor: AcreBitcoinDepositor + let bitcoinDepositor: BitcoinDepositor let governance: HardhatEthersSigner before(async () => { @@ -45,8 +45,8 @@ describe("AcreBitcoinDepositor contract upgrade", () => { it("should throw an error", async () => { await expect( helpers.upgrades.upgradeProxy( - "AcreBitcoinDepositor", - "AcreBitcoinDepositorMisplacedSlot", + "BitcoinDepositor", + "BitcoinDepositorMisplacedSlot", { initializerArgs: [ await tbtcBridge.getAddress(), @@ -67,8 +67,8 @@ describe("AcreBitcoinDepositor contract upgrade", () => { it("should throw an error", async () => { await expect( helpers.upgrades.upgradeProxy( - "AcreBitcoinDepositor", - "AcreBitcoinDepositorMissingSlot", + "BitcoinDepositor", + "BitcoinDepositorMissingSlot", { initializerArgs: [ await tbtcBridge.getAddress(), @@ -86,7 +86,7 @@ describe("AcreBitcoinDepositor contract upgrade", () => { context("when upgrading to a valid contract", () => { const newVariable = 1n - let bitcoinDepositorV2: AcreBitcoinDepositorV2 + let bitcoinDepositorV2: BitcoinDepositorV2 let v1InitialParameters: { minStakeAmount: bigint maxSingleStakeAmount: bigint @@ -111,8 +111,8 @@ describe("AcreBitcoinDepositor contract upgrade", () => { } const [upgradedDepositor] = await helpers.upgrades.upgradeProxy( - "AcreBitcoinDepositor", - "AcreBitcoinDepositorV2", + "BitcoinDepositor", + "BitcoinDepositorV2", { factoryOpts: { signer: governance }, proxyOpts: { @@ -124,8 +124,7 @@ describe("AcreBitcoinDepositor contract upgrade", () => { }, ) - bitcoinDepositorV2 = - upgradedDepositor as unknown as AcreBitcoinDepositorV2 + bitcoinDepositorV2 = upgradedDepositor as unknown as BitcoinDepositorV2 }) it("new instance should have the same address as the old one", async () => { diff --git a/core/test/helpers/context.ts b/core/test/helpers/context.ts index 239721235..839138653 100644 --- a/core/test/helpers/context.ts +++ b/core/test/helpers/context.ts @@ -8,7 +8,7 @@ import type { BridgeStub, TestERC4626, TBTCVaultStub, - AcreBitcoinDepositorHarness, + BitcoinDepositorHarness, } from "../../typechain" // eslint-disable-next-line import/prefer-default-export @@ -16,8 +16,8 @@ export async function deployment() { await deployments.fixture() const stbtc: stBTC = await getDeployedContract("stBTC") - const bitcoinDepositor: AcreBitcoinDepositorHarness = - await getDeployedContract("AcreBitcoinDepositor") + const bitcoinDepositor: BitcoinDepositorHarness = + await getDeployedContract("BitcoinDepositor") const tbtc: TestERC20 = await getDeployedContract("TBTC") const tbtcBridge: BridgeStub = await getDeployedContract("Bridge") diff --git a/sdk/src/lib/contracts/bitcoin-depositor.ts b/sdk/src/lib/contracts/bitcoin-depositor.ts index 960bc4e1f..749f78b73 100644 --- a/sdk/src/lib/contracts/bitcoin-depositor.ts +++ b/sdk/src/lib/contracts/bitcoin-depositor.ts @@ -10,7 +10,7 @@ export type DecodedExtraData = { } /** - * Interface for communication with the AcreBitcoinDepositor on-chain contract. + * Interface for communication with the BitcoinDepositor on-chain contract. */ export interface BitcoinDepositor extends DepositorProxy { /** diff --git a/sdk/src/lib/ethereum/artifacts/sepolia/AcreBitcoinDepositor.json b/sdk/src/lib/ethereum/artifacts/sepolia/BitcoinDepositor.json similarity index 100% rename from sdk/src/lib/ethereum/artifacts/sepolia/AcreBitcoinDepositor.json rename to sdk/src/lib/ethereum/artifacts/sepolia/BitcoinDepositor.json diff --git a/sdk/src/lib/ethereum/bitcoin-depositor.ts b/sdk/src/lib/ethereum/bitcoin-depositor.ts index e5b33ca80..d968ee5b6 100644 --- a/sdk/src/lib/ethereum/bitcoin-depositor.ts +++ b/sdk/src/lib/ethereum/bitcoin-depositor.ts @@ -1,5 +1,5 @@ import { packRevealDepositParameters } from "@keep-network/tbtc-v2.ts" -import { AcreBitcoinDepositor as AcreBitcoinDepositorTypechain } from "@acre-btc/core/typechain/contracts/AcreBitcoinDepositor" +import { BitcoinDepositor as BitcoinDepositorTypechain } from "@acre-btc/core/typechain/contracts/BitcoinDepositor" import { ZeroAddress, dataSlice, @@ -24,7 +24,7 @@ import { import { Hex } from "../utils" import { EthereumNetwork } from "./network" -import SepoliaBitcoinDepositor from "./artifacts/sepolia/AcreBitcoinDepositor.json" +import SepoliaBitcoinDepositor from "./artifacts/sepolia/BitcoinDepositor.json" /** * Ethereum implementation of the BitcoinDepositor. @@ -32,8 +32,8 @@ import SepoliaBitcoinDepositor from "./artifacts/sepolia/AcreBitcoinDepositor.js class EthereumBitcoinDepositor // @ts-expect-error TODO: Figure out why type generated by typechain does not // satisfy the constraint `Contract`. Error: `Property '[internal]' is missing - // in type 'AcreBitcoinDepositor' but required in type 'Contract'`. - extends EthersContractWrapper + // in type 'BitcoinDepositor' but required in type 'Contract'`. + extends EthersContractWrapper implements BitcoinDepositor { constructor(config: EthersContractConfig, network: EthereumNetwork) { diff --git a/sdk/src/modules/staking/stake-initialization.ts b/sdk/src/modules/staking/stake-initialization.ts index 4d66a111c..869de4452 100644 --- a/sdk/src/modules/staking/stake-initialization.ts +++ b/sdk/src/modules/staking/stake-initialization.ts @@ -120,7 +120,7 @@ class StakeInitialization { */ #getStakeMessageTypedData() { const domain: Domain = { - name: "AcreBitcoinDepositor", + name: "BitcoinDepositor", version: "1", verifyingContract: this.#contracts.bitcoinDepositor.getChainIdentifier(), } diff --git a/sdk/test/lib/ethereum/eip712.test.ts b/sdk/test/lib/ethereum/eip712.test.ts index 5e342e0ac..7395d8497 100644 --- a/sdk/test/lib/ethereum/eip712.test.ts +++ b/sdk/test/lib/ethereum/eip712.test.ts @@ -7,7 +7,7 @@ import { const signMessageData = { domain: { - name: "AcreBitcoinDepositor", + name: "BitcoinDepositor", version: "1", verifyingContract: EthereumAddress.from( ethers.Wallet.createRandom().address, diff --git a/sdk/test/modules/staking.test.ts b/sdk/test/modules/staking.test.ts index 664e54767..6eaca2ead 100644 --- a/sdk/test/modules/staking.test.ts +++ b/sdk/test/modules/staking.test.ts @@ -171,7 +171,7 @@ describe("Staking", () => { it("should sign message", () => { expect(messageSigner.sign).toHaveBeenCalledWith( { - name: "AcreBitcoinDepositor", + name: "BitcoinDepositor", version: "1", verifyingContract: contracts.bitcoinDepositor.getChainIdentifier(), From bcf91ae5d28f59322f300013ec5593d44af3c353 Mon Sep 17 00:00:00 2001 From: Jakub Nowakowski Date: Wed, 3 Apr 2024 21:03:24 +0200 Subject: [PATCH 2/2] Fix code format --- core/contracts/test/BitcoinDepositorHarness.sol | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/contracts/test/BitcoinDepositorHarness.sol b/core/contracts/test/BitcoinDepositorHarness.sol index 3a87bb3af..7b2f7ac41 100644 --- a/core/contracts/test/BitcoinDepositorHarness.sol +++ b/core/contracts/test/BitcoinDepositorHarness.sol @@ -25,9 +25,7 @@ contract BitcoinDepositorHarness is BitcoinDepositor { } /// @dev A test contract to stub tBTC Bridge contract. -contract BridgeStub is MockBridge { - -} +contract BridgeStub is MockBridge {} /// @dev A test contract to stub tBTC Vault contract. contract TBTCVaultStub is MockTBTCVault {