From b2522d7477e27427c22eb43aa07b3bd20fc3b8fa Mon Sep 17 00:00:00 2001 From: scolear Date: Thu, 5 Dec 2024 11:23:44 +0100 Subject: [PATCH 1/4] chore: bsc initial setup --- .env.template | 13 ++++++++----- hardhat.config.js | 17 +++++++++++++++++ scripts/helpers/chainlink-por-addresses.js | 4 +++- scripts/helpers/dlc-admin-safes.js | 4 ++++ scripts/helpers/mainnet-call-all.sh | 5 +++-- scripts/helpers/new-chain-setup-mainnet.sh | 8 +++++--- 6 files changed, 40 insertions(+), 11 deletions(-) diff --git a/.env.template b/.env.template index e7e2c3ce..807a31c2 100644 --- a/.env.template +++ b/.env.template @@ -1,10 +1,6 @@ -# Infura key -INFURA_PROJECT_ID= # Deployer private key KEY= -# Etherscan API KEY -ETHERSCAN_API_KEY= -# Network to use e.g. localhost(for hardhat)/sepolia/mainnet/optimism/arbsepolia/arbitrum/base +# Network to use e.g. localhost(for hardhat)/sepolia/mainnet/optimism/arbsepolia/arbitrum/base/bsc HARDHAT_NETWORK= # Coinmarketcap API KEY (optional, for gas calculations) COINMARKETCAP_API_KEY= @@ -12,3 +8,10 @@ COINMARKETCAP_API_KEY= REPORT_GAS= # SAFE key signer (optional) SCRIPT_KEY= + +# Etherscan API KEYs (optional) +ETHERSCAN_API_KEY= +ARBISCAN_API_KEY= +OPTISCAN_API_KEY= +BASESCAN_API_KEY= +BSCSCAN_API_KEY= diff --git a/hardhat.config.js b/hardhat.config.js index fcdb8836..06ee12fa 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -27,6 +27,9 @@ const baseSepoliaURL = const optimismURL = process.env.OPTIMISM_NODE_ADDR ?? `https://opt-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`; +const bscURL = + process.env.BSC_NODE_ADDR ?? + `https://bnb-mainnet.g.alchemy.com/v2/${process.env.ALCHEMY_API_KEY}`; const deployerKey = process.env.SCRIPT_KEY ?? process.env.KEY; module.exports = { @@ -87,6 +90,11 @@ module.exports = { chainId: 84532, accounts: [deployerKey], }, + bsc: { + url: bscURL, + chainId: 56, + accounts: [deployerKey], + }, }, etherscan: { apiKey: { @@ -97,6 +105,7 @@ module.exports = { optimism: process.env['OPTISCAN_API_KEY'], base: process.env['BASESCAN_API_KEY'], basesepolia: process.env['BASESCAN_API_KEY'], + bsc: process.env['BSCSCAN_API_KEY'], }, customChains: [ { @@ -155,6 +164,14 @@ module.exports = { browserURL: 'https://sepolia.basescan.org/', }, }, + { + network: 'bsc', + chainId: 56, + urls: { + apiURL: `https://api.bscscan.com/api?apikey=${process.env.BSCSCAN_API_KEY}`, + browserURL: 'https://bscscan.com/', + }, + }, ], }, gasReporter: { diff --git a/scripts/helpers/chainlink-por-addresses.js b/scripts/helpers/chainlink-por-addresses.js index d4eb8ded..f2c75b0a 100644 --- a/scripts/helpers/chainlink-por-addresses.js +++ b/scripts/helpers/chainlink-por-addresses.js @@ -20,9 +20,11 @@ module.exports = async function getPoRAddress(network) { case 'arbsepolia': return ''; case 'base': - return ''; + return '0x30A76F4E688Cf52f4A06D7AAd987A7037f3Ae6f7'; case 'basesepolia': return ''; + case 'bsc': + return ''; case 'localhost': return await deployAndGetMockAggregatorAddress(); default: diff --git a/scripts/helpers/dlc-admin-safes.js b/scripts/helpers/dlc-admin-safes.js index a9ab7eee..3e31c478 100644 --- a/scripts/helpers/dlc-admin-safes.js +++ b/scripts/helpers/dlc-admin-safes.js @@ -31,4 +31,8 @@ module.exports = { medium: '0x9506Ea24038609679732855F757041a3C1C06623', critical: '0xebDC2027D3ee493B49553Befc1200e1cce9e2E08', }, + bsc: { + medium: '0x989a6b15c0c55C0c9FEd6E60a812d9Fb02Ad666E', + critical: '0x019A7B9C9622633Adb6C771B5c1817AB0D85b557', + }, }; diff --git a/scripts/helpers/mainnet-call-all.sh b/scripts/helpers/mainnet-call-all.sh index 045a352d..3a0bb09e 100755 --- a/scripts/helpers/mainnet-call-all.sh +++ b/scripts/helpers/mainnet-call-all.sh @@ -2,8 +2,8 @@ # Check if the command line argument is provided if [ $# -eq 0 ]; then - echo "Please provide a command argument." - exit 1 + echo "Please provide a command argument." + exit 1 fi # Assign the command line argument to a variable @@ -13,4 +13,5 @@ extra_args="${@:2}" HARDHAT_NETWORK=base dlc-link-eth $command $extra_args HARDHAT_NETWORK=arbitrum dlc-link-eth $command $extra_args HARDHAT_NETWORK=mainnet dlc-link-eth $command $extra_args +HARDHAT_NETWORK=bsc dlc-link-eth $command $extra_args HARDHAT_NETWORK=optimism dlc-link-eth $command $extra_args diff --git a/scripts/helpers/new-chain-setup-mainnet.sh b/scripts/helpers/new-chain-setup-mainnet.sh index 0d66be3a..32d8e4c6 100755 --- a/scripts/helpers/new-chain-setup-mainnet.sh +++ b/scripts/helpers/new-chain-setup-mainnet.sh @@ -10,12 +10,13 @@ dlc-link-eth add-signer 0x5db792d5facb35e9adce8a151e8a3d0d36c9cb77 # HashKey dlc-link-eth add-signer 0x194c697e8343EaB3C53917BA7e597d02687f8BA0 # Despread dlc-link-eth add-signer 0xdf4d8B54dE476B674f1832B95984fFa7e223d47B # PierTwo dlc-link-eth add-signer 0xAFBc5Dde8a3fEc5234600Ed7fCA541609F3Ed23C # ValidationCloud +dlc-link-eth add-signer 0x087632014330977A9B85972A6E92c4e1893E75c5 # Everstake dlc-link-eth set-attestor-gpk 'xpub6C1F2SwADP3TNajQjg2PaniEGpZLvWdMiFP8ChPjQBRWD1XUBeMdE4YkQYvnNhAYGoZKfcQbsRCefserB5DyJM7R9VR6ce6vLrXHVfeqyH3' -dlc-link-eth set-btc-fee-recipient 021b34f36d8487ce3a7a6f0124f58854d561cb52077593d1e86973fac0fea1a8b1 +dlc-link-eth set-btc-fee-recipient 3D8kYzXXsvibCqWUu7RkXZTLcx5DzmckZ2 -dlc-link-eth set-threshold 4 +dlc-link-eth set-threshold 5 # dlc-link-eth grant-role-on-manager DLC_ADMIN_ROLE $MEDIUM_MULTISIG @@ -33,7 +34,8 @@ dlc-link-eth whitelist-account 0x0DD4f29E21F10cb2E485cf9bDAb9F2dD1f240Bfa # DLC. dlc-link-eth whitelist-account 0x5dd42c5fbf7f784d040c59f1720cdd8c47bbff95 # Amber dlc-link-eth whitelist-account 0xf92893654e38b80dfd9b4a2fb99100dd31ba5e2d # Amber dlc-link-eth whitelist-account 0xff200709bf9bbc5209ba4b5dd767913a8a06b73f # Amber -dlc-link-eth whitelist-account 0x46166fA874AAEDEA8d98b15F9A72C84e22Abe2A1 # SBL +dlc-link-eth whitelist-account 0x46166fA874AAEDEA8d98b15F9A72C84e22Abe2A1 # SBL has been offboarded dlc-link-eth whitelist-account 0x14Ee510Ebd4E5273e83Ad88f6cd2dc228BE40D12 # Tokkalabs dlc-link-eth whitelist-account 0xFc62319bCdfeDB6e55295F3723005593b16A3f9c # Garden dlc-link-eth whitelist-account 0x2816f3528AD324E6089714DA8E89455f58739e68 # Jademont +dlc-link-eth whitelist-account 0x707A141c5c19c25E2e6D50b214e39A4293B63234 # PatternResearch From 6eff735b659e741a9aa1b85326974986fecd5ea1 Mon Sep 17 00:00:00 2001 From: scolear Date: Thu, 5 Dec 2024 12:46:35 +0100 Subject: [PATCH 2/4] iBTC deployment --- .openzeppelin/bsc.json | 804 +++++++++++++++++++++ deploymentFiles/bsc/IBTC.json | 48 ++ scripts/helpers/new-chain-setup-mainnet.sh | 26 +- 3 files changed, 866 insertions(+), 12 deletions(-) create mode 100644 .openzeppelin/bsc.json create mode 100644 deploymentFiles/bsc/IBTC.json diff --git a/.openzeppelin/bsc.json b/.openzeppelin/bsc.json new file mode 100644 index 00000000..b726f971 --- /dev/null +++ b/.openzeppelin/bsc.json @@ -0,0 +1,804 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x050C24dBf1eEc17babE5fc585F06116A259CC77A", + "txHash": "0xfdfb4f52fc2bab5f3b3f8687ec80cf17b17e71797eac8dd329bfa12308491bc1" + }, + "proxies": [ + { + "address": "0x25BE3EdD820A8fCE6B8E211F40C5B82Ba176994C", + "txHash": "0x90bf72d9b9df915a01568f42cf41db446af48ca042650d70bd2dc3a47bb67f6a", + "kind": "transparent" + } + ], + "impls": { + "7ea079631c9474e5098096007791cde10e25e3d9360ebe76d4d239e27b759fdc": { + "address": "0x2bAa7E92F3F14883264BfA63058cC223Ad719438", + "txHash": "0x4c028d56b43fcc971b721120a2eba7744b9dd9f71c011d234ed8e4e1edfafad3", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_balances", + "offset": 0, + "slot": "51", + "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:40" + }, + { + "label": "_allowances", + "offset": 0, + "slot": "52", + "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:42" + }, + { + "label": "_totalSupply", + "offset": 0, + "slot": "53", + "type": "t_uint256", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:44" + }, + { + "label": "_name", + "offset": 0, + "slot": "54", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:46" + }, + { + "label": "_symbol", + "offset": 0, + "slot": "55", + "type": "t_string_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:47" + }, + { + "label": "__gap", + "offset": 0, + "slot": "56", + "type": "t_array(t_uint256)45_storage", + "contract": "ERC20Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol:376" + }, + { + "label": "_hashedName", + "offset": 0, + "slot": "101", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:40", + "renamedFrom": "_HASHED_NAME" + }, + { + "label": "_hashedVersion", + "offset": 0, + "slot": "102", + "type": "t_bytes32", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:42", + "renamedFrom": "_HASHED_VERSION" + }, + { + "label": "_name", + "offset": 0, + "slot": "103", + "type": "t_string_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:44" + }, + { + "label": "_version", + "offset": 0, + "slot": "104", + "type": "t_string_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:45" + }, + { + "label": "__gap", + "offset": 0, + "slot": "105", + "type": "t_array(t_uint256)48_storage", + "contract": "EIP712Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/cryptography/EIP712Upgradeable.sol:204" + }, + { + "label": "_nonces", + "offset": 0, + "slot": "153", + "type": "t_mapping(t_address,t_struct(Counter)3035_storage)", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol:28" + }, + { + "label": "_PERMIT_TYPEHASH_DEPRECATED_SLOT", + "offset": 0, + "slot": "154", + "type": "t_bytes32", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol:40", + "renamedFrom": "_PERMIT_TYPEHASH" + }, + { + "label": "__gap", + "offset": 0, + "slot": "155", + "type": "t_array(t_uint256)49_storage", + "contract": "ERC20PermitUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/token/ERC20/extensions/ERC20PermitUpgradeable.sol:108" + }, + { + "label": "_owner", + "offset": 0, + "slot": "204", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "205", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "blacklisted", + "offset": 0, + "slot": "254", + "type": "t_mapping(t_address,t_bool)", + "contract": "IBTC", + "src": "contracts/IBTC.sol:30" + }, + { + "label": "_minter", + "offset": 0, + "slot": "255", + "type": "t_address", + "contract": "IBTC", + "src": "contracts/IBTC.sol:31" + }, + { + "label": "_burner", + "offset": 0, + "slot": "256", + "type": "t_address", + "contract": "IBTC", + "src": "contracts/IBTC.sol:32" + }, + { + "label": "__gap", + "offset": 0, + "slot": "257", + "type": "t_array(t_uint256)48_storage", + "contract": "IBTC", + "src": "contracts/IBTC.sol:33" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)45_storage": { + "label": "uint256[45]", + "numberOfBytes": "1440" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_address,t_uint256))": { + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_struct(Counter)3035_storage)": { + "label": "mapping(address => struct CountersUpgradeable.Counter)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(Counter)3035_storage": { + "label": "struct CountersUpgradeable.Counter", + "members": [ + { + "label": "_value", + "type": "t_uint256", + "offset": 0, + "slot": "0" + } + ], + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + }, + "97e23ed7ecb1c03753e7a6b77b9a696da3e74b428787829f9bde850a618fcf18": { + "address": "0x8570501a7853e5183b5Ff347Fb9858Cf676fd9ef", + "txHash": "0xc28882a1924081466e61693e7d9ffecf9fd304dcef92e09967ea0dd7e74545b7", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)793_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_pendingDefaultAdmin", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:43" + }, + { + "label": "_pendingDefaultAdminSchedule", + "offset": 20, + "slot": "151", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:44" + }, + { + "label": "_currentDelay", + "offset": 26, + "slot": "151", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:46" + }, + { + "label": "_currentDefaultAdmin", + "offset": 0, + "slot": "152", + "type": "t_address", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:47" + }, + { + "label": "_pendingDelay", + "offset": 20, + "slot": "152", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:50" + }, + { + "label": "_pendingDelaySchedule", + "offset": 26, + "slot": "152", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:51" + }, + { + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)48_storage", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:394" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_index", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:49" + }, + { + "label": "dlcs", + "offset": 0, + "slot": "252", + "type": "t_mapping(t_uint256,t_struct(DLC)7412_storage)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:50" + }, + { + "label": "dlcIDsByUUID", + "offset": 0, + "slot": "253", + "type": "t_mapping(t_bytes32,t_uint256)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:51" + }, + { + "label": "_minimumThreshold", + "offset": 0, + "slot": "254", + "type": "t_uint16", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:53" + }, + { + "label": "_threshold", + "offset": 2, + "slot": "254", + "type": "t_uint16", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:54" + }, + { + "label": "_signerCount", + "offset": 4, + "slot": "254", + "type": "t_uint16", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:55" + }, + { + "label": "tssCommitment", + "offset": 0, + "slot": "255", + "type": "t_bytes32", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:56" + }, + { + "label": "attestorGroupPubKey", + "offset": 0, + "slot": "256", + "type": "t_string_storage", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:57" + }, + { + "label": "dlcBTC", + "offset": 0, + "slot": "257", + "type": "t_contract(IBTC)9454", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:61" + }, + { + "label": "btcFeeRecipient", + "offset": 0, + "slot": "258", + "type": "t_string_storage", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:62" + }, + { + "label": "minimumDeposit", + "offset": 0, + "slot": "259", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:63" + }, + { + "label": "maximumDeposit", + "offset": 0, + "slot": "260", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:64" + }, + { + "label": "btcMintFeeRate", + "offset": 0, + "slot": "261", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:65" + }, + { + "label": "btcRedeemFeeRate", + "offset": 0, + "slot": "262", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:66" + }, + { + "label": "whitelistingEnabled", + "offset": 0, + "slot": "263", + "type": "t_bool", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:67" + }, + { + "label": "userVaults", + "offset": 0, + "slot": "264", + "type": "t_mapping(t_address,t_array(t_bytes32)dyn_storage)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:69" + }, + { + "label": "_whitelistedAddresses", + "offset": 0, + "slot": "265", + "type": "t_mapping(t_address,t_bool)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:70" + }, + { + "label": "porEnabled", + "offset": 0, + "slot": "266", + "type": "t_bool", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:71" + }, + { + "label": "dlcBTCPoRFeed", + "offset": 1, + "slot": "266", + "type": "t_contract(AggregatorV3Interface)45", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:72" + }, + { + "label": "_seenSigners", + "offset": 0, + "slot": "267", + "type": "t_mapping(t_address,t_mapping(t_bytes32,t_bool))", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:73" + }, + { + "label": "totalValueMinted", + "offset": 0, + "slot": "268", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:74" + }, + { + "label": "__gap", + "offset": 0, + "slot": "269", + "type": "t_array(t_uint256)38_storage", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:75" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)38_storage": { + "label": "uint256[38]", + "numberOfBytes": "1216" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(AggregatorV3Interface)45": { + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_contract(IBTC)9454": { + "label": "contract IBTC", + "numberOfBytes": "20" + }, + "t_enum(DLCStatus)7382": { + "label": "enum DLCLink.DLCStatus", + "members": [ + "READY", + "FUNDED", + "CLOSING", + "CLOSED", + "AUX_STATE_1", + "AUX_STATE_2", + "AUX_STATE_3", + "AUX_STATE_4", + "AUX_STATE_5" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_array(t_bytes32)dyn_storage)": { + "label": "mapping(address => bytes32[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_bytes32,t_bool))": { + "label": "mapping(address => mapping(bytes32 => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)793_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(DLC)7412_storage)": { + "label": "mapping(uint256 => struct DLCLink.DLC)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(DLC)7412_storage": { + "label": "struct DLCLink.DLC", + "members": [ + { + "label": "uuid", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "protocolContract", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "timestamp", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "valueLocked", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "creator", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "status", + "type": "t_enum(DLCStatus)7382", + "offset": 20, + "slot": "4" + }, + { + "label": "fundingTxId", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "closingTxId", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "btcFeeRecipient", + "type": "t_string_storage", + "offset": 0, + "slot": "7" + }, + { + "label": "btcMintFeeBasisPoints", + "type": "t_uint256", + "offset": 0, + "slot": "8" + }, + { + "label": "btcRedeemFeeBasisPoints", + "type": "t_uint256", + "offset": 0, + "slot": "9" + }, + { + "label": "taprootPubKey", + "type": "t_string_storage", + "offset": 0, + "slot": "10" + }, + { + "label": "valueMinted", + "type": "t_uint256", + "offset": 0, + "slot": "11" + }, + { + "label": "wdTxId", + "type": "t_string_storage", + "offset": 0, + "slot": "12" + } + ], + "numberOfBytes": "416" + }, + "t_struct(RoleData)793_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint48": { + "label": "uint48", + "numberOfBytes": "6" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } + } + } +} diff --git a/deploymentFiles/bsc/IBTC.json b/deploymentFiles/bsc/IBTC.json new file mode 100644 index 00000000..74b62513 --- /dev/null +++ b/deploymentFiles/bsc/IBTC.json @@ -0,0 +1,48 @@ +{ + "network": "bsc", + "updatedAt": "2024-12-05T11:12:14.467Z", + "gitSHA": "b2522d7", + "contract": { + "name": "IBTC", + "address": "0x25BE3EdD820A8fCE6B8E211F40C5B82Ba176994C", + "signerAddress": "0x9506Ea24038609679732855F757041a3C1C06623", + "abi": [ + "constructor()", + "error NotAuthorized()", + "event Approval(address indexed owner, address indexed spender, uint256 value)", + "event BurnerSet(address burner)", + "event EIP712DomainChanged()", + "event Initialized(uint8 version)", + "event MinterSet(address minter)", + "event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)", + "event Transfer(address indexed from, address indexed to, uint256 value)", + "function DOMAIN_SEPARATOR() view returns (bytes32)", + "function allowance(address owner, address spender) view returns (uint256)", + "function approve(address spender, uint256 amount) returns (bool)", + "function balanceOf(address account) view returns (uint256)", + "function blacklisted(address) view returns (bool)", + "function burn(uint256 amount)", + "function burn(address from, uint256 amount)", + "function decimals() view returns (uint8)", + "function decreaseAllowance(address spender, uint256 subtractedValue) returns (bool)", + "function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)", + "function increaseAllowance(address spender, uint256 addedValue) returns (bool)", + "function initialize()", + "function mint(address to, uint256 amount)", + "function name() view returns (string)", + "function nonces(address owner) view returns (uint256)", + "function owner() view returns (address)", + "function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)", + "function reinitializeEIP712()", + "function renounceOwnership()", + "function setBurner(address burner)", + "function setMinter(address minter)", + "function symbol() view returns (string)", + "function totalSupply() view returns (uint256)", + "function transfer(address to, uint256 amount) returns (bool)", + "function transferFrom(address from, address to, uint256 amount) returns (bool)", + "function transferOwnership(address newOwner)" + ] + }, + "upgradeData": "" +} diff --git a/scripts/helpers/new-chain-setup-mainnet.sh b/scripts/helpers/new-chain-setup-mainnet.sh index 32d8e4c6..dbfa19d8 100755 --- a/scripts/helpers/new-chain-setup-mainnet.sh +++ b/scripts/helpers/new-chain-setup-mainnet.sh @@ -1,5 +1,7 @@ #!/bin/bash +MEDIUM_MULTISIG=0x989a6b15c0c55C0c9FEd6E60a812d9Fb02Ad666E + # Mainnet attestor public keys dlc-link-eth add-signer 0x989E9c4005ABc2a8E4b85544B44d2d95cfDe08de # DLC.Link dlc-link-eth add-signer 0xBe4aAE47A62f67bdF93eA9f5F189ae51B1b54492 # DLC.Link @@ -18,24 +20,24 @@ dlc-link-eth set-btc-fee-recipient 3D8kYzXXsvibCqWUu7RkXZTLcx5DzmckZ2 dlc-link-eth set-threshold 5 -# dlc-link-eth grant-role-on-manager DLC_ADMIN_ROLE $MEDIUM_MULTISIG - -# other todos: -# - transfer ownership of the proxy admin contract to the DLC.Link multisig -# - transfer ownership of the dlcBTC contract to the DLCManager (this is automated) -# - grant DLC_ADMIN_ROLE role to the DLC.Link MEDIUM multisig -# - renounce DLC_ADMIN_ROLE from the deployer -# - initiate DEFAULT_ADMIN_ROLE transfer on DLCManager to the DLC.Link CRITICAL multisig -# - Fund Coordinator with ETH for gas - # - Whitelist Minters - dlc-link-eth whitelist-account 0x0DD4f29E21F10cb2E485cf9bDAb9F2dD1f240Bfa # DLC.Link dlc-link-eth whitelist-account 0x5dd42c5fbf7f784d040c59f1720cdd8c47bbff95 # Amber dlc-link-eth whitelist-account 0xf92893654e38b80dfd9b4a2fb99100dd31ba5e2d # Amber dlc-link-eth whitelist-account 0xff200709bf9bbc5209ba4b5dd767913a8a06b73f # Amber -dlc-link-eth whitelist-account 0x46166fA874AAEDEA8d98b15F9A72C84e22Abe2A1 # SBL has been offboarded +dlc-link-eth whitelist-account 0x46166fA874AAEDEA8d98b15F9A72C84e22Abe2A1 # SBL is being offboarded dlc-link-eth whitelist-account 0x14Ee510Ebd4E5273e83Ad88f6cd2dc228BE40D12 # Tokkalabs dlc-link-eth whitelist-account 0xFc62319bCdfeDB6e55295F3723005593b16A3f9c # Garden dlc-link-eth whitelist-account 0x2816f3528AD324E6089714DA8E89455f58739e68 # Jademont dlc-link-eth whitelist-account 0x707A141c5c19c25E2e6D50b214e39A4293B63234 # PatternResearch + +# - grant DLC_ADMIN_ROLE role to the DLC.Link MEDIUM multisig +dlc-link-eth grant-role-on-manager DLC_ADMIN_ROLE $MEDIUM_MULTISIG +# - renounce DLC_ADMIN_ROLE from the deployer +dlc-link-eth renounce-role-on-manager DLC_ADMIN_ROLE + +# other todos: +# - transfer ownership of the proxy admin contract to the TimelockController +# - transfer ownership of the dlcBTC contract to the DLCManager (this is automated) +# - initiate DEFAULT_ADMIN_ROLE transfer on DLCManager to the DLC.Link CRITICAL multisig +# - Fund Coordinator with ETH for gas From 349d709c76a25f140294fae4792aa424902dd7d0 Mon Sep 17 00:00:00 2001 From: scolear Date: Thu, 5 Dec 2024 15:55:49 +0100 Subject: [PATCH 3/4] chore: bnb deployment --- .openzeppelin/bsc.json | 525 ++++++++++++++++++++ contracts/DLCManager.sol | 2 +- deploymentFiles/bsc/DLCManager.json | 142 ++++++ deploymentFiles/bsc/TimelockController.json | 50 ++ 4 files changed, 718 insertions(+), 1 deletion(-) create mode 100644 deploymentFiles/bsc/DLCManager.json create mode 100644 deploymentFiles/bsc/TimelockController.json diff --git a/.openzeppelin/bsc.json b/.openzeppelin/bsc.json index b726f971..46b5cadb 100644 --- a/.openzeppelin/bsc.json +++ b/.openzeppelin/bsc.json @@ -9,6 +9,11 @@ "address": "0x25BE3EdD820A8fCE6B8E211F40C5B82Ba176994C", "txHash": "0x90bf72d9b9df915a01568f42cf41db446af48ca042650d70bd2dc3a47bb67f6a", "kind": "transparent" + }, + { + "address": "0x5B5773719C927eaee35073Afe188B3d0e576D7C6", + "txHash": "0x8bf45ebb7f8e4b512eaf8fb363565ebb2c970a03e4516f6f8527d20236724520", + "kind": "transparent" } ], "impls": { @@ -799,6 +804,526 @@ }, "namespaces": {} } + }, + "e5404692ec7a03ca71621c94e3b0950701b47d71061c21f0bb12b628a0c1c974": { + "address": "0xe12D1390D3eD201d4610C394CBE11979a352DC56", + "txHash": "0x075fef6a7f2fe402157a771abe16ebf381a7139ba46030b25965615c7682d731", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:63", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:68" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "__gap", + "offset": 0, + "slot": "51", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "101", + "type": "t_mapping(t_bytes32,t_struct(RoleData)793_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:62" + }, + { + "label": "__gap", + "offset": 0, + "slot": "102", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:260" + }, + { + "label": "_pendingDefaultAdmin", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:43" + }, + { + "label": "_pendingDefaultAdminSchedule", + "offset": 20, + "slot": "151", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:44" + }, + { + "label": "_currentDelay", + "offset": 26, + "slot": "151", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:46" + }, + { + "label": "_currentDefaultAdmin", + "offset": 0, + "slot": "152", + "type": "t_address", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:47" + }, + { + "label": "_pendingDelay", + "offset": 20, + "slot": "152", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:50" + }, + { + "label": "_pendingDelaySchedule", + "offset": 26, + "slot": "152", + "type": "t_uint48", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:51" + }, + { + "label": "__gap", + "offset": 0, + "slot": "153", + "type": "t_array(t_uint256)48_storage", + "contract": "AccessControlDefaultAdminRulesUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlDefaultAdminRulesUpgradeable.sol:394" + }, + { + "label": "_paused", + "offset": 0, + "slot": "201", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "202", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_index", + "offset": 0, + "slot": "251", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:49" + }, + { + "label": "dlcs", + "offset": 0, + "slot": "252", + "type": "t_mapping(t_uint256,t_struct(DLC)7412_storage)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:50" + }, + { + "label": "dlcIDsByUUID", + "offset": 0, + "slot": "253", + "type": "t_mapping(t_bytes32,t_uint256)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:51" + }, + { + "label": "_minimumThreshold", + "offset": 0, + "slot": "254", + "type": "t_uint16", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:53" + }, + { + "label": "_threshold", + "offset": 2, + "slot": "254", + "type": "t_uint16", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:54" + }, + { + "label": "_signerCount", + "offset": 4, + "slot": "254", + "type": "t_uint16", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:55" + }, + { + "label": "tssCommitment", + "offset": 0, + "slot": "255", + "type": "t_bytes32", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:56" + }, + { + "label": "attestorGroupPubKey", + "offset": 0, + "slot": "256", + "type": "t_string_storage", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:57" + }, + { + "label": "dlcBTC", + "offset": 0, + "slot": "257", + "type": "t_contract(IBTC)9454", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:61" + }, + { + "label": "btcFeeRecipient", + "offset": 0, + "slot": "258", + "type": "t_string_storage", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:62" + }, + { + "label": "minimumDeposit", + "offset": 0, + "slot": "259", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:63" + }, + { + "label": "maximumDeposit", + "offset": 0, + "slot": "260", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:64" + }, + { + "label": "btcMintFeeRate", + "offset": 0, + "slot": "261", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:65" + }, + { + "label": "btcRedeemFeeRate", + "offset": 0, + "slot": "262", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:66" + }, + { + "label": "whitelistingEnabled", + "offset": 0, + "slot": "263", + "type": "t_bool", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:67" + }, + { + "label": "userVaults", + "offset": 0, + "slot": "264", + "type": "t_mapping(t_address,t_array(t_bytes32)dyn_storage)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:69" + }, + { + "label": "_whitelistedAddresses", + "offset": 0, + "slot": "265", + "type": "t_mapping(t_address,t_bool)", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:70" + }, + { + "label": "porEnabled", + "offset": 0, + "slot": "266", + "type": "t_bool", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:71" + }, + { + "label": "dlcBTCPoRFeed", + "offset": 1, + "slot": "266", + "type": "t_contract(AggregatorV3Interface)45", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:72" + }, + { + "label": "_seenSigners", + "offset": 0, + "slot": "267", + "type": "t_mapping(t_address,t_mapping(t_bytes32,t_bool))", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:73" + }, + { + "label": "totalValueMinted", + "offset": 0, + "slot": "268", + "type": "t_uint256", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:74" + }, + { + "label": "__gap", + "offset": 0, + "slot": "269", + "type": "t_array(t_uint256)38_storage", + "contract": "DLCManager", + "src": "contracts/DLCManager.sol:75" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_array(t_uint256)38_storage": { + "label": "uint256[38]", + "numberOfBytes": "1216" + }, + "t_array(t_uint256)48_storage": { + "label": "uint256[48]", + "numberOfBytes": "1536" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(AggregatorV3Interface)45": { + "label": "contract AggregatorV3Interface", + "numberOfBytes": "20" + }, + "t_contract(IBTC)9454": { + "label": "contract IBTC", + "numberOfBytes": "20" + }, + "t_enum(DLCStatus)7382": { + "label": "enum DLCLink.DLCStatus", + "members": [ + "READY", + "FUNDED", + "CLOSING", + "CLOSED", + "AUX_STATE_1", + "AUX_STATE_2", + "AUX_STATE_3", + "AUX_STATE_4", + "AUX_STATE_5" + ], + "numberOfBytes": "1" + }, + "t_mapping(t_address,t_array(t_bytes32)dyn_storage)": { + "label": "mapping(address => bytes32[])", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_mapping(t_bytes32,t_bool))": { + "label": "mapping(address => mapping(bytes32 => bool))", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_bool)": { + "label": "mapping(bytes32 => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)793_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32" + }, + "t_mapping(t_uint256,t_struct(DLC)7412_storage)": { + "label": "mapping(uint256 => struct DLCLink.DLC)", + "numberOfBytes": "32" + }, + "t_string_storage": { + "label": "string", + "numberOfBytes": "32" + }, + "t_struct(DLC)7412_storage": { + "label": "struct DLCLink.DLC", + "members": [ + { + "label": "uuid", + "type": "t_bytes32", + "offset": 0, + "slot": "0" + }, + { + "label": "protocolContract", + "type": "t_address", + "offset": 0, + "slot": "1" + }, + { + "label": "timestamp", + "type": "t_uint256", + "offset": 0, + "slot": "2" + }, + { + "label": "valueLocked", + "type": "t_uint256", + "offset": 0, + "slot": "3" + }, + { + "label": "creator", + "type": "t_address", + "offset": 0, + "slot": "4" + }, + { + "label": "status", + "type": "t_enum(DLCStatus)7382", + "offset": 20, + "slot": "4" + }, + { + "label": "fundingTxId", + "type": "t_string_storage", + "offset": 0, + "slot": "5" + }, + { + "label": "closingTxId", + "type": "t_string_storage", + "offset": 0, + "slot": "6" + }, + { + "label": "btcFeeRecipient", + "type": "t_string_storage", + "offset": 0, + "slot": "7" + }, + { + "label": "btcMintFeeBasisPoints", + "type": "t_uint256", + "offset": 0, + "slot": "8" + }, + { + "label": "btcRedeemFeeBasisPoints", + "type": "t_uint256", + "offset": 0, + "slot": "9" + }, + { + "label": "taprootPubKey", + "type": "t_string_storage", + "offset": 0, + "slot": "10" + }, + { + "label": "valueMinted", + "type": "t_uint256", + "offset": 0, + "slot": "11" + }, + { + "label": "wdTxId", + "type": "t_string_storage", + "offset": 0, + "slot": "12" + } + ], + "numberOfBytes": "416" + }, + "t_struct(RoleData)793_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint16": { + "label": "uint16", + "numberOfBytes": "2" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint48": { + "label": "uint48", + "numberOfBytes": "6" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/contracts/DLCManager.sol b/contracts/DLCManager.sol index d125b85f..a70c9e75 100644 --- a/contracts/DLCManager.sol +++ b/contracts/DLCManager.sol @@ -150,7 +150,7 @@ contract DLCManager is _index = 0; tssCommitment = 0x0; dlcBTC = tokenContract; - minimumDeposit = 1e6; // 0.01 BTC + minimumDeposit = 1e7; // 0.1 BTC maximumDeposit = 5e8; // 5 BTC whitelistingEnabled = true; btcMintFeeRate = 12; // 0.12% BTC fee for now diff --git a/deploymentFiles/bsc/DLCManager.json b/deploymentFiles/bsc/DLCManager.json new file mode 100644 index 00000000..9f1b689c --- /dev/null +++ b/deploymentFiles/bsc/DLCManager.json @@ -0,0 +1,142 @@ +{ + "network": "bsc", + "updatedAt": "2024-12-05T14:52:42.885Z", + "gitSHA": "6eff735", + "contract": { + "name": "DLCManager", + "address": "0x5B5773719C927eaee35073Afe188B3d0e576D7C6", + "signerAddress": "0x9506Ea24038609679732855F757041a3C1C06623", + "abi": [ + "constructor()", + "error ClosingFundedVault()", + "error ContractNotWhitelisted()", + "error DLCNotFound()", + "error DLCNotFunded()", + "error DLCNotPending()", + "error DLCNotReadyOrFunded()", + "error DepositTooLarge(uint256 deposit, uint256 maximumDeposit)", + "error DepositTooSmall(uint256 deposit, uint256 minimumDeposit)", + "error DuplicateSignature()", + "error DuplicateSigner(address signer)", + "error FeeRateOutOfBounds(uint256 feeRate)", + "error IncompatibleRoles()", + "error InsufficientMintedBalance(uint256 minted, uint256 amount)", + "error InsufficientTokenBalance(uint256 balance, uint256 amount)", + "error InvalidRange()", + "error InvalidSigner()", + "error NoSignerRenouncement()", + "error NotCreatorContract()", + "error NotDLCAdmin()", + "error NotEnoughReserves(uint256 reserves, uint256 amount)", + "error NotEnoughSignatures()", + "error NotOwner()", + "error NotWhitelisted()", + "error SignerNotApproved(address signer)", + "error ThresholdMinimumReached(uint16 _minimumThreshold)", + "error ThresholdTooLow(uint16 _minimumThreshold)", + "error Unauthorized()", + "error UnderCollateralized(uint256 newValueLocked, uint256 valueMinted)", + "event Burn(address from, uint256 amount)", + "event CreateDLC(bytes32 uuid, address creator, uint256 timestamp)", + "event DefaultAdminDelayChangeCanceled()", + "event DefaultAdminDelayChangeScheduled(uint48 newDelay, uint48 effectSchedule)", + "event DefaultAdminTransferCanceled()", + "event DefaultAdminTransferScheduled(address indexed newAdmin, uint48 acceptSchedule)", + "event Initialized(uint8 version)", + "event Mint(address to, uint256 amount)", + "event Paused(address account)", + "event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)", + "event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)", + "event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)", + "event SetBtcFeeRecipient(string btcFeeRecipient)", + "event SetBtcMintFeeRate(uint256 newBtcMintFeeRate)", + "event SetBtcRedeemFeeRate(uint256 newBtcRedeemFeeRate)", + "event SetDlcBTCPoRFeed(address feed)", + "event SetMaximumDeposit(uint256 newMaximumDeposit)", + "event SetMinimumDeposit(uint256 newMinimumDeposit)", + "event SetPorEnabled(bool enabled)", + "event SetStatusFunded(bytes32 uuid, string btcTxId, address creator, uint256 newValueLocked, uint256 amountToMint)", + "event SetStatusPending(bytes32 uuid, string btcTxId, address creator, string taprootPubKey, uint256 newValueLocked)", + "event SetThreshold(uint16 newThreshold)", + "event SetWhitelistingEnabled(bool isWhitelistingEnabled)", + "event TransferTokenContractOwnership(address newOwner)", + "event Unpaused(address account)", + "event UnwhitelistAddress(address addressToUnWhitelist)", + "event WhitelistAddress(address addressToWhitelist)", + "event Withdraw(bytes32 uuid, uint256 amount, address sender)", + "function APPROVED_SIGNER() view returns (bytes32)", + "function DEFAULT_ADMIN_ROLE() view returns (bytes32)", + "function DLC_ADMIN_ROLE() view returns (bytes32)", + "function WHITELISTED_CONTRACT() view returns (bytes32)", + "function acceptDefaultAdminTransfer()", + "function attestorGroupPubKey() view returns (string)", + "function beginDefaultAdminTransfer(address newAdmin)", + "function btcFeeRecipient() view returns (string)", + "function btcMintFeeRate() view returns (uint256)", + "function btcRedeemFeeRate() view returns (uint256)", + "function cancelDefaultAdminTransfer()", + "function changeDefaultAdminDelay(uint48 newDelay)", + "function defaultAdmin() view returns (address)", + "function defaultAdminDelay() view returns (uint48)", + "function defaultAdminDelayIncreaseWait() view returns (uint48)", + "function dlcBTC() view returns (address)", + "function dlcBTCPoRFeed() view returns (address)", + "function dlcIDsByUUID(bytes32) view returns (uint256)", + "function dlcs(uint256) view returns (bytes32 uuid, address protocolContract, uint256 timestamp, uint256 valueLocked, address creator, uint8 status, string fundingTxId, string closingTxId, string btcFeeRecipient, uint256 btcMintFeeBasisPoints, uint256 btcRedeemFeeBasisPoints, string taprootPubKey, uint256 valueMinted, string wdTxId)", + "function getAllDLCs(uint256 startIndex, uint256 endIndex) view returns (tuple(bytes32 uuid, address protocolContract, uint256 timestamp, uint256 valueLocked, address creator, uint8 status, string fundingTxId, string closingTxId, string btcFeeRecipient, uint256 btcMintFeeBasisPoints, uint256 btcRedeemFeeBasisPoints, string taprootPubKey, uint256 valueMinted, string wdTxId)[])", + "function getAllVaultUUIDsForAddress(address owner) view returns (bytes32[])", + "function getAllVaultsForAddress(address owner) view returns (tuple(bytes32 uuid, address protocolContract, uint256 timestamp, uint256 valueLocked, address creator, uint8 status, string fundingTxId, string closingTxId, string btcFeeRecipient, uint256 btcMintFeeBasisPoints, uint256 btcRedeemFeeBasisPoints, string taprootPubKey, uint256 valueMinted, string wdTxId)[])", + "function getDLC(bytes32 uuid) view returns (tuple(bytes32 uuid, address protocolContract, uint256 timestamp, uint256 valueLocked, address creator, uint8 status, string fundingTxId, string closingTxId, string btcFeeRecipient, uint256 btcMintFeeBasisPoints, uint256 btcRedeemFeeBasisPoints, string taprootPubKey, uint256 valueMinted, string wdTxId))", + "function getDLCByIndex(uint256 index) view returns (tuple(bytes32 uuid, address protocolContract, uint256 timestamp, uint256 valueLocked, address creator, uint8 status, string fundingTxId, string closingTxId, string btcFeeRecipient, uint256 btcMintFeeBasisPoints, uint256 btcRedeemFeeBasisPoints, string taprootPubKey, uint256 valueMinted, string wdTxId))", + "function getMinimumThreshold() view returns (uint16)", + "function getRoleAdmin(bytes32 role) view returns (bytes32)", + "function getSignerCount() view returns (uint16)", + "function getThreshold() view returns (uint16)", + "function getVault(bytes32 uuid) view returns (tuple(bytes32 uuid, address protocolContract, uint256 timestamp, uint256 valueLocked, address creator, uint8 status, string fundingTxId, string closingTxId, string btcFeeRecipient, uint256 btcMintFeeBasisPoints, uint256 btcRedeemFeeBasisPoints, string taprootPubKey, uint256 valueMinted, string wdTxId))", + "function grantRole(bytes32 role, address account)", + "function hasRole(bytes32 role, address account) view returns (bool)", + "function initialize(address defaultAdmin, address dlcAdminRole, uint16 threshold, address tokenContract, string btcFeeRecipientToSet)", + "function initializeV2()", + "function isWhitelisted(address account) view returns (bool)", + "function maximumDeposit() view returns (uint256)", + "function minimumDeposit() view returns (uint256)", + "function owner() view returns (address)", + "function pauseContract()", + "function paused() view returns (bool)", + "function pendingDefaultAdmin() view returns (address newAdmin, uint48 schedule)", + "function pendingDefaultAdminDelay() view returns (uint48 newDelay, uint48 schedule)", + "function porEnabled() view returns (bool)", + "function renounceRole(bytes32 role, address account)", + "function revokeRole(bytes32 role, address account)", + "function rollbackDefaultAdminDelay()", + "function setAttestorGroupPubKey(string pubKey)", + "function setBtcFeeRecipient(string btcFeeRecipientToSet)", + "function setBtcFeeRecipientForVault(bytes32 uuid, string btcFeeRecipientToSet)", + "function setBtcMintFeeRate(uint256 newBtcMintFeeRate)", + "function setBtcRedeemFeeRate(uint256 newBtcRedeemFeeRate)", + "function setBurnerOnTokenContract(address burner)", + "function setDlcBTCPoRFeed(address feed)", + "function setMaximumDeposit(uint256 newMaximumDeposit)", + "function setMinimumDeposit(uint256 newMinimumDeposit)", + "function setMinterOnTokenContract(address minter)", + "function setPorEnabled(bool enabled)", + "function setStatusFunded(bytes32 uuid, string btcTxId, bytes[] signatures, uint256 newValueLocked)", + "function setStatusPending(bytes32 uuid, string wdTxId, bytes[] signatures, string taprootPubKey, uint256 newValueLocked)", + "function setTSSCommitment(bytes32 commitment)", + "function setThreshold(uint16 newThreshold)", + "function setWhitelistingEnabled(bool isWhitelistingEnabled)", + "function setupVault() returns (bytes32)", + "function supportsInterface(bytes4 interfaceId) view returns (bool)", + "function totalValueMinted() view returns (uint256)", + "function transferTokenContractOwnership(address newOwner)", + "function tssCommitment() view returns (bytes32)", + "function unpauseContract()", + "function unwhitelistAddress(address addressToUnWhitelist)", + "function userVaults(address, uint256) view returns (bytes32)", + "function whitelistAddress(address addressToWhitelist)", + "function whitelistingEnabled() view returns (bool)", + "function withdraw(bytes32 uuid, uint256 amount)" + ] + }, + "upgradeData": "" +} diff --git a/deploymentFiles/bsc/TimelockController.json b/deploymentFiles/bsc/TimelockController.json new file mode 100644 index 00000000..8d5179b2 --- /dev/null +++ b/deploymentFiles/bsc/TimelockController.json @@ -0,0 +1,50 @@ +{ + "network": "bsc", + "updatedAt": "2024-12-05T14:48:05.329Z", + "gitSHA": "6eff735", + "contract": { + "name": "TimelockController", + "address": "0x2940FcBb3C32901Df405da0E96fd97D1E2a53f34", + "signerAddress": "0x9506Ea24038609679732855F757041a3C1C06623", + "abi": [ + "constructor(uint256 minDelay, address[] proposers, address[] executors, address admin)", + "event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data)", + "event CallSalt(bytes32 indexed id, bytes32 salt)", + "event CallScheduled(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay)", + "event Cancelled(bytes32 indexed id)", + "event MinDelayChange(uint256 oldDuration, uint256 newDuration)", + "event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)", + "event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)", + "event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)", + "function CANCELLER_ROLE() view returns (bytes32)", + "function DEFAULT_ADMIN_ROLE() view returns (bytes32)", + "function EXECUTOR_ROLE() view returns (bytes32)", + "function PROPOSER_ROLE() view returns (bytes32)", + "function TIMELOCK_ADMIN_ROLE() view returns (bytes32)", + "function cancel(bytes32 id)", + "function execute(address target, uint256 value, bytes payload, bytes32 predecessor, bytes32 salt) payable", + "function executeBatch(address[] targets, uint256[] values, bytes[] payloads, bytes32 predecessor, bytes32 salt) payable", + "function getMinDelay() view returns (uint256)", + "function getRoleAdmin(bytes32 role) view returns (bytes32)", + "function getTimestamp(bytes32 id) view returns (uint256)", + "function grantRole(bytes32 role, address account)", + "function hasRole(bytes32 role, address account) view returns (bool)", + "function hashOperation(address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt) pure returns (bytes32)", + "function hashOperationBatch(address[] targets, uint256[] values, bytes[] payloads, bytes32 predecessor, bytes32 salt) pure returns (bytes32)", + "function isOperation(bytes32 id) view returns (bool)", + "function isOperationDone(bytes32 id) view returns (bool)", + "function isOperationPending(bytes32 id) view returns (bool)", + "function isOperationReady(bytes32 id) view returns (bool)", + "function onERC1155BatchReceived(address, address, uint256[], uint256[], bytes) returns (bytes4)", + "function onERC1155Received(address, address, uint256, uint256, bytes) returns (bytes4)", + "function onERC721Received(address, address, uint256, bytes) returns (bytes4)", + "function renounceRole(bytes32 role, address account)", + "function revokeRole(bytes32 role, address account)", + "function schedule(address target, uint256 value, bytes data, bytes32 predecessor, bytes32 salt, uint256 delay)", + "function scheduleBatch(address[] targets, uint256[] values, bytes[] payloads, bytes32 predecessor, bytes32 salt, uint256 delay)", + "function supportsInterface(bytes4 interfaceId) view returns (bool)", + "function updateDelay(uint256 newDelay)" + ] + }, + "upgradeData": "" +} From ee501f064e89da90709030ff1a9fa9b9d26cbc14 Mon Sep 17 00:00:00 2001 From: scolear Date: Thu, 5 Dec 2024 17:31:43 +0100 Subject: [PATCH 4/4] revert on base PoR addy --- scripts/helpers/chainlink-por-addresses.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/helpers/chainlink-por-addresses.js b/scripts/helpers/chainlink-por-addresses.js index f2c75b0a..b6a27693 100644 --- a/scripts/helpers/chainlink-por-addresses.js +++ b/scripts/helpers/chainlink-por-addresses.js @@ -20,7 +20,7 @@ module.exports = async function getPoRAddress(network) { case 'arbsepolia': return ''; case 'base': - return '0x30A76F4E688Cf52f4A06D7AAd987A7037f3Ae6f7'; + return ''; case 'basesepolia': return ''; case 'bsc':