@keep-network/tbtc-v2 0.1.0 → 0.1.1-dev

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 (296) hide show
  1. package/README.adoc +12 -0
  2. package/artifacts/.chainId +1 -1
  3. package/artifacts/Bank.json +807 -0
  4. package/artifacts/Bridge.json +2300 -0
  5. package/artifacts/Deposit.json +117 -0
  6. package/artifacts/DepositSweep.json +77 -0
  7. package/artifacts/EcdsaDkgValidator.json +532 -0
  8. package/artifacts/EcdsaInactivity.json +156 -0
  9. package/artifacts/EcdsaSortitionPool.json +1004 -0
  10. package/artifacts/Fraud.json +164 -0
  11. package/artifacts/KeepRegistry.json +99 -0
  12. package/artifacts/KeepStake.json +286 -0
  13. package/artifacts/KeepToken.json +711 -0
  14. package/artifacts/KeepTokenStaking.json +483 -0
  15. package/artifacts/MovingFunds.json +249 -0
  16. package/artifacts/NuCypherStakingEscrow.json +256 -0
  17. package/artifacts/NuCypherToken.json +711 -0
  18. package/artifacts/RandomBeaconStub.json +141 -0
  19. package/artifacts/Redemption.json +174 -0
  20. package/artifacts/ReimbursementPool.json +509 -0
  21. package/artifacts/Relay.json +123 -0
  22. package/artifacts/T.json +1148 -0
  23. package/artifacts/TBTC.json +36 -35
  24. package/artifacts/TBTCToken.json +738 -0
  25. package/artifacts/TBTCVault.json +691 -0
  26. package/artifacts/TokenStaking.json +2288 -0
  27. package/artifacts/TokenholderGovernor.json +1795 -0
  28. package/artifacts/TokenholderTimelock.json +1058 -0
  29. package/artifacts/VendingMachine.json +34 -33
  30. package/artifacts/VendingMachineKeep.json +400 -0
  31. package/artifacts/VendingMachineNuCypher.json +400 -0
  32. package/artifacts/WalletRegistry.json +1843 -0
  33. package/artifacts/WalletRegistryGovernance.json +2754 -0
  34. package/artifacts/Wallets.json +186 -0
  35. package/artifacts/solcInputs/5e62cff1ead0900b07facca4b559e818.json +314 -0
  36. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  37. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.json +2 -2
  38. package/build/contracts/bank/Bank.sol/Bank.dbg.json +4 -0
  39. package/build/contracts/bank/Bank.sol/Bank.json +542 -0
  40. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +4 -0
  41. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.json +34 -0
  42. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +4 -0
  43. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +10 -0
  44. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +4 -0
  45. package/build/contracts/bridge/Bridge.sol/Bridge.json +2686 -0
  46. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +4 -0
  47. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +226 -0
  48. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +4 -0
  49. package/build/contracts/bridge/Deposit.sol/Deposit.json +72 -0
  50. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +4 -0
  51. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.json +30 -0
  52. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +4 -0
  53. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.json +10 -0
  54. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +4 -0
  55. package/build/contracts/bridge/Fraud.sol/Fraud.json +86 -0
  56. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +4 -0
  57. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.json +10 -0
  58. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +4 -0
  59. package/build/contracts/bridge/IRelay.sol/IRelay.json +37 -0
  60. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +4 -0
  61. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +138 -0
  62. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +4 -0
  63. package/build/contracts/bridge/Redemption.sol/OutboundTx.json +10 -0
  64. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +4 -0
  65. package/build/contracts/bridge/Redemption.sol/Redemption.json +92 -0
  66. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  67. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.json +2 -2
  68. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +4 -0
  69. package/build/contracts/bridge/Wallets.sol/Wallets.json +112 -0
  70. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  71. package/build/contracts/token/TBTC.sol/TBTC.json +4 -4
  72. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +4 -0
  73. package/build/contracts/vault/DonationVault.sol/DonationVault.json +108 -0
  74. package/build/contracts/vault/IVault.sol/IVault.dbg.json +4 -0
  75. package/build/contracts/vault/IVault.sol/IVault.json +52 -0
  76. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +4 -0
  77. package/build/contracts/vault/TBTCVault.sol/TBTCVault.json +449 -0
  78. package/contracts/GovernanceUtils.sol +4 -4
  79. package/contracts/bank/Bank.sol +436 -0
  80. package/contracts/bank/IReceiveBalanceApproval.sol +45 -0
  81. package/contracts/bridge/BitcoinTx.sol +326 -0
  82. package/contracts/bridge/Bridge.sol +1793 -0
  83. package/contracts/bridge/BridgeState.sol +739 -0
  84. package/contracts/bridge/Deposit.sol +269 -0
  85. package/contracts/bridge/DepositSweep.sol +574 -0
  86. package/contracts/bridge/EcdsaLib.sol +45 -0
  87. package/contracts/bridge/Fraud.sol +579 -0
  88. package/contracts/bridge/Heartbeat.sol +112 -0
  89. package/contracts/bridge/IRelay.sol +28 -0
  90. package/contracts/bridge/MovingFunds.sol +1077 -0
  91. package/contracts/bridge/Redemption.sol +1020 -0
  92. package/contracts/bridge/VendingMachine.sol +2 -2
  93. package/contracts/bridge/Wallets.sol +719 -0
  94. package/contracts/hardhat-dependency-compiler/.hardhat-dependency-compiler +1 -0
  95. package/contracts/hardhat-dependency-compiler/@keep-network/ecdsa/contracts/WalletRegistry.sol +3 -0
  96. package/contracts/hardhat-dependency-compiler/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol +3 -0
  97. package/contracts/hardhat-dependency-compiler/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +3 -0
  98. package/contracts/token/TBTC.sol +1 -1
  99. package/contracts/vault/DonationVault.sol +125 -0
  100. package/contracts/vault/IVault.sol +44 -0
  101. package/contracts/vault/TBTCVault.sol +305 -0
  102. package/deploy/00_resolve_relay.ts +28 -0
  103. package/deploy/00_resolve_tbtc_v1_token.ts +1 -1
  104. package/deploy/01_deploy_tbtc_v2_token.ts +8 -1
  105. package/deploy/02_deploy_vending_machine.ts +7 -0
  106. package/deploy/{03_transfer_roles.ts → 03_transfer_vending_machine_roles.ts} +1 -1
  107. package/deploy/04_deploy_bank.ts +27 -0
  108. package/deploy/05_deploy_bridge.ts +80 -0
  109. package/deploy/06_deploy_tbtc_vault.ts +30 -0
  110. package/deploy/07_bank_update_bridge.ts +19 -0
  111. package/deploy/08_transfer_bank_ownership.ts +15 -0
  112. package/deploy/09_transfer_tbtc_vault_ownership.ts +15 -0
  113. package/deploy/10_transfer_bridge_governance.ts +20 -0
  114. package/deploy/11_initialize_wallet_owner.ts +18 -0
  115. package/deploy/11_transfer_proxy_admin_ownership.ts +30 -0
  116. package/deploy/12_deploy_proxy_admin_with_deputy.ts +33 -0
  117. package/export/deploy/00_resolve_relay.js +24 -0
  118. package/export/deploy/00_resolve_tbtc_v1_token.js +24 -0
  119. package/export/deploy/01_deploy_tbtc_v2_token.js +19 -0
  120. package/export/deploy/02_deploy_vending_machine.js +25 -0
  121. package/export/deploy/03_transfer_vending_machine_roles.js +19 -0
  122. package/export/deploy/04_deploy_bank.js +21 -0
  123. package/export/deploy/05_deploy_bridge.js +69 -0
  124. package/export/deploy/06_deploy_tbtc_vault.js +24 -0
  125. package/export/deploy/07_bank_update_bridge.js +13 -0
  126. package/export/deploy/08_transfer_bank_ownership.js +11 -0
  127. package/export/deploy/09_transfer_tbtc_vault_ownership.js +11 -0
  128. package/export/deploy/10_transfer_bridge_governance.js +11 -0
  129. package/export/deploy/11_initialize_wallet_owner.js +14 -0
  130. package/export/deploy/11_transfer_proxy_admin_ownership.js +23 -0
  131. package/export/deploy/12_deploy_proxy_admin_with_deputy.js +22 -0
  132. package/export/hardhat.config.js +169 -0
  133. package/export/test/bank/Bank.test.js +1012 -0
  134. package/export/test/bridge/Bridge.Deployment.test.js +76 -0
  135. package/export/test/bridge/Bridge.Deposit.test.js +1834 -0
  136. package/export/test/bridge/Bridge.Frauds.test.js +1349 -0
  137. package/export/test/bridge/Bridge.MovingFunds.test.js +2437 -0
  138. package/export/test/bridge/Bridge.Parameters.test.js +400 -0
  139. package/export/test/bridge/Bridge.Redemption.test.js +2523 -0
  140. package/export/test/bridge/Bridge.Vaults.test.js +74 -0
  141. package/export/test/bridge/Bridge.Wallets.test.js +1017 -0
  142. package/export/test/bridge/EcdsaLib.test.js +46 -0
  143. package/export/test/bridge/Heartbeat.test.js +77 -0
  144. package/export/test/bridge/VendingMachine.Upgrade.test.js +160 -0
  145. package/export/test/bridge/VendingMachine.test.js +762 -0
  146. package/export/test/data/deposit-sweep.js +655 -0
  147. package/export/test/data/ecdsa.js +18 -0
  148. package/export/test/data/fraud.js +158 -0
  149. package/export/test/data/moving-funds.js +815 -0
  150. package/export/test/data/redemption.js +1011 -0
  151. package/export/test/fixtures/bridge.js +54 -0
  152. package/export/test/fixtures/index.js +57 -0
  153. package/export/test/helpers/contract-test-helpers.js +18 -0
  154. package/export/test/integration/Slashing.test.js +279 -0
  155. package/export/test/integration/WalleCreation.test.js +66 -0
  156. package/export/test/integration/utils/ecdsa-wallet-registry.js +137 -0
  157. package/export/test/integration/utils/fixture.js +77 -0
  158. package/export/test/integration/utils/gas.js +36 -0
  159. package/export/test/integration/utils/random-beacon.js +26 -0
  160. package/export/test/integration/utils/staking.js +19 -0
  161. package/export/test/vault/DonationVault.test.js +202 -0
  162. package/export/test/vault/TBTCVault.Redemption.test.js +357 -0
  163. package/export/test/vault/TBTCVault.test.js +768 -0
  164. package/export/typechain/BTCUtils.js +2 -0
  165. package/export/typechain/Bank.js +2 -0
  166. package/export/typechain/BankStub.js +2 -0
  167. package/export/typechain/Bridge.js +2 -0
  168. package/export/typechain/BridgeState.js +2 -0
  169. package/export/typechain/BridgeStub.js +2 -0
  170. package/export/typechain/Deposit.js +2 -0
  171. package/export/typechain/DepositSweep.js +2 -0
  172. package/export/typechain/DonationVault.js +2 -0
  173. package/export/typechain/ERC165.js +2 -0
  174. package/export/typechain/ERC1967Proxy.js +2 -0
  175. package/export/typechain/ERC1967Upgrade.js +2 -0
  176. package/export/typechain/ERC20WithPermit.js +2 -0
  177. package/export/typechain/ERC721.js +2 -0
  178. package/export/typechain/EcdsaAuthorization.js +2 -0
  179. package/export/typechain/EcdsaDkg.js +2 -0
  180. package/export/typechain/EcdsaDkgValidator.js +2 -0
  181. package/export/typechain/EcdsaInactivity.js +2 -0
  182. package/export/typechain/Fraud.js +2 -0
  183. package/export/typechain/Governable.js +2 -0
  184. package/export/typechain/HeartbeatStub.js +2 -0
  185. package/export/typechain/IApplication.js +2 -0
  186. package/export/typechain/IApproveAndCall.js +2 -0
  187. package/export/typechain/IBeacon.js +2 -0
  188. package/export/typechain/IERC165.js +2 -0
  189. package/export/typechain/IERC1822Proxiable.js +2 -0
  190. package/export/typechain/IERC20.js +2 -0
  191. package/export/typechain/IERC20Metadata.js +2 -0
  192. package/export/typechain/IERC20WithPermit.js +2 -0
  193. package/export/typechain/IERC721.js +2 -0
  194. package/export/typechain/IERC721Metadata.js +2 -0
  195. package/export/typechain/IERC721Receiver.js +2 -0
  196. package/export/typechain/IRandomBeacon.js +2 -0
  197. package/export/typechain/IRandomBeaconConsumer.js +2 -0
  198. package/export/typechain/IReceiveApproval.js +2 -0
  199. package/export/typechain/IReceiveBalanceApproval.js +2 -0
  200. package/export/typechain/IRelay.js +2 -0
  201. package/export/typechain/IStaking.js +2 -0
  202. package/export/typechain/IVault.js +2 -0
  203. package/export/typechain/IWalletOwner.js +2 -0
  204. package/export/typechain/IWalletRegistry.js +2 -0
  205. package/export/typechain/Initializable.js +2 -0
  206. package/export/typechain/MisfundRecovery.js +2 -0
  207. package/export/typechain/MovingFunds.js +2 -0
  208. package/export/typechain/Ownable.js +2 -0
  209. package/export/typechain/Proxy.js +2 -0
  210. package/export/typechain/ProxyAdmin.js +2 -0
  211. package/export/typechain/ReceiveApprovalStub.js +2 -0
  212. package/export/typechain/Redemption.js +2 -0
  213. package/export/typechain/Reimbursable.js +2 -0
  214. package/export/typechain/ReimbursementPool.js +2 -0
  215. package/export/typechain/Rewards.js +2 -0
  216. package/export/typechain/SortitionPool.js +2 -0
  217. package/export/typechain/SortitionTree.js +2 -0
  218. package/export/typechain/TBTC.js +2 -0
  219. package/export/typechain/TBTCVault.js +2 -0
  220. package/export/typechain/TestERC20.js +2 -0
  221. package/export/typechain/TestERC721.js +2 -0
  222. package/export/typechain/TestEcdsaLib.js +2 -0
  223. package/export/typechain/TestRelay.js +2 -0
  224. package/export/typechain/TransparentUpgradeableProxy.js +2 -0
  225. package/export/typechain/VendingMachine.js +2 -0
  226. package/export/typechain/WalletRegistry.js +2 -0
  227. package/export/typechain/Wallets.js +2 -0
  228. package/export/typechain/common.js +2 -0
  229. package/export/typechain/factories/BTCUtils__factory.js +94 -0
  230. package/export/typechain/factories/BankStub__factory.js +586 -0
  231. package/export/typechain/factories/Bank__factory.js +573 -0
  232. package/export/typechain/factories/BridgeState__factory.js +257 -0
  233. package/export/typechain/factories/BridgeStub__factory.js +2912 -0
  234. package/export/typechain/factories/Bridge__factory.js +2526 -0
  235. package/export/typechain/factories/DepositSweep__factory.js +61 -0
  236. package/export/typechain/factories/Deposit__factory.js +103 -0
  237. package/export/typechain/factories/DonationVault__factory.js +139 -0
  238. package/export/typechain/factories/ERC165__factory.js +38 -0
  239. package/export/typechain/factories/ERC1967Proxy__factory.js +111 -0
  240. package/export/typechain/factories/ERC1967Upgrade__factory.js +64 -0
  241. package/export/typechain/factories/ERC20WithPermit__factory.js +524 -0
  242. package/export/typechain/factories/ERC721__factory.js +388 -0
  243. package/export/typechain/factories/EcdsaAuthorization__factory.js +211 -0
  244. package/export/typechain/factories/EcdsaDkgValidator__factory.js +441 -0
  245. package/export/typechain/factories/EcdsaDkg__factory.js +192 -0
  246. package/export/typechain/factories/EcdsaInactivity__factory.js +134 -0
  247. package/export/typechain/factories/Fraud__factory.js +117 -0
  248. package/export/typechain/factories/Governable__factory.js +64 -0
  249. package/export/typechain/factories/HeartbeatStub__factory.js +61 -0
  250. package/export/typechain/factories/IApplication__factory.js +152 -0
  251. package/export/typechain/factories/IApproveAndCall__factory.js +48 -0
  252. package/export/typechain/factories/IBeacon__factory.js +32 -0
  253. package/export/typechain/factories/IERC165__factory.js +38 -0
  254. package/export/typechain/factories/IERC1822Proxiable__factory.js +32 -0
  255. package/export/typechain/factories/IERC20Metadata__factory.js +241 -0
  256. package/export/typechain/factories/IERC20WithPermit__factory.js +389 -0
  257. package/export/typechain/factories/IERC20__factory.js +202 -0
  258. package/export/typechain/factories/IERC721Metadata__factory.js +349 -0
  259. package/export/typechain/factories/IERC721Receiver__factory.js +53 -0
  260. package/export/typechain/factories/IERC721__factory.js +304 -0
  261. package/export/typechain/factories/IRandomBeaconConsumer__factory.js +37 -0
  262. package/export/typechain/factories/IRandomBeacon__factory.js +32 -0
  263. package/export/typechain/factories/IReceiveApproval__factory.js +47 -0
  264. package/export/typechain/factories/IReceiveBalanceApproval__factory.js +42 -0
  265. package/export/typechain/factories/IRelay__factory.js +45 -0
  266. package/export/typechain/factories/IStaking__factory.js +722 -0
  267. package/export/typechain/factories/IVault__factory.js +60 -0
  268. package/export/typechain/factories/IWalletOwner__factory.js +65 -0
  269. package/export/typechain/factories/IWalletRegistry__factory.js +138 -0
  270. package/export/typechain/factories/Initializable__factory.js +32 -0
  271. package/export/typechain/factories/MisfundRecovery__factory.js +145 -0
  272. package/export/typechain/factories/MovingFunds__factory.js +169 -0
  273. package/export/typechain/factories/Ownable__factory.js +71 -0
  274. package/export/typechain/factories/ProxyAdmin__factory.js +191 -0
  275. package/export/typechain/factories/Proxy__factory.js +27 -0
  276. package/export/typechain/factories/ReceiveApprovalStub__factory.js +127 -0
  277. package/export/typechain/factories/Redemption__factory.js +123 -0
  278. package/export/typechain/factories/Reimbursable__factory.js +58 -0
  279. package/export/typechain/factories/ReimbursementPool__factory.js +350 -0
  280. package/export/typechain/factories/Rewards__factory.js +117 -0
  281. package/export/typechain/factories/SortitionPool__factory.js +610 -0
  282. package/export/typechain/factories/SortitionTree__factory.js +149 -0
  283. package/export/typechain/factories/TBTCVault__factory.js +480 -0
  284. package/export/typechain/factories/TBTC__factory.js +564 -0
  285. package/export/typechain/factories/TestERC20__factory.js +539 -0
  286. package/export/typechain/factories/TestERC721__factory.js +421 -0
  287. package/export/typechain/factories/TestEcdsaLib__factory.js +66 -0
  288. package/export/typechain/factories/TestRelay__factory.js +94 -0
  289. package/export/typechain/factories/TransparentUpgradeableProxy__factory.js +186 -0
  290. package/export/typechain/factories/VendingMachine__factory.js +549 -0
  291. package/export/typechain/factories/WalletRegistry__factory.js +1919 -0
  292. package/export/typechain/factories/Wallets__factory.js +143 -0
  293. package/export/typechain/index.js +132 -0
  294. package/export.json +15932 -503
  295. package/package.json +47 -26
  296. package/artifacts/solcInputs/7cc3eda3cb3ff2522d18b5e7b31ea228.json +0 -104
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SortitionTree__factory = void 0;
4
+ /* Autogenerated file. Do not edit manually. */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ inputs: [],
11
+ stateMutability: "nonpayable",
12
+ type: "constructor",
13
+ },
14
+ {
15
+ inputs: [
16
+ {
17
+ internalType: "uint32",
18
+ name: "id",
19
+ type: "uint32",
20
+ },
21
+ ],
22
+ name: "getIDOperator",
23
+ outputs: [
24
+ {
25
+ internalType: "address",
26
+ name: "",
27
+ type: "address",
28
+ },
29
+ ],
30
+ stateMutability: "view",
31
+ type: "function",
32
+ },
33
+ {
34
+ inputs: [
35
+ {
36
+ internalType: "uint32[]",
37
+ name: "ids",
38
+ type: "uint32[]",
39
+ },
40
+ ],
41
+ name: "getIDOperators",
42
+ outputs: [
43
+ {
44
+ internalType: "address[]",
45
+ name: "",
46
+ type: "address[]",
47
+ },
48
+ ],
49
+ stateMutability: "view",
50
+ type: "function",
51
+ },
52
+ {
53
+ inputs: [
54
+ {
55
+ internalType: "address",
56
+ name: "operator",
57
+ type: "address",
58
+ },
59
+ ],
60
+ name: "getOperatorID",
61
+ outputs: [
62
+ {
63
+ internalType: "uint32",
64
+ name: "",
65
+ type: "uint32",
66
+ },
67
+ ],
68
+ stateMutability: "view",
69
+ type: "function",
70
+ },
71
+ {
72
+ inputs: [
73
+ {
74
+ internalType: "address",
75
+ name: "operator",
76
+ type: "address",
77
+ },
78
+ ],
79
+ name: "isOperatorRegistered",
80
+ outputs: [
81
+ {
82
+ internalType: "bool",
83
+ name: "",
84
+ type: "bool",
85
+ },
86
+ ],
87
+ stateMutability: "view",
88
+ type: "function",
89
+ },
90
+ {
91
+ inputs: [],
92
+ name: "operatorsInPool",
93
+ outputs: [
94
+ {
95
+ internalType: "uint256",
96
+ name: "",
97
+ type: "uint256",
98
+ },
99
+ ],
100
+ stateMutability: "view",
101
+ type: "function",
102
+ },
103
+ {
104
+ inputs: [],
105
+ name: "totalWeight",
106
+ outputs: [
107
+ {
108
+ internalType: "uint256",
109
+ name: "",
110
+ type: "uint256",
111
+ },
112
+ ],
113
+ stateMutability: "view",
114
+ type: "function",
115
+ },
116
+ ];
117
+ const _bytecode = "0x608060405234801561001057600080fd5b506000808055600481905560078054600101815590526104da806100356000396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c806396c82e571161005057806396c82e5714610126578063e7bfd8991461013c578063f7f9a8fa1461014457600080fd5b80635a48b46b146100775780636b1906f8146100c05780638871ca5d146100fb575b600080fd5b6100a6610085366004610318565b6001600160a01b031660009081526006602052604090205463ffffffff1690565b60405163ffffffff90911681526020015b60405180910390f35b6100eb6100ce366004610318565b6001600160a01b0316600090815260036020526040902054151590565b60405190151581526020016100b7565b61010e610109366004610348565b610164565b6040516001600160a01b0390911681526020016100b7565b61012e6101b2565b6040519081526020016100b7565b61012e6101c4565b61015761015236600461036e565b6101df565b6040516100b791906103e3565b60075460009063ffffffff83161061017d5760006101ac565b60078263ffffffff168154811061019657610196610430565b6000918252602090912001546001600160a01b03165b92915050565b60006101bf6000546102eb565b905090565b600454600554600091906101d8818361045c565b9250505090565b60075460609060008367ffffffffffffffff81111561020057610200610473565b604051908082528060200260200182016040528015610229578160200160208202803683370190505b50905060005b848110156102e257600086868381811061024b5761024b610430565b90506020020160208101906102609190610348565b90508063ffffffff1684116102765760006102a5565b60078163ffffffff168154811061028f5761028f610430565b6000918252602090912001546001600160a01b03165b8383815181106102b7576102b7610430565b6001600160a01b039092166020928302919091019091015250806102da81610489565b91505061022f565b50949350505050565b63ffffffff8116602082901c5b80156103125763ffffffff8116919091019060201c6102f8565b50919050565b60006020828403121561032a57600080fd5b81356001600160a01b038116811461034157600080fd5b9392505050565b60006020828403121561035a57600080fd5b813563ffffffff8116811461034157600080fd5b6000806020838503121561038157600080fd5b823567ffffffffffffffff8082111561039957600080fd5b818501915085601f8301126103ad57600080fd5b8135818111156103bc57600080fd5b8660208260051b85010111156103d157600080fd5b60209290920196919550909350505050565b6020808252825182820181905260009190848201906040850190845b818110156104245783516001600160a01b0316835292840192918401916001016103ff565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561046e5761046e610446565b500390565b634e487b7160e01b600052604160045260246000fd5b600060001982141561049d5761049d610446565b506001019056fea2646970667358221220c23d380ecc38b68e30c3802ecb60366f486376cdd77917aa649d0bb6f5da1c9864736f6c63430008090033";
118
+ const isSuperArgs = (xs) => xs.length > 1;
119
+ class SortitionTree__factory extends ethers_1.ContractFactory {
120
+ constructor(...args) {
121
+ if (isSuperArgs(args)) {
122
+ super(...args);
123
+ }
124
+ else {
125
+ super(_abi, _bytecode, args[0]);
126
+ }
127
+ }
128
+ deploy(overrides) {
129
+ return super.deploy(overrides || {});
130
+ }
131
+ getDeployTransaction(overrides) {
132
+ return super.getDeployTransaction(overrides || {});
133
+ }
134
+ attach(address) {
135
+ return super.attach(address);
136
+ }
137
+ connect(signer) {
138
+ return super.connect(signer);
139
+ }
140
+ static createInterface() {
141
+ return new ethers_1.utils.Interface(_abi);
142
+ }
143
+ static connect(address, signerOrProvider) {
144
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
145
+ }
146
+ }
147
+ exports.SortitionTree__factory = SortitionTree__factory;
148
+ SortitionTree__factory.bytecode = _bytecode;
149
+ SortitionTree__factory.abi = _abi;
@@ -0,0 +1,480 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TBTCVault__factory = void 0;
4
+ /* Autogenerated file. Do not edit manually. */
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ inputs: [
11
+ {
12
+ internalType: "contract Bank",
13
+ name: "_bank",
14
+ type: "address",
15
+ },
16
+ {
17
+ internalType: "contract TBTC",
18
+ name: "_tbtcToken",
19
+ type: "address",
20
+ },
21
+ ],
22
+ stateMutability: "nonpayable",
23
+ type: "constructor",
24
+ },
25
+ {
26
+ anonymous: false,
27
+ inputs: [
28
+ {
29
+ indexed: true,
30
+ internalType: "address",
31
+ name: "to",
32
+ type: "address",
33
+ },
34
+ {
35
+ indexed: false,
36
+ internalType: "uint256",
37
+ name: "amount",
38
+ type: "uint256",
39
+ },
40
+ ],
41
+ name: "Minted",
42
+ type: "event",
43
+ },
44
+ {
45
+ anonymous: false,
46
+ inputs: [
47
+ {
48
+ indexed: true,
49
+ internalType: "address",
50
+ name: "previousOwner",
51
+ type: "address",
52
+ },
53
+ {
54
+ indexed: true,
55
+ internalType: "address",
56
+ name: "newOwner",
57
+ type: "address",
58
+ },
59
+ ],
60
+ name: "OwnershipTransferred",
61
+ type: "event",
62
+ },
63
+ {
64
+ anonymous: false,
65
+ inputs: [
66
+ {
67
+ indexed: true,
68
+ internalType: "address",
69
+ name: "from",
70
+ type: "address",
71
+ },
72
+ {
73
+ indexed: false,
74
+ internalType: "uint256",
75
+ name: "amount",
76
+ type: "uint256",
77
+ },
78
+ ],
79
+ name: "Unminted",
80
+ type: "event",
81
+ },
82
+ {
83
+ anonymous: false,
84
+ inputs: [
85
+ {
86
+ indexed: false,
87
+ internalType: "address",
88
+ name: "newVault",
89
+ type: "address",
90
+ },
91
+ ],
92
+ name: "UpgradeFinalized",
93
+ type: "event",
94
+ },
95
+ {
96
+ anonymous: false,
97
+ inputs: [
98
+ {
99
+ indexed: false,
100
+ internalType: "address",
101
+ name: "newVault",
102
+ type: "address",
103
+ },
104
+ {
105
+ indexed: false,
106
+ internalType: "uint256",
107
+ name: "timestamp",
108
+ type: "uint256",
109
+ },
110
+ ],
111
+ name: "UpgradeInitiated",
112
+ type: "event",
113
+ },
114
+ {
115
+ inputs: [],
116
+ name: "UPGRADE_GOVERNANCE_DELAY",
117
+ outputs: [
118
+ {
119
+ internalType: "uint256",
120
+ name: "",
121
+ type: "uint256",
122
+ },
123
+ ],
124
+ stateMutability: "view",
125
+ type: "function",
126
+ },
127
+ {
128
+ inputs: [],
129
+ name: "bank",
130
+ outputs: [
131
+ {
132
+ internalType: "contract Bank",
133
+ name: "",
134
+ type: "address",
135
+ },
136
+ ],
137
+ stateMutability: "view",
138
+ type: "function",
139
+ },
140
+ {
141
+ inputs: [],
142
+ name: "finalizeUpgrade",
143
+ outputs: [],
144
+ stateMutability: "nonpayable",
145
+ type: "function",
146
+ },
147
+ {
148
+ inputs: [
149
+ {
150
+ internalType: "address",
151
+ name: "_newVault",
152
+ type: "address",
153
+ },
154
+ ],
155
+ name: "initiateUpgrade",
156
+ outputs: [],
157
+ stateMutability: "nonpayable",
158
+ type: "function",
159
+ },
160
+ {
161
+ inputs: [
162
+ {
163
+ internalType: "uint256",
164
+ name: "amount",
165
+ type: "uint256",
166
+ },
167
+ ],
168
+ name: "mint",
169
+ outputs: [],
170
+ stateMutability: "nonpayable",
171
+ type: "function",
172
+ },
173
+ {
174
+ inputs: [],
175
+ name: "newVault",
176
+ outputs: [
177
+ {
178
+ internalType: "address",
179
+ name: "",
180
+ type: "address",
181
+ },
182
+ ],
183
+ stateMutability: "view",
184
+ type: "function",
185
+ },
186
+ {
187
+ inputs: [],
188
+ name: "owner",
189
+ outputs: [
190
+ {
191
+ internalType: "address",
192
+ name: "",
193
+ type: "address",
194
+ },
195
+ ],
196
+ stateMutability: "view",
197
+ type: "function",
198
+ },
199
+ {
200
+ inputs: [
201
+ {
202
+ internalType: "address",
203
+ name: "from",
204
+ type: "address",
205
+ },
206
+ {
207
+ internalType: "uint256",
208
+ name: "amount",
209
+ type: "uint256",
210
+ },
211
+ {
212
+ internalType: "address",
213
+ name: "token",
214
+ type: "address",
215
+ },
216
+ {
217
+ internalType: "bytes",
218
+ name: "extraData",
219
+ type: "bytes",
220
+ },
221
+ ],
222
+ name: "receiveApproval",
223
+ outputs: [],
224
+ stateMutability: "nonpayable",
225
+ type: "function",
226
+ },
227
+ {
228
+ inputs: [
229
+ {
230
+ internalType: "address",
231
+ name: "owner",
232
+ type: "address",
233
+ },
234
+ {
235
+ internalType: "uint256",
236
+ name: "amount",
237
+ type: "uint256",
238
+ },
239
+ {
240
+ internalType: "bytes",
241
+ name: "",
242
+ type: "bytes",
243
+ },
244
+ ],
245
+ name: "receiveBalanceApproval",
246
+ outputs: [],
247
+ stateMutability: "nonpayable",
248
+ type: "function",
249
+ },
250
+ {
251
+ inputs: [
252
+ {
253
+ internalType: "address[]",
254
+ name: "depositors",
255
+ type: "address[]",
256
+ },
257
+ {
258
+ internalType: "uint256[]",
259
+ name: "depositedAmounts",
260
+ type: "uint256[]",
261
+ },
262
+ ],
263
+ name: "receiveBalanceIncrease",
264
+ outputs: [],
265
+ stateMutability: "nonpayable",
266
+ type: "function",
267
+ },
268
+ {
269
+ inputs: [
270
+ {
271
+ internalType: "contract IERC20",
272
+ name: "token",
273
+ type: "address",
274
+ },
275
+ {
276
+ internalType: "address",
277
+ name: "recipient",
278
+ type: "address",
279
+ },
280
+ {
281
+ internalType: "uint256",
282
+ name: "amount",
283
+ type: "uint256",
284
+ },
285
+ ],
286
+ name: "recoverERC20",
287
+ outputs: [],
288
+ stateMutability: "nonpayable",
289
+ type: "function",
290
+ },
291
+ {
292
+ inputs: [
293
+ {
294
+ internalType: "contract IERC20",
295
+ name: "token",
296
+ type: "address",
297
+ },
298
+ {
299
+ internalType: "address",
300
+ name: "recipient",
301
+ type: "address",
302
+ },
303
+ {
304
+ internalType: "uint256",
305
+ name: "amount",
306
+ type: "uint256",
307
+ },
308
+ ],
309
+ name: "recoverERC20FromToken",
310
+ outputs: [],
311
+ stateMutability: "nonpayable",
312
+ type: "function",
313
+ },
314
+ {
315
+ inputs: [
316
+ {
317
+ internalType: "contract IERC721",
318
+ name: "token",
319
+ type: "address",
320
+ },
321
+ {
322
+ internalType: "address",
323
+ name: "recipient",
324
+ type: "address",
325
+ },
326
+ {
327
+ internalType: "uint256",
328
+ name: "tokenId",
329
+ type: "uint256",
330
+ },
331
+ {
332
+ internalType: "bytes",
333
+ name: "data",
334
+ type: "bytes",
335
+ },
336
+ ],
337
+ name: "recoverERC721",
338
+ outputs: [],
339
+ stateMutability: "nonpayable",
340
+ type: "function",
341
+ },
342
+ {
343
+ inputs: [
344
+ {
345
+ internalType: "contract IERC721",
346
+ name: "token",
347
+ type: "address",
348
+ },
349
+ {
350
+ internalType: "address",
351
+ name: "recipient",
352
+ type: "address",
353
+ },
354
+ {
355
+ internalType: "uint256",
356
+ name: "tokenId",
357
+ type: "uint256",
358
+ },
359
+ {
360
+ internalType: "bytes",
361
+ name: "data",
362
+ type: "bytes",
363
+ },
364
+ ],
365
+ name: "recoverERC721FromToken",
366
+ outputs: [],
367
+ stateMutability: "nonpayable",
368
+ type: "function",
369
+ },
370
+ {
371
+ inputs: [],
372
+ name: "renounceOwnership",
373
+ outputs: [],
374
+ stateMutability: "nonpayable",
375
+ type: "function",
376
+ },
377
+ {
378
+ inputs: [],
379
+ name: "tbtcToken",
380
+ outputs: [
381
+ {
382
+ internalType: "contract TBTC",
383
+ name: "",
384
+ type: "address",
385
+ },
386
+ ],
387
+ stateMutability: "view",
388
+ type: "function",
389
+ },
390
+ {
391
+ inputs: [
392
+ {
393
+ internalType: "address",
394
+ name: "newOwner",
395
+ type: "address",
396
+ },
397
+ ],
398
+ name: "transferOwnership",
399
+ outputs: [],
400
+ stateMutability: "nonpayable",
401
+ type: "function",
402
+ },
403
+ {
404
+ inputs: [
405
+ {
406
+ internalType: "uint256",
407
+ name: "amount",
408
+ type: "uint256",
409
+ },
410
+ ],
411
+ name: "unmint",
412
+ outputs: [],
413
+ stateMutability: "nonpayable",
414
+ type: "function",
415
+ },
416
+ {
417
+ inputs: [
418
+ {
419
+ internalType: "uint256",
420
+ name: "amount",
421
+ type: "uint256",
422
+ },
423
+ {
424
+ internalType: "bytes",
425
+ name: "redemptionData",
426
+ type: "bytes",
427
+ },
428
+ ],
429
+ name: "unmintAndRedeem",
430
+ outputs: [],
431
+ stateMutability: "nonpayable",
432
+ type: "function",
433
+ },
434
+ {
435
+ inputs: [],
436
+ name: "upgradeInitiatedTimestamp",
437
+ outputs: [
438
+ {
439
+ internalType: "uint256",
440
+ name: "",
441
+ type: "uint256",
442
+ },
443
+ ],
444
+ stateMutability: "view",
445
+ type: "function",
446
+ },
447
+ ];
448
+ const _bytecode = "0x60806040523480156200001157600080fd5b5060405162001d5c38038062001d5c83398101604081905262000034916200019d565b6200003f3362000134565b6001600160a01b0382166200009b5760405162461bcd60e51b815260206004820181905260248201527f42616e6b2063616e206e6f7420626520746865207a65726f206164647265737360448201526064015b60405180910390fd5b6001600160a01b038116620001025760405162461bcd60e51b815260206004820152602660248201527f5442544320746f6b656e2063616e206e6f7420626520746865207a65726f206160448201526564647265737360d01b606482015260840162000092565b600180546001600160a01b039384166001600160a01b03199182161790915560028054929093169116179055620001dc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200019a57600080fd5b50565b60008060408385031215620001b157600080fd5b8251620001be8162000184565b6020840151909250620001d18162000184565b809150509250929050565b611b7080620001ec6000396000f3fe608060405234801561001057600080fd5b506004361061016c5760003560e01c806388aaf0c8116100cd578063a0712d6811610081578063e5d3d71411610066578063e5d3d714146102b6578063f2fde38b146102c9578063fc4e51f6146102dc57600080fd5b8063a0712d6814610299578063cfce0816146102ac57600080fd5b80638f4ffcb1116100b25780638f4ffcb114610267578063951315261461027a5780639a508c8e1461029157600080fd5b806388aaf0c8146102435780638da5cb5b1461025657600080fd5b8063479aa9271161012457806364e779b11161010957806364e779b1146101f8578063715018a61461020b57806376cdb03b1461021357600080fd5b8063479aa927146101d257806353dce4df146101e557600080fd5b8063317dfa7611610155578063317dfa7614610199578063461c6373146101ac578063475d0570146101bf57600080fd5b80631171bda9146101715780632e73e39814610186575b600080fd5b61018461017f3660046116a0565b6102ef565b005b61018461019436600461172a565b610367565b6101846101a73660046116a0565b61044b565b6101846101ba3660046117e2565b610531565b6101846101cd36600461184e565b610644565b6101846101e036600461189e565b6107f1565b6101846101f33660046118bb565b610915565b610184610206366004611907565b610921565b61018461092e565b600154610226906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b600354610226906001600160a01b031681565b6000546001600160a01b0316610226565b610184610275366004611920565b610994565b61028360045481565b60405190815260200161023a565b610184610a69565b6101846102a7366004611907565b610caf565b6102836201518081565b600254610226906001600160a01b031681565b6101846102d736600461189e565b610e03565b6101846102ea36600461172a565b610ee2565b6000546001600160a01b0316331461034e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6103626001600160a01b0384168383610f89565b505050565b6000546001600160a01b031633146103c15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b6002546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f690610412908890889088908890889060040161199f565b600060405180830381600087803b15801561042c57600080fd5b505af1158015610440573d6000803e3d6000fd5b505050505050505050565b6000546001600160a01b031633146104a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b6002546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda990606401600060405180830381600087803b15801561051457600080fd5b505af1158015610528573d6000803e3d6000fd5b50505050505050565b6001546001600160a01b0316331461058b5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610345565b826105d85760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f7273207370656369666965640000000000000000006044820152606401610345565b60005b8381101561063d5761062b8585838181106105f8576105f86119d2565b905060200201602081019061060d919061189e565b84848481811061061f5761061f6119d2565b90506020020135611009565b80610635816119fe565b9150506105db565b5050505050565b6001546001600160a01b0316331461069e5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610345565b6001546040516370a0823160e01b81526001600160a01b038681166004830152859216906370a082319060240160206040518083038186803b1580156106e357600080fd5b505afa1580156106f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071b9190611a19565b10156107745760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610345565b61077e8484611009565b600154604051631f1b6d2760e21b81526001600160a01b0386811660048301523060248301526044820186905290911690637c6db49c906064015b600060405180830381600087803b1580156107d357600080fd5b505af11580156107e7573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b0316331461084b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b6001600160a01b0381166108a15760405162461bcd60e51b815260206004820181905260248201527f4e6577207661756c7420616464726573732063616e6e6f74206265207a65726f6044820152606401610345565b604080516001600160a01b03831681524260208201527f5cc842cab066489e13292128663547c68705dbf476f0131e0107f155719c6124910160405180910390a1426004556003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6103623384848461109e565b61092b3382611207565b50565b6000546001600160a01b031633146109885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b6109926000611302565b565b6002546001600160a01b038481169116146109f15760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f7420544254430000000000000000000000000000006044820152606401610345565b336001600160a01b03841614610a495760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f77656400000000000000006044820152606401610345565b80610a5d57610a588585611207565b61063d565b61063d8585848461109e565b6000546001600160a01b03163314610ac35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b610ad26004546201518061135f565b6003546040516001600160a01b0390911681527f81a9bb8030ed4116b405800280e065110a37afb57b69948e714c97fab23475ec9060200160405180910390a16002546003546040517ff2fde38b0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291169063f2fde38b90602401600060405180830381600087803b158015610b7457600080fd5b505af1158015610b88573d6000803e3d6000fd5b50506001546003546040516370a0823160e01b81523060048201526001600160a01b0392831694506356a6d9ef935091169083906370a082319060240160206040518083038186803b158015610bdd57600080fd5b505afa158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c159190611a19565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b158015610c7357600080fd5b505af1158015610c87573d6000803e3d6000fd5b50506003805473ffffffffffffffffffffffffffffffffffffffff1916905550506000600455565b6001546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b158015610cf757600080fd5b505afa158015610d0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2f9190611a19565b1015610d885760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610345565b610d928183611009565b600154604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c906064015b600060405180830381600087803b158015610de757600080fd5b505af1158015610dfb573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610e5d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b6001600160a01b038116610ed95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610345565b61092b81611302565b6000546001600160a01b03163314610f3c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610345565b6040517fb88d4fde0000000000000000000000000000000000000000000000000000000081526001600160a01b0386169063b88d4fde90610412903090889088908890889060040161199f565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261036290849061140c565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe8260405161104491815260200190565b60405180910390a26002546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f1990604401610dcd565b836001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b8846040516110d991815260200190565b60405180910390a260025460405163079cc67960e41b81526001600160a01b03868116600483015260248201869052909116906379cc679090604401600060405180830381600087803b15801561112f57600080fd5b505af1158015611143573d6000803e3d6000fd5b5050600154604080517fe78cea9200000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169350634a38757e9250839163e78cea9291600480820192602092909190829003018186803b1580156111ad57600080fd5b505afa1580156111c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e59190611a32565b8585856040518563ffffffff1660e01b81526004016107b99493929190611a4f565b816001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b88260405161124291815260200190565b60405180910390a260025460405163079cc67960e41b81526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b15801561129857600080fd5b505af11580156112ac573d6000803e3d6000fd5b50506001546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef9150604401610dcd565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600082116113af5760405162461bcd60e51b815260206004820152601460248201527f4368616e6765206e6f7420696e697469617465640000000000000000000000006044820152606401610345565b806113ba8342611a82565b10156114085760405162461bcd60e51b815260206004820181905260248201527f476f7665726e616e63652064656c617920686173206e6f7420656c61707365646044820152606401610345565b5050565b6000611461826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114f19092919063ffffffff16565b805190915015610362578080602001905181019061147f9190611a99565b6103625760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610345565b6060611500848460008561150a565b90505b9392505050565b6060824710156115825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610345565b6001600160a01b0385163b6115d95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610345565b600080866001600160a01b031685876040516115f59190611aeb565b60006040518083038185875af1925050503d8060008114611632576040519150601f19603f3d011682016040523d82523d6000602084013e611637565b606091505b5091509150611647828286611652565b979650505050505050565b60608315611661575081611503565b8251156116715782518084602001fd5b8160405162461bcd60e51b81526004016103459190611b07565b6001600160a01b038116811461092b57600080fd5b6000806000606084860312156116b557600080fd5b83356116c08161168b565b925060208401356116d08161168b565b929592945050506040919091013590565b60008083601f8401126116f357600080fd5b50813567ffffffffffffffff81111561170b57600080fd5b60208301915083602082850101111561172357600080fd5b9250929050565b60008060008060006080868803121561174257600080fd5b853561174d8161168b565b9450602086013561175d8161168b565b935060408601359250606086013567ffffffffffffffff81111561178057600080fd5b61178c888289016116e1565b969995985093965092949392505050565b60008083601f8401126117af57600080fd5b50813567ffffffffffffffff8111156117c757600080fd5b6020830191508360208260051b850101111561172357600080fd5b600080600080604085870312156117f857600080fd5b843567ffffffffffffffff8082111561181057600080fd5b61181c8883890161179d565b9096509450602087013591508082111561183557600080fd5b506118428782880161179d565b95989497509550505050565b6000806000806060858703121561186457600080fd5b843561186f8161168b565b935060208501359250604085013567ffffffffffffffff81111561189257600080fd5b611842878288016116e1565b6000602082840312156118b057600080fd5b81356115038161168b565b6000806000604084860312156118d057600080fd5b83359250602084013567ffffffffffffffff8111156118ee57600080fd5b6118fa868287016116e1565b9497909650939450505050565b60006020828403121561191957600080fd5b5035919050565b60008060008060006080868803121561193857600080fd5b85356119438161168b565b945060208601359350604086013561195a8161168b565b9250606086013567ffffffffffffffff81111561178057600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160a01b03808816835280871660208401525084604083015260806060830152611647608083018486611976565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611a1257611a126119e8565b5060010190565b600060208284031215611a2b57600080fd5b5051919050565b600060208284031215611a4457600080fd5b81516115038161168b565b6001600160a01b0385168152836020820152606060408201526000611a78606083018486611976565b9695505050505050565b600082821015611a9457611a946119e8565b500390565b600060208284031215611aab57600080fd5b8151801515811461150357600080fd5b60005b83811015611ad6578181015183820152602001611abe565b83811115611ae5576000848401525b50505050565b60008251611afd818460208701611abb565b9190910192915050565b6020815260008251806020840152611b26816040850160208701611abb565b601f01601f1916919091016040019291505056fea26469706673582212202f0ac7db0281ac8c0004326c7e746d4b696bcf247bcd9c4847c3d196e8ecc35464736f6c63430008090033";
449
+ const isSuperArgs = (xs) => xs.length > 1;
450
+ class TBTCVault__factory extends ethers_1.ContractFactory {
451
+ constructor(...args) {
452
+ if (isSuperArgs(args)) {
453
+ super(...args);
454
+ }
455
+ else {
456
+ super(_abi, _bytecode, args[0]);
457
+ }
458
+ }
459
+ deploy(_bank, _tbtcToken, overrides) {
460
+ return super.deploy(_bank, _tbtcToken, overrides || {});
461
+ }
462
+ getDeployTransaction(_bank, _tbtcToken, overrides) {
463
+ return super.getDeployTransaction(_bank, _tbtcToken, overrides || {});
464
+ }
465
+ attach(address) {
466
+ return super.attach(address);
467
+ }
468
+ connect(signer) {
469
+ return super.connect(signer);
470
+ }
471
+ static createInterface() {
472
+ return new ethers_1.utils.Interface(_abi);
473
+ }
474
+ static connect(address, signerOrProvider) {
475
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
476
+ }
477
+ }
478
+ exports.TBTCVault__factory = TBTCVault__factory;
479
+ TBTCVault__factory.bytecode = _bytecode;
480
+ TBTCVault__factory.abi = _abi;