@keep-network/tbtc-v2 1.6.0-dev.1 → 1.6.0-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/artifacts/BLS.json +1 -1
  2. package/artifacts/Bank.json +3 -3
  3. package/artifacts/BeaconAuthorization.json +1 -1
  4. package/artifacts/BeaconDkg.json +1 -1
  5. package/artifacts/BeaconDkgValidator.json +1 -1
  6. package/artifacts/BeaconInactivity.json +1 -1
  7. package/artifacts/BeaconSortitionPool.json +3 -3
  8. package/artifacts/Bridge.json +5 -5
  9. package/artifacts/BridgeGovernance.json +2 -2
  10. package/artifacts/BridgeGovernanceParameters.json +2 -2
  11. package/artifacts/Deposit.json +2 -2
  12. package/artifacts/DepositSweep.json +2 -2
  13. package/artifacts/DonationVault.json +3 -3
  14. package/artifacts/EcdsaDkgValidator.json +1 -1
  15. package/artifacts/EcdsaInactivity.json +1 -1
  16. package/artifacts/EcdsaSortitionPool.json +3 -3
  17. package/artifacts/Fraud.json +2 -2
  18. package/artifacts/KeepRegistry.json +1 -1
  19. package/artifacts/KeepStake.json +2 -2
  20. package/artifacts/KeepToken.json +2 -2
  21. package/artifacts/KeepTokenStaking.json +1 -1
  22. package/artifacts/LightRelay.json +3 -3
  23. package/artifacts/LightRelayMaintainerProxy.json +3 -3
  24. package/artifacts/MaintainerProxy.json +3 -3
  25. package/artifacts/MovingFunds.json +2 -2
  26. package/artifacts/NuCypherStakingEscrow.json +1 -1
  27. package/artifacts/NuCypherToken.json +2 -2
  28. package/artifacts/RandomBeacon.json +2 -2
  29. package/artifacts/RandomBeaconChaosnet.json +2 -2
  30. package/artifacts/RandomBeaconGovernance.json +2 -2
  31. package/artifacts/Redemption.json +2 -2
  32. package/artifacts/ReimbursementPool.json +2 -2
  33. package/artifacts/T.json +2 -2
  34. package/artifacts/TBTC.json +3 -3
  35. package/artifacts/TBTCToken.json +3 -3
  36. package/artifacts/TBTCVault.json +23 -23
  37. package/artifacts/TokenStaking.json +1 -1
  38. package/artifacts/TokenholderGovernor.json +9 -9
  39. package/artifacts/TokenholderTimelock.json +8 -8
  40. package/artifacts/VendingMachine.json +3 -3
  41. package/artifacts/VendingMachineKeep.json +1 -1
  42. package/artifacts/VendingMachineNuCypher.json +1 -1
  43. package/artifacts/VendingMachineV2.json +3 -3
  44. package/artifacts/VendingMachineV3.json +3 -3
  45. package/artifacts/WalletCoordinator.json +5 -5
  46. package/artifacts/WalletRegistry.json +5 -5
  47. package/artifacts/WalletRegistryGovernance.json +2 -2
  48. package/artifacts/Wallets.json +2 -2
  49. package/artifacts/solcInputs/{9c1bc2cca49796c7f9e7712adfa86bb8.json → d2d7e276da75d7184610fe11a4a103b7.json} +3 -0
  50. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  51. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  52. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
  53. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  54. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  55. package/build/contracts/bridge/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.dbg.json +1 -1
  56. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  57. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  58. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
  59. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  60. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  61. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +1 -1
  62. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  63. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  64. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  65. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  66. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  67. package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.dbg.json +1 -1
  68. package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +1 -1
  69. package/build/contracts/bridge/WalletCoordinator.sol/WalletCoordinator.dbg.json +1 -1
  70. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  71. package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
  72. package/build/contracts/l2/L2WormholeGateway.sol/IWormholeTokenBridge.dbg.json +1 -1
  73. package/build/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.dbg.json +1 -1
  74. package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
  75. package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
  76. package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
  77. package/build/contracts/relay/LightRelay.sol/RelayUtils.dbg.json +1 -1
  78. package/build/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.dbg.json +1 -1
  79. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  80. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +1 -1
  81. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  82. package/build/contracts/vault/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
  83. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  84. package/deploy/01_deploy_light_relay.ts +3 -0
  85. package/deploy/09_deploy_bridge_governance.ts +5 -2
  86. package/deploy/19_authorize_spv_maintainer_in_bridge.ts +3 -3
  87. package/deploy/24_transfer_tbtc_ownership.ts +1 -1
  88. package/deploy/28_authorize_bridge_in_reimbursement_pool.ts +1 -1
  89. package/deploy/40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.ts +1 -1
  90. package/deploy/41_authorize_light_relay_maintainer_proxy_in_light_relay.ts +3 -1
  91. package/export/artifacts/@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol/BTCUtils.json +20 -20
  92. package/export/artifacts/@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol/EcdsaDkgValidator.json +1986 -1986
  93. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol/EcdsaDkg.json +20 -20
  94. package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaInactivity.sol/EcdsaInactivity.json +1836 -1836
  95. package/export/artifacts/@keep-network/random-beacon/contracts/ReimbursementPool.sol/ReimbursementPool.json +545 -545
  96. package/export/artifacts/@keep-network/sortition-pools/contracts/Chaosnet.sol/Chaosnet.json +506 -506
  97. package/export/artifacts/@keep-network/sortition-pools/contracts/Rewards.sol/Rewards.json +23 -23
  98. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionPool.sol/SortitionPool.json +2456 -2456
  99. package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionTree.sol/SortitionTree.json +465 -465
  100. package/export/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +568 -568
  101. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +603 -603
  102. package/export/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +1001 -1001
  103. package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +1877 -1877
  104. package/export/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +654 -654
  105. package/export/artifacts/@thesis/solidity-contracts/contracts/token/ERC20WithPermit.sol/ERC20WithPermit.json +2534 -2534
  106. package/export/artifacts/@thesis/solidity-contracts/contracts/token/MisfundRecovery.sol/MisfundRecovery.json +736 -736
  107. package/export/artifacts/contracts/bank/Bank.sol/Bank.json +1872 -1872
  108. package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +7061 -7061
  109. package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +1257 -1257
  110. package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +972 -972
  111. package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +1122 -1122
  112. package/export/artifacts/contracts/bridge/WalletCoordinator.sol/WalletCoordinator.json +5403 -5403
  113. package/export/artifacts/contracts/l2/L2TBTC.sol/L2TBTC.json +2961 -2961
  114. package/export/artifacts/contracts/l2/L2WormholeGateway.sol/L2WormholeGateway.json +2442 -2442
  115. package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +2305 -2305
  116. package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +1864 -1864
  117. package/export/artifacts/contracts/relay/LightRelayMaintainerProxy.sol/LightRelayMaintainerProxy.json +982 -982
  118. package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +1872 -1872
  119. package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +8064 -8064
  120. package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +1864 -1864
  121. package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +127 -127
  122. package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +1987 -1987
  123. package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +346 -346
  124. package/export/artifacts/contracts/test/SepoliaLightRelay.sol/SepoliaLightRelay.json +12024 -0
  125. package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +568 -568
  126. package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +2291 -2291
  127. package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +1698 -1698
  128. package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +189 -189
  129. package/export/artifacts/contracts/test/WormholeBridgeStub.sol/WormholeBridgeStub.json +1443 -1443
  130. package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2847 -2847
  131. package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +858 -858
  132. package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +3476 -3476
  133. package/export/deploy/01_deploy_light_relay.js +3 -0
  134. package/export/deploy/09_deploy_bridge_governance.js +4 -2
  135. package/export/deploy/19_authorize_spv_maintainer_in_bridge.js +3 -3
  136. package/export/deploy/24_transfer_tbtc_ownership.js +1 -1
  137. package/export/deploy/28_authorize_bridge_in_reimbursement_pool.js +1 -1
  138. package/export/deploy/40_authorize_light_relay_maintainer_proxy_in_reimbursement_pool.js +1 -1
  139. package/export/deploy/41_authorize_light_relay_maintainer_proxy_in_light_relay.js +7 -3
  140. package/export/hardhat.config.js +24 -1
  141. package/export/typechain/SepoliaLightRelay.js +2 -0
  142. package/export/typechain/factories/SepoliaLightRelay__factory.js +535 -0
  143. package/export/typechain/index.js +3 -1
  144. package/package.json +1 -1
@@ -42,6 +42,9 @@ var func = function (hre) {
42
42
  if (hre.network.name === "goerli") {
43
43
  return "GoerliLightRelay";
44
44
  }
45
+ if (hre.network.name === "sepolia") {
46
+ return "SepoliaLightRelay";
47
+ }
45
48
  if (hre.network.name === "system_tests") {
46
49
  return "SystemTestRelay";
47
50
  }
@@ -55,11 +55,13 @@ var func = function (hre) {
55
55
  log: true,
56
56
  waitConfirmations: 1,
57
57
  })
58
- // 60 seconds for Goerli. 48 hours otherwise.
58
+ // 60 seconds for Goerli/Sepolia. 48 hours otherwise.
59
59
  ];
60
60
  case 3:
61
61
  bridgeGovernanceParameters = _a.sent();
62
- GOVERNANCE_DELAY = hre.network.name === "goerli" ? 60 : 172800;
62
+ GOVERNANCE_DELAY = hre.network.name === "goerli" || hre.network.name === "sepolia"
63
+ ? 60
64
+ : 172800;
63
65
  return [4 /*yield*/, deploy("BridgeGovernance", {
64
66
  contract: "BridgeGovernance",
65
67
  from: deployer,
@@ -59,9 +59,9 @@ exports.default = func;
59
59
  func.tags = ["AuthorizeSpvMaintainer"];
60
60
  func.dependencies = ["Bridge"];
61
61
  // SPV maintainer can submit SPV proofs to the Bridge. We authorize spvMaintainer
62
- // account for Hardhat network (unit tests) and Goerli (testnet) but we DO NOT
63
- // want to authorize it for Mainnet deployment. SPV maintainer will be authorized
64
- // separately by the Governance when sweeping will be activated.
62
+ // account for Hardhat network (unit tests) and Goerli/Sepolia (testnets) but we
63
+ // DO NOT want to authorize it for Mainnet deployment. SPV maintainer will be
64
+ // authorized separately by the Governance when sweeping will be activated.
65
65
  //
66
66
  // Note that at this point MaintainerProxy contract is already authorized in the
67
67
  // Bridge (see AuthorizeMaintainerProxyInBridge tag).
@@ -47,7 +47,7 @@ var func = function (hre) {
47
47
  // In unit tests we cover VendingMachine, VendingMachineV2, and TBTCVault
48
48
  // contracts. All those tests require minting TBTC. To make the test setup
49
49
  // easier, we leave the responsibility of transferring the TBTC ownership
50
- // to the test. In system tests and on Goerli, TBTCVault is the owner of TBTC
50
+ // to the test. In system tests and on testnet, TBTCVault is the owner of TBTC
51
51
  // token, just like on v1.0 mainnet, after transferring the ownership from the
52
52
  // VendingMachine.
53
53
  ];
@@ -64,7 +64,7 @@ func.dependencies = ["ReimbursementPool", "Bridge"];
64
64
  // On mainnet, the ReimbursementPool ownership is passed to the Threshold
65
65
  // Council / DAO and that address is not controlled by the dev team.
66
66
  // Hence, this step can be executed only for non-mainnet networks such as
67
- // Hardhat (unit tests) and Goerli (testnet).
67
+ // Hardhat (unit tests) and Goerli or Sepolia (testnets).
68
68
  func.skip = function (hre) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
69
69
  return [2 /*return*/, hre.network.name === "mainnet"];
70
70
  }); }); };
@@ -64,7 +64,7 @@ func.dependencies = ["ReimbursementPool", "LightRelayMaintainerProxy"];
64
64
  // On mainnet, the ReimbursementPool ownership is passed to the Threshold
65
65
  // Council / DAO and that address is not controlled by the dev team.
66
66
  // Hence, this step can be executed only for non-mainnet networks such as
67
- // Hardhat (unit tests) and Goerli (testnet).
67
+ // Hardhat (unit tests) and Goerli or Sepolia (testnets).
68
68
  func.skip = function (hre) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
69
69
  return [2 /*return*/, hre.network.name === "mainnet"];
70
70
  }); }); };
@@ -61,6 +61,10 @@ var func = function (hre) {
61
61
  exports.default = func;
62
62
  func.tags = ["AuthorizeLightRelayMaintainerProxyInLightRelay"];
63
63
  func.dependencies = ["LightRelay", "LightRelayMaintainerProxy"];
64
- func.skip = function (hre) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
65
- return [2 /*return*/, hre.network.name === "goerli" || hre.network.name === "system_tests"];
66
- }); }); };
64
+ func.skip = function (hre) { return __awaiter(void 0, void 0, void 0, function () {
65
+ return __generator(this, function (_a) {
66
+ return [2 /*return*/, hre.network.name === "goerli" ||
67
+ hre.network.name === "sepolia" ||
68
+ hre.network.name === "system_tests"];
69
+ });
70
+ }); };
@@ -91,7 +91,7 @@ var config = {
91
91
  allowUnlimitedContractSize: process.env.TEST_USE_STUBS_TBTC === "true",
92
92
  },
93
93
  system_tests: {
94
- url: "http://localhost:8545",
94
+ url: "http://127.0.0.1:8545",
95
95
  tags: ["allowStubs"],
96
96
  },
97
97
  development: {
@@ -107,6 +107,14 @@ var config = {
107
107
  : undefined,
108
108
  tags: ["tenderly"],
109
109
  },
110
+ sepolia: {
111
+ url: process.env.CHAIN_API_URL || "",
112
+ chainId: 11155111,
113
+ accounts: process.env.ACCOUNTS_PRIVATE_KEYS
114
+ ? process.env.ACCOUNTS_PRIVATE_KEYS.split(",")
115
+ : undefined,
116
+ tags: ["tenderly"],
117
+ },
110
118
  mainnet: {
111
119
  url: process.env.CHAIN_API_URL || "",
112
120
  chainId: 1,
@@ -155,6 +163,11 @@ var config = {
155
163
  "node_modules/@keep-network/random-beacon/artifacts",
156
164
  "node_modules/@keep-network/ecdsa/artifacts",
157
165
  ],
166
+ sepolia: [
167
+ "node_modules/@keep-network/tbtc/artifacts",
168
+ "node_modules/@keep-network/random-beacon/artifacts",
169
+ "node_modules/@keep-network/ecdsa/artifacts",
170
+ ],
158
171
  mainnet: ["./external/mainnet"],
159
172
  },
160
173
  },
@@ -162,16 +175,19 @@ var config = {
162
175
  deployer: {
163
176
  default: 1,
164
177
  goerli: 0,
178
+ sepolia: 0,
165
179
  mainnet: 0, // "0x123694886DBf5Ac94DDA07135349534536D14cAf"
166
180
  },
167
181
  governance: {
168
182
  default: 2,
169
183
  goerli: 0,
184
+ sepolia: 0,
170
185
  mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
171
186
  },
172
187
  chaosnetOwner: {
173
188
  default: 3,
174
189
  goerli: 0,
190
+ sepolia: 0,
175
191
  // Not used for mainnet deployment scripts of `@keepn-network/tbtc-v2`.
176
192
  // Used by `@keep-network/random-beacon` and `@keep-network/ecdsa`
177
193
  // when deploying `SortitionPool`s.
@@ -179,36 +195,43 @@ var config = {
179
195
  esdm: {
180
196
  default: 4,
181
197
  goerli: 0,
198
+ sepolia: 0,
182
199
  mainnet: "0x9f6e831c8f8939dc0c830c6e492e7cef4f9c2f5f", // Threshold Council
183
200
  },
184
201
  keepTechnicalWalletTeam: {
185
202
  default: 5,
186
203
  goerli: 0,
204
+ sepolia: 0,
187
205
  mainnet: "0xB3726E69Da808A689F2607939a2D9E958724FC2A",
188
206
  },
189
207
  keepCommunityMultiSig: {
190
208
  default: 6,
191
209
  goerli: 0,
210
+ sepolia: 0,
192
211
  mainnet: "0x19FcB32347ff4656E4E6746b4584192D185d640d",
193
212
  },
194
213
  treasury: {
195
214
  default: 7,
196
215
  goerli: 0,
216
+ sepolia: 0,
197
217
  mainnet: "0x87F005317692D05BAA4193AB0c961c69e175f45f", // Token Holder DAO
198
218
  },
199
219
  spvMaintainer: {
200
220
  default: 8,
201
221
  goerli: 0,
222
+ sepolia: 0,
202
223
  // We are not setting SPV maintainer for mainnet in deployment scripts.
203
224
  },
204
225
  coordinator: {
205
226
  default: 9,
206
227
  goerli: "0x4815cd81fFc21039a25aCFbD97CE75cCE8579042",
228
+ sepolia: "0x4815cd81fFc21039a25aCFbD97CE75cCE8579042",
207
229
  mainnet: "0x0595acCca29654c43Bd67E18578b30a405265234",
208
230
  },
209
231
  v1Redeemer: {
210
232
  default: 10,
211
233
  goerli: 0,
234
+ sepolia: 0,
212
235
  mainnet: "0x8Bac178fA95Cb56D11A94d4f1b2B1F5Fc48A30eA",
213
236
  },
214
237
  },
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });