Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions packages/contracts/script/MainnetProduction.sol
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ abstract contract MainnetAssets {
address public constant BASE_WBTC = 0x0555E30da8f98308EdB960aa94C0Db47230d2B9c;
address public constant BERACHAIN_WBTC = 0x0555E30da8f98308EdB960aa94C0Db47230d2B9c;
address public constant MANTLE_WBTC = 0xCAbAE6f6Ea1ecaB08Ad02fE02ce9A44F09aebfA2;
bytes32 public constant SOLANA_WBTC = 0x233cea474d6cb513dad421c82e681f80ed7512455dfb91fc68363b99d9156582;

///////////////////// FEE RECIPIENTS
address public constant FEE_RECIPIENT = 0xac7599880cB5b5eCaF416BEE57C606f15DA5beB8;
Expand Down
23 changes: 7 additions & 16 deletions packages/contracts/script/assets/mainnetproduction/WBTC.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ contract WBTC is AddAssetBase, MainnetProductionEnvironment {
ADOPTED CONFIGURATION
//////////////////////////////////////////////////////////////*/

IHubStorage.AssetConfig[] memory _assetConfigs = new IHubStorage.AssetConfig[](5);
IHubStorage.AssetConfig[] memory _assetConfigs = new IHubStorage.AssetConfig[](4);

///// Ethereum
_assetConfigs[0] = IHubStorage.AssetConfig({
Expand All @@ -56,29 +56,20 @@ contract WBTC is AddAssetBase, MainnetProductionEnvironment {
strategy: IEverclear.Strategy.DEFAULT
});

///// Berachain
_assetConfigs[2] = IHubStorage.AssetConfig({
tickerHash: _tickerHash,
adopted: BERACHAIN_WBTC.toBytes32(),
domain: BERACHAIN,
approval: true,
strategy: IEverclear.Strategy.DEFAULT
});

///// Base
_assetConfigs[3] = IHubStorage.AssetConfig({
_assetConfigs[2] = IHubStorage.AssetConfig({
tickerHash: _tickerHash,
adopted: BASE_WBTC.toBytes32(),
domain: BASE,
approval: true,
strategy: IEverclear.Strategy.DEFAULT
});

///// Mantle
_assetConfigs[4] = IHubStorage.AssetConfig({
///// Solana
_assetConfigs[3] = IHubStorage.AssetConfig({
tickerHash: _tickerHash,
adopted: MANTLE_WBTC.toBytes32(),
domain: MANTLE,
adopted: SOLANA_WBTC,
Copy link

Copilot AI Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent data type usage for adopted field. Other configurations use .toBytes32() conversion (e.g., BASE_WBTC.toBytes32()), but SOLANA_WBTC is used directly. This suggests SOLANA_WBTC is already bytes32 while others are addresses, which could lead to type confusion.

Suggested change
adopted: SOLANA_WBTC,
adopted: SOLANA_WBTC.toBytes32(),

Copilot uses AI. Check for mistakes.
domain: SOLANA,
approval: true,
strategy: IEverclear.Strategy.DEFAULT
});
Expand All @@ -89,7 +80,7 @@ contract WBTC is AddAssetBase, MainnetProductionEnvironment {

_setup = IHubStorage.TokenSetup({
tickerHash: _tickerHash,
initLastClosedEpochProcessed: true,
initLastClosedEpochProcessed: false,
prioritizedStrategy: IEverclear.Strategy.DEFAULT,
maxDiscountDbps: 0,
discountPerEpoch: 0,
Expand Down
Loading