From 40f8c95a7d327adc8a32c79221aaa0570ea7fc2f Mon Sep 17 00:00:00 2001 From: Guilherme Soares Date: Fri, 17 Nov 2023 17:30:30 +0100 Subject: [PATCH] Fixed upgrade script --- .openzeppelin/BKP-rsk-testnet.json | 369 ++++++++++++++++++++++++++++ .openzeppelin/unknown-31.json | 375 +++++++++++++++++++++++++++-- config.json | 66 +++-- migrations/3_upgrade_contracts.js | 50 ++-- 4 files changed, 778 insertions(+), 82 deletions(-) create mode 100644 .openzeppelin/BKP-rsk-testnet.json diff --git a/.openzeppelin/BKP-rsk-testnet.json b/.openzeppelin/BKP-rsk-testnet.json new file mode 100644 index 0000000..b877454 --- /dev/null +++ b/.openzeppelin/BKP-rsk-testnet.json @@ -0,0 +1,369 @@ +{ + "manifestVersion": "3.2", + "admin": { + "address": "0x12ae82B7648d6700B0bca818409d8d6E5F6Bb837", + "txHash": "0x3984cba914a96d1d179dab78e63d249ac1bb0243ee4ec1ae79d86d08c697d1b9" + }, + "proxies": [ + { + "address": "0x4243CD5eb064ce9ABD4e9e2BbDD329E731cACB4B", + "txHash": "0x7e62657983daf16f5d24e18e1aa2798db28275f6117e62ab358f078da5b74bf9", + "kind": "transparent" + } + ], + "impls": { + "3aae3e6115988aceb9d1d0f62d41068dead18ffeb55fbae1acfa0e2626c7c2bc": { + "address": "0x890Ba613295AC96268d7ef028ED1192e4F29C5AA", + "txHash": "0x43105eb5486b4803e394584d10a66d0e230ad76622e3053364ecc5c480636079", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint8", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "../@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80" + }, + { + "contract": "LiquidityBridgeContract", + "label": "bridge", + "type": "t_contract(Bridge)2338", + "src": "../project:/contracts/LiquidityBridgeContract.sol:99" + }, + { + "contract": "LiquidityBridgeContract", + "label": "balances", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:100" + }, + { + "contract": "LiquidityBridgeContract", + "label": "collateral", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:101" + }, + { + "contract": "LiquidityBridgeContract", + "label": "pegoutCollateral", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:102" + }, + { + "contract": "LiquidityBridgeContract", + "label": "liquidityProviders", + "type": "t_mapping(t_uint256,t_struct(LiquidityProvider)4102_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:103" + }, + { + "contract": "LiquidityBridgeContract", + "label": "callRegistry", + "type": "t_mapping(t_bytes32,t_struct(Registry)4084_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:104" + }, + { + "contract": "LiquidityBridgeContract", + "label": "resignationBlockNum", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:105" + }, + { + "contract": "LiquidityBridgeContract", + "label": "minCollateral", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:107" + }, + { + "contract": "LiquidityBridgeContract", + "label": "minPegIn", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:108" + }, + { + "contract": "LiquidityBridgeContract", + "label": "rewardP", + "type": "t_uint32", + "src": "../project:/contracts/LiquidityBridgeContract.sol:110" + }, + { + "contract": "LiquidityBridgeContract", + "label": "resignDelayInBlocks", + "type": "t_uint32", + "src": "../project:/contracts/LiquidityBridgeContract.sol:111" + }, + { + "contract": "LiquidityBridgeContract", + "label": "dust", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:112" + }, + { + "contract": "LiquidityBridgeContract", + "label": "maxQuoteValue", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:113" + }, + { + "contract": "LiquidityBridgeContract", + "label": "providerId", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:114" + }, + { + "contract": "LiquidityBridgeContract", + "label": "btcBlockTime", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:116" + }, + { + "contract": "LiquidityBridgeContract", + "label": "mainnet", + "type": "t_bool", + "src": "../project:/contracts/LiquidityBridgeContract.sol:117" + }, + { + "contract": "LiquidityBridgeContract", + "label": "processedQuotes", + "type": "t_mapping(t_bytes32,t_uint8)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:119" + }, + { + "contract": "LiquidityBridgeContract", + "label": "registeredPegoutQuotes", + "type": "t_mapping(t_bytes32,t_struct(PegOutQuote)7072_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:120" + }, + { + "contract": "LiquidityBridgeContract", + "label": "pegoutRegistry", + "type": "t_mapping(t_bytes32,t_struct(PegoutRecord)4089_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:121" + } + ], + "types": { + "t_contract(Bridge)2338": { + "label": "contract Bridge" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)" + }, + "t_address": { + "label": "address" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_uint256,t_struct(LiquidityProvider)4102_storage)": { + "label": "mapping(uint256 => struct LiquidityBridgeContract.LiquidityProvider)" + }, + "t_struct(LiquidityProvider)4102_storage": { + "label": "struct LiquidityBridgeContract.LiquidityProvider", + "members": [ + { + "label": "id", + "type": "t_uint256" + }, + { + "label": "provider", + "type": "t_address" + }, + { + "label": "name", + "type": "t_string_storage" + }, + { + "label": "apiBaseUrl", + "type": "t_string_storage" + }, + { + "label": "status", + "type": "t_bool" + }, + { + "label": "providerType", + "type": "t_string_storage" + } + ] + }, + "t_string_storage": { + "label": "string" + }, + "t_bool": { + "label": "bool" + }, + "t_mapping(t_bytes32,t_struct(Registry)4084_storage)": { + "label": "mapping(bytes32 => struct LiquidityBridgeContract.Registry)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(Registry)4084_storage": { + "label": "struct LiquidityBridgeContract.Registry", + "members": [ + { + "label": "timestamp", + "type": "t_uint32" + }, + { + "label": "success", + "type": "t_bool" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_uint8)": { + "label": "mapping(bytes32 => uint8)" + }, + "t_uint8": { + "label": "uint8" + }, + "t_mapping(t_bytes32,t_struct(PegOutQuote)7072_storage)": { + "label": "mapping(bytes32 => struct Quotes.PegOutQuote)" + }, + "t_struct(PegOutQuote)7072_storage": { + "label": "struct Quotes.PegOutQuote", + "members": [ + { + "label": "lbcAddress", + "type": "t_address" + }, + { + "label": "lpRskAddress", + "type": "t_address" + }, + { + "label": "btcRefundAddress", + "type": "t_bytes_storage" + }, + { + "label": "rskRefundAddress", + "type": "t_address" + }, + { + "label": "lpBtcAddress", + "type": "t_bytes_storage" + }, + { + "label": "callFee", + "type": "t_uint256" + }, + { + "label": "penaltyFee", + "type": "t_uint256" + }, + { + "label": "nonce", + "type": "t_int64" + }, + { + "label": "deposityAddress", + "type": "t_bytes_storage" + }, + { + "label": "value", + "type": "t_uint256" + }, + { + "label": "agreementTimestamp", + "type": "t_uint32" + }, + { + "label": "depositDateLimit", + "type": "t_uint32" + }, + { + "label": "depositConfirmations", + "type": "t_uint16" + }, + { + "label": "transferConfirmations", + "type": "t_uint16" + }, + { + "label": "transferTime", + "type": "t_uint32" + }, + { + "label": "expireDate", + "type": "t_uint32" + }, + { + "label": "expireBlock", + "type": "t_uint32" + } + ] + }, + "t_bytes_storage": { + "label": "bytes" + }, + "t_int64": { + "label": "int64" + }, + "t_uint16": { + "label": "uint16" + }, + "t_mapping(t_bytes32,t_struct(PegoutRecord)4089_storage)": { + "label": "mapping(bytes32 => struct LiquidityBridgeContract.PegoutRecord)" + }, + "t_struct(PegoutRecord)4089_storage": { + "label": "struct LiquidityBridgeContract.PegoutRecord", + "members": [ + { + "label": "depositTimestamp", + "type": "t_uint256" + }, + { + "label": "completed", + "type": "t_bool" + } + ] + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } + } + } +} diff --git a/.openzeppelin/unknown-31.json b/.openzeppelin/unknown-31.json index b877454..0210ee2 100644 --- a/.openzeppelin/unknown-31.json +++ b/.openzeppelin/unknown-31.json @@ -1,20 +1,20 @@ { "manifestVersion": "3.2", "admin": { - "address": "0x12ae82B7648d6700B0bca818409d8d6E5F6Bb837", - "txHash": "0x3984cba914a96d1d179dab78e63d249ac1bb0243ee4ec1ae79d86d08c697d1b9" + "address": "0xb77900eaC31c3E5CE26432807d5efFE9Ac06455f", + "txHash": "0x820ece21f6e73508041ac5c816d2d6cc65da196092680288f4464b5f0d13995d" }, "proxies": [ { - "address": "0x4243CD5eb064ce9ABD4e9e2BbDD329E731cACB4B", - "txHash": "0x7e62657983daf16f5d24e18e1aa2798db28275f6117e62ab358f078da5b74bf9", + "address": "0x2A4C1373A52D65943b9043062052534F7724c356", + "txHash": "0x420730553de36e6fa322abe5d3dd73b108206d99a35869513eee48ad7612f77e", "kind": "transparent" } ], "impls": { - "3aae3e6115988aceb9d1d0f62d41068dead18ffeb55fbae1acfa0e2626c7c2bc": { - "address": "0x890Ba613295AC96268d7ef028ED1192e4F29C5AA", - "txHash": "0x43105eb5486b4803e394584d10a66d0e230ad76622e3053364ecc5c480636079", + "da0a0546183d529a4b5c14527febccd2de6a0f30fcbe26cf815fb6b6ead1d595": { + "address": "0xbE1fa1653CB617A7Cad8DD3f0409D0801fEc5850", + "txHash": "0xecc3ec11f1afbf6c9ea26875fef6182e595c41df1bd2e7f762ebafebe6c0c685", "layout": { "solcVersion": "0.8.18", "storage": [ @@ -135,45 +135,386 @@ }, { "contract": "LiquidityBridgeContract", - "label": "maxQuoteValue", + "label": "providerId", "type": "t_uint256", "src": "../project:/contracts/LiquidityBridgeContract.sol:113" }, + { + "contract": "LiquidityBridgeContract", + "label": "btcBlockTime", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:115" + }, + { + "contract": "LiquidityBridgeContract", + "label": "mainnet", + "type": "t_bool", + "src": "../project:/contracts/LiquidityBridgeContract.sol:116" + }, + { + "contract": "LiquidityBridgeContract", + "label": "processedQuotes", + "type": "t_mapping(t_bytes32,t_uint8)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:118" + }, + { + "contract": "LiquidityBridgeContract", + "label": "registeredPegoutQuotes", + "type": "t_mapping(t_bytes32,t_struct(PegOutQuote)7060_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:119" + }, + { + "contract": "LiquidityBridgeContract", + "label": "pegoutRegistry", + "type": "t_mapping(t_bytes32,t_struct(PegoutRecord)4089_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:120" + } + ], + "types": { + "t_contract(Bridge)2338": { + "label": "contract Bridge" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)" + }, + "t_address": { + "label": "address" + }, + "t_uint256": { + "label": "uint256" + }, + "t_mapping(t_uint256,t_struct(LiquidityProvider)4102_storage)": { + "label": "mapping(uint256 => struct LiquidityBridgeContract.LiquidityProvider)" + }, + "t_struct(LiquidityProvider)4102_storage": { + "label": "struct LiquidityBridgeContract.LiquidityProvider", + "members": [ + { + "label": "id", + "type": "t_uint256" + }, + { + "label": "provider", + "type": "t_address" + }, + { + "label": "name", + "type": "t_string_storage" + }, + { + "label": "apiBaseUrl", + "type": "t_string_storage" + }, + { + "label": "status", + "type": "t_bool" + }, + { + "label": "providerType", + "type": "t_string_storage" + } + ] + }, + "t_string_storage": { + "label": "string" + }, + "t_bool": { + "label": "bool" + }, + "t_mapping(t_bytes32,t_struct(Registry)4084_storage)": { + "label": "mapping(bytes32 => struct LiquidityBridgeContract.Registry)" + }, + "t_bytes32": { + "label": "bytes32" + }, + "t_struct(Registry)4084_storage": { + "label": "struct LiquidityBridgeContract.Registry", + "members": [ + { + "label": "timestamp", + "type": "t_uint32" + }, + { + "label": "success", + "type": "t_bool" + } + ] + }, + "t_uint32": { + "label": "uint32" + }, + "t_mapping(t_bytes32,t_uint8)": { + "label": "mapping(bytes32 => uint8)" + }, + "t_uint8": { + "label": "uint8" + }, + "t_mapping(t_bytes32,t_struct(PegOutQuote)7060_storage)": { + "label": "mapping(bytes32 => struct Quotes.PegOutQuote)" + }, + "t_struct(PegOutQuote)7060_storage": { + "label": "struct Quotes.PegOutQuote", + "members": [ + { + "label": "lbcAddress", + "type": "t_address" + }, + { + "label": "lpRskAddress", + "type": "t_address" + }, + { + "label": "btcRefundAddress", + "type": "t_bytes_storage" + }, + { + "label": "rskRefundAddress", + "type": "t_address" + }, + { + "label": "lpBtcAddress", + "type": "t_bytes_storage" + }, + { + "label": "callFee", + "type": "t_uint256" + }, + { + "label": "penaltyFee", + "type": "t_uint256" + }, + { + "label": "nonce", + "type": "t_int64" + }, + { + "label": "deposityAddress", + "type": "t_bytes_storage" + }, + { + "label": "value", + "type": "t_uint256" + }, + { + "label": "agreementTimestamp", + "type": "t_uint32" + }, + { + "label": "depositDateLimit", + "type": "t_uint32" + }, + { + "label": "depositConfirmations", + "type": "t_uint16" + }, + { + "label": "transferConfirmations", + "type": "t_uint16" + }, + { + "label": "transferTime", + "type": "t_uint32" + }, + { + "label": "expireDate", + "type": "t_uint32" + }, + { + "label": "expireBlock", + "type": "t_uint32" + } + ] + }, + "t_bytes_storage": { + "label": "bytes" + }, + "t_int64": { + "label": "int64" + }, + "t_uint16": { + "label": "uint16" + }, + "t_mapping(t_bytes32,t_struct(PegoutRecord)4089_storage)": { + "label": "mapping(bytes32 => struct LiquidityBridgeContract.PegoutRecord)" + }, + "t_struct(PegoutRecord)4089_storage": { + "label": "struct LiquidityBridgeContract.PegoutRecord", + "members": [ + { + "label": "depositTimestamp", + "type": "t_uint256" + }, + { + "label": "completed", + "type": "t_bool" + } + ] + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]" + } + } + } + }, + "90a13b12a1c79105378a05e67d9bb92fa14e6fa39baa8d1a8df8c8987ffc4c88": { + "address": "0xe09e975980C467b06B154Ec804FBe65022b58007", + "txHash": "0x0adac3c853f836ef2fc96a0c134d6e1efb366fbf8db3ef0c51f613ea6c64933d", + "layout": { + "solcVersion": "0.8.18", + "storage": [ + { + "contract": "Initializable", + "label": "_initialized", + "type": "t_uint8", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "contract": "Initializable", + "label": "_initializing", + "type": "t_bool", + "src": "../@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "contract": "ContextUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)50_storage", + "src": "../@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "contract": "OwnableUpgradeable", + "label": "_owner", + "type": "t_address", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "contract": "OwnableUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "_status", + "type": "t_uint256", + "src": "../@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "contract": "ReentrancyGuardUpgradeable", + "label": "__gap", + "type": "t_array(t_uint256)49_storage", + "src": "../@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:80" + }, + { + "contract": "LiquidityBridgeContract", + "label": "bridge", + "type": "t_contract(Bridge)2338", + "src": "../project:/contracts/LiquidityBridgeContract.sol:99" + }, + { + "contract": "LiquidityBridgeContract", + "label": "balances", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:100" + }, + { + "contract": "LiquidityBridgeContract", + "label": "collateral", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:101" + }, + { + "contract": "LiquidityBridgeContract", + "label": "pegoutCollateral", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:102" + }, + { + "contract": "LiquidityBridgeContract", + "label": "liquidityProviders", + "type": "t_mapping(t_uint256,t_struct(LiquidityProvider)4102_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:103" + }, + { + "contract": "LiquidityBridgeContract", + "label": "callRegistry", + "type": "t_mapping(t_bytes32,t_struct(Registry)4084_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:104" + }, + { + "contract": "LiquidityBridgeContract", + "label": "resignationBlockNum", + "type": "t_mapping(t_address,t_uint256)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:105" + }, + { + "contract": "LiquidityBridgeContract", + "label": "minCollateral", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:107" + }, + { + "contract": "LiquidityBridgeContract", + "label": "minPegIn", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:108" + }, + { + "contract": "LiquidityBridgeContract", + "label": "rewardP", + "type": "t_uint32", + "src": "../project:/contracts/LiquidityBridgeContract.sol:110" + }, + { + "contract": "LiquidityBridgeContract", + "label": "resignDelayInBlocks", + "type": "t_uint32", + "src": "../project:/contracts/LiquidityBridgeContract.sol:111" + }, + { + "contract": "LiquidityBridgeContract", + "label": "dust", + "type": "t_uint256", + "src": "../project:/contracts/LiquidityBridgeContract.sol:112" + }, { "contract": "LiquidityBridgeContract", "label": "providerId", "type": "t_uint256", - "src": "../project:/contracts/LiquidityBridgeContract.sol:114" + "src": "../project:/contracts/LiquidityBridgeContract.sol:113" }, { "contract": "LiquidityBridgeContract", "label": "btcBlockTime", "type": "t_uint256", - "src": "../project:/contracts/LiquidityBridgeContract.sol:116" + "src": "../project:/contracts/LiquidityBridgeContract.sol:115" }, { "contract": "LiquidityBridgeContract", "label": "mainnet", "type": "t_bool", - "src": "../project:/contracts/LiquidityBridgeContract.sol:117" + "src": "../project:/contracts/LiquidityBridgeContract.sol:116" }, { "contract": "LiquidityBridgeContract", "label": "processedQuotes", "type": "t_mapping(t_bytes32,t_uint8)", - "src": "../project:/contracts/LiquidityBridgeContract.sol:119" + "src": "../project:/contracts/LiquidityBridgeContract.sol:118" }, { "contract": "LiquidityBridgeContract", "label": "registeredPegoutQuotes", - "type": "t_mapping(t_bytes32,t_struct(PegOutQuote)7072_storage)", - "src": "../project:/contracts/LiquidityBridgeContract.sol:120" + "type": "t_mapping(t_bytes32,t_struct(PegOutQuote)7068_storage)", + "src": "../project:/contracts/LiquidityBridgeContract.sol:119" }, { "contract": "LiquidityBridgeContract", "label": "pegoutRegistry", "type": "t_mapping(t_bytes32,t_struct(PegoutRecord)4089_storage)", - "src": "../project:/contracts/LiquidityBridgeContract.sol:121" + "src": "../project:/contracts/LiquidityBridgeContract.sol:120" } ], "types": { @@ -255,10 +596,10 @@ "t_uint8": { "label": "uint8" }, - "t_mapping(t_bytes32,t_struct(PegOutQuote)7072_storage)": { + "t_mapping(t_bytes32,t_struct(PegOutQuote)7068_storage)": { "label": "mapping(bytes32 => struct Quotes.PegOutQuote)" }, - "t_struct(PegOutQuote)7072_storage": { + "t_struct(PegOutQuote)7068_storage": { "label": "struct Quotes.PegOutQuote", "members": [ { diff --git a/config.json b/config.json index 4f514f6..259ffc6 100644 --- a/config.json +++ b/config.json @@ -1,58 +1,24 @@ { - "rskTestnet": { - "SafeMath": { - "address": "0x343714bf746AcaF55BC1BAF93D2C47E42A762eC1", - "deployed": false - }, - "SignatureValidator": { - "address": "0x698736e3433E664FE513EC6707EB81b3D2476700", - "deployed": true - }, - "LiquidityBridgeContractAdmin": { - "address": "0x1de4FF655DC7BC289cCa9D232755005265B4C94b", - "deployed": false - }, - "LiquidityBridgeContract": { - "address": "0x4243CD5eb064ce9ABD4e9e2BbDD329E731cACB4B", - "deployed": true - }, - "LiquidityBridgeContractProxy": { - "address": "0x81e0038E7b88496cf3CdDd684f74711e5451870B", - "deployed": false - }, - "Migrations": { - "address": "0x08ff8FB2C85e2840f29c974fa01658a93E4b4fF9", - "deployed": true - }, - "Quotes": { - "address": "0x28e84E9754BceF023f6529B6697728Bea6465aA2", - "deployed": true - }, - "BtcUtils": { - "address": "0xf64f4f7D9970810B1b9c611dd32c0c182454b525", - "deployed": true - } - }, "rskRegtest": { "Migrations": { "address": "0x1Af2844A588759D0DE58abD568ADD96BB8B3B6D8", - "deployed": true + "deployed": false }, "SignatureValidator": { "address": "0xCd5805d60Bbf9Afe69a394c2BDa10F6Dae2c39AF", - "deployed": true + "deployed": false }, "Quotes": { "address": "0xdac5481925A298B95Bf5b54c35b68FC6fc2eF423", - "deployed": true + "deployed": false }, "BtcUtils": { "address": "0xfD1dda8C3BC734Bc1C8e71F69F25BFBEe9cE9535", - "deployed": true + "deployed": false }, "LiquidityBridgeContract": { "address": "0x987c1f13d417F7E04d852B44badc883E4E9782e1", - "deployed": true + "deployed": false } }, "alphanet": { @@ -102,5 +68,27 @@ "address": "0xAA9cAf1e3967600578727F975F283446A3Da6612", "deployed": true } + }, + "rskTestnet": { + "Migrations": { + "address": "0xD35900b447AA1f18B42d26372660b7FE7d9aEB9C", + "deployed": true + }, + "SignatureValidator": { + "address": "0x6905711e16AFBC51d8cf2a714479D14FB3e03281", + "deployed": true + }, + "Quotes": { + "address": "0x8384952Dc2A3e413800e9D4EE89d7383FA12Af10", + "deployed": true + }, + "BtcUtils": { + "address": "0x52b0108b38Ae80305F92FC461026e4c200ed673E", + "deployed": true + }, + "LiquidityBridgeContract": { + "address": "0x2A4C1373A52D65943b9043062052534F7724c356", + "deployed": true + } } } \ No newline at end of file diff --git a/migrations/3_upgrade_contracts.js b/migrations/3_upgrade_contracts.js index 36bc1c7..d46cf52 100644 --- a/migrations/3_upgrade_contracts.js +++ b/migrations/3_upgrade_contracts.js @@ -9,34 +9,32 @@ const { deploy, read } = require("../config"); module.exports = async function (deployer, network) { let config = read(); - config = await deploy("LiquidityBridgeContract", network, async (state) => { - if (network === 'test') { - console.log("Upgrade isn't executed during tests"); - return; - } + console.log(network); + if (network === 'test') { + console.log("Upgrade isn't executed during tests"); + return; + } - const signatureValidatorLib = await SignatureValidator.at( - config[network]["SignatureValidator"].address - ); - await deployer.link(signatureValidatorLib, LiquidityBridgeContract); + const signatureValidatorLib = await SignatureValidator.at( + config[network]["SignatureValidator"].address + ); + await deployer.link(signatureValidatorLib, LiquidityBridgeContract); - const quotesLib = await Quotes.at( - config[network]["Quotes"].address - ); - await deployer.link(quotesLib, LiquidityBridgeContract); + const quotesLib = await Quotes.at( + config[network]["Quotes"].address + ); + await deployer.link(quotesLib, LiquidityBridgeContract); - const btcUtilsLib = await BtcUtils.at( - config[network]["BtcUtils"].address - ); - await deployer.link(btcUtilsLib, LiquidityBridgeContract); + const btcUtilsLib = await BtcUtils.at( + config[network]["BtcUtils"].address + ); + await deployer.link(btcUtilsLib, LiquidityBridgeContract); - const existing = config[network]["LiquidityBridgeContract"] - const response = await upgradeProxy( - existing.address, - LiquidityBridgeContract, - { deployer, unsafeAllowLinkedLibraries: true } - ); - console.log("Upgraded", response.address); - state.address = response.address; - }); + const existing = config[network]["LiquidityBridgeContract"] + const response = await upgradeProxy( + existing.address, + LiquidityBridgeContract, + { deployer, unsafeAllowLinkedLibraries: true } + ); + console.log("Upgraded", response.address); };