@keep-network/tbtc-v2 0.1.1-dev.51 → 0.1.1-dev.52

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 (65) hide show
  1. package/artifacts/Bank.json +3 -3
  2. package/artifacts/Bridge.json +129 -104
  3. package/artifacts/Deposit.json +7 -7
  4. package/artifacts/EcdsaDkgValidator.json +1 -1
  5. package/artifacts/EcdsaInactivity.json +1 -1
  6. package/artifacts/Fraud.json +7 -7
  7. package/artifacts/KeepRegistry.json +1 -1
  8. package/artifacts/KeepStake.json +2 -2
  9. package/artifacts/KeepToken.json +2 -2
  10. package/artifacts/KeepTokenStaking.json +1 -1
  11. package/artifacts/MovingFunds.json +7 -7
  12. package/artifacts/NuCypherStakingEscrow.json +1 -1
  13. package/artifacts/NuCypherToken.json +2 -2
  14. package/artifacts/RandomBeaconStub.json +1 -1
  15. package/artifacts/Redemption.json +7 -7
  16. package/artifacts/ReimbursementPool.json +2 -2
  17. package/artifacts/Relay.json +9 -9
  18. package/artifacts/SortitionPool.json +2 -2
  19. package/artifacts/Sweep.json +9 -9
  20. package/artifacts/T.json +2 -2
  21. package/artifacts/TBTC.json +3 -3
  22. package/artifacts/TBTCToken.json +3 -3
  23. package/artifacts/TokenStaking.json +1 -1
  24. package/artifacts/TokenholderGovernor.json +9 -9
  25. package/artifacts/TokenholderTimelock.json +8 -8
  26. package/artifacts/VendingMachine.json +10 -10
  27. package/artifacts/VendingMachineKeep.json +1 -1
  28. package/artifacts/VendingMachineNuCypher.json +1 -1
  29. package/artifacts/WalletRegistry.json +2 -2
  30. package/artifacts/WalletRegistryGovernance.json +2 -2
  31. package/artifacts/Wallets.json +9 -9
  32. package/artifacts/solcInputs/{c0a2aa3c07bd118332a0dc765c7f6da0.json → dcf2fc19e497270603c798faeb0a9ba9.json} +3 -3
  33. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  34. package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
  35. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
  36. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +2 -2
  37. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
  38. package/build/contracts/bridge/Bridge.sol/Bridge.json +56 -40
  39. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  40. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +10 -4
  41. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
  42. package/build/contracts/bridge/Deposit.sol/Deposit.json +2 -2
  43. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
  44. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
  45. package/build/contracts/bridge/Fraud.sol/Fraud.json +2 -2
  46. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
  47. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
  48. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +2 -2
  49. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
  50. package/build/contracts/bridge/Redemption.sol/OutboundTx.json +2 -2
  51. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
  52. package/build/contracts/bridge/Redemption.sol/Redemption.json +2 -2
  53. package/build/contracts/bridge/Sweep.sol/Sweep.dbg.json +1 -1
  54. package/build/contracts/bridge/Sweep.sol/Sweep.json +2 -2
  55. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  56. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
  57. package/build/contracts/bridge/Wallets.sol/Wallets.json +2 -2
  58. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  59. package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
  60. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
  61. package/contracts/bridge/Bridge.sol +30 -20
  62. package/contracts/bridge/BridgeState.sol +35 -20
  63. package/contracts/bridge/Wallets.sol +4 -3
  64. package/export.json +22 -6
  65. package/package.json +1 -1
@@ -105,8 +105,8 @@
105
105
  "type": "event"
106
106
  }
107
107
  ],
108
- "bytecode": "0x610fb261003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d56565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610da0565b610305565b8180156100a957600080fd5b5061007b6100b8366004610df1565b610526565b8180156100c957600080fd5b5061007b6100d8366004610e1d565b61064c565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d848461094b565b6109f5565b6bffffffffffffffffffffffff198116600090815260168701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e4a565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff90931692909217811790925560148881018054606087901c73ffffffffffffffffffffffffffffffffffffffff19909116178082559390930490911691906102a183610e76565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601483015460601b6bffffffffffffffffffffffff1990811690831614156103955760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601684016020526040902060016002820154600160a01b900460ff1660058111156103d7576103d7610e4a565b1461042f5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b601384015460028201546000916104639163ffffffff600160a01b9092048216916801000000000000000090910416610e9a565b63ffffffff16421015905080806104a357506013850154640100000000900467ffffffffffffffff16610497868686610a1c565b67ffffffffffffffff16105b6105155760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b61051f8585610b54565b5050505050565b60028301546001600160a01b031633146105925760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105a161015d848461094b565b905060016bffffffffffffffffffffffff1982166000908152601686016020526040902060020154600160a01b900460ff1660058111156105e4576105e4610e4a565b1461063c5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6106468482610b54565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106ac57600080fd5b505afa1580156106c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e49190610ec2565b60038111156106f5576106f5610e4a565b146107685760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601482015460601b6bffffffffffffffffffffffff198116156108b3576000610792848385610a1c565b6bffffffffffffffffffffffff1983166000908152601686016020526040812060020154601387015492935063ffffffff680100000000000000009091048116926107de911683610e9a565b63ffffffff1642101590508080156108105750601386015467ffffffffffffffff640100000000909104811690841610155b8061083d5750601386015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108af5760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561092e57600080fd5b505af1158015610942573d6000803e3d6000fd5b50505050505050565b6060600061095a600284610eea565b61098557507f02000000000000000000000000000000000000000000000000000000000000006109a8565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526016840160205260408120600101548015610b4c57808335610a596040860160208701610f0c565b610a696060870160408801610f32565b604051602001610ad69392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b395760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b496060840160408501610f32565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260168301602052604090206001810154610b8c57610b878383610ca8565b610c24565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601483015460601b6bffffffffffffffffffffffff199081169083161415610c665760148301805473ffffffffffffffffffffffffffffffffffffffff191690555b60148381018054600160a01b900463ffffffff1691610c8483610f5c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260168401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d6c57600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610d9a57600080fd5b50919050565b600080600060a08486031215610db557600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610dd957600080fd5b9150610de88560408601610d88565b90509250925092565b600080600060608486031215610e0657600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e3057600080fd5b82359150610e418460208501610d88565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610e9057610e90610e60565b6001019392505050565b600063ffffffff808316818516808303821115610eb957610eb9610e60565b01949350505050565b600060208284031215610ed457600080fd5b815160048110610ee357600080fd5b9392505050565b600082610f0757634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f1e57600080fd5b813563ffffffff81168114610ee357600080fd5b600060208284031215610f4457600080fd5b813567ffffffffffffffff81168114610ee357600080fd5b600063ffffffff821680610f7257610f72610e60565b600019019291505056fea26469706673582212207d3cf61a34f642871967ccd0ce3162434bad7bd4b1b8afb529e618601779e75a64736f6c63430008090033",
109
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d56565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610da0565b610305565b8180156100a957600080fd5b5061007b6100b8366004610df1565b610526565b8180156100c957600080fd5b5061007b6100d8366004610e1d565b61064c565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d848461094b565b6109f5565b6bffffffffffffffffffffffff198116600090815260168701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e4a565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff90931692909217811790925560148881018054606087901c73ffffffffffffffffffffffffffffffffffffffff19909116178082559390930490911691906102a183610e76565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601483015460601b6bffffffffffffffffffffffff1990811690831614156103955760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601684016020526040902060016002820154600160a01b900460ff1660058111156103d7576103d7610e4a565b1461042f5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b601384015460028201546000916104639163ffffffff600160a01b9092048216916801000000000000000090910416610e9a565b63ffffffff16421015905080806104a357506013850154640100000000900467ffffffffffffffff16610497868686610a1c565b67ffffffffffffffff16105b6105155760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b61051f8585610b54565b5050505050565b60028301546001600160a01b031633146105925760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105a161015d848461094b565b905060016bffffffffffffffffffffffff1982166000908152601686016020526040902060020154600160a01b900460ff1660058111156105e4576105e4610e4a565b1461063c5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6106468482610b54565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106ac57600080fd5b505afa1580156106c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e49190610ec2565b60038111156106f5576106f5610e4a565b146107685760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601482015460601b6bffffffffffffffffffffffff198116156108b3576000610792848385610a1c565b6bffffffffffffffffffffffff1983166000908152601686016020526040812060020154601387015492935063ffffffff680100000000000000009091048116926107de911683610e9a565b63ffffffff1642101590508080156108105750601386015467ffffffffffffffff640100000000909104811690841610155b8061083d5750601386015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108af5760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561092e57600080fd5b505af1158015610942573d6000803e3d6000fd5b50505050505050565b6060600061095a600284610eea565b61098557507f02000000000000000000000000000000000000000000000000000000000000006109a8565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526016840160205260408120600101548015610b4c57808335610a596040860160208701610f0c565b610a696060870160408801610f32565b604051602001610ad69392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b395760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b496060840160408501610f32565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260168301602052604090206001810154610b8c57610b878383610ca8565b610c24565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601483015460601b6bffffffffffffffffffffffff199081169083161415610c665760148301805473ffffffffffffffffffffffffffffffffffffffff191690555b60148381018054600160a01b900463ffffffff1691610c8483610f5c565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260168401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d6c57600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610d9a57600080fd5b50919050565b600080600060a08486031215610db557600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610dd957600080fd5b9150610de88560408601610d88565b90509250925092565b600080600060608486031215610e0657600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e3057600080fd5b82359150610e418460208501610d88565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610e9057610e90610e60565b6001019392505050565b600063ffffffff808316818516808303821115610eb957610eb9610e60565b01949350505050565b600060208284031215610ed457600080fd5b815160048110610ee357600080fd5b9392505050565b600082610f0757634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f1e57600080fd5b813563ffffffff81168114610ee357600080fd5b600060208284031215610f4457600080fd5b813567ffffffffffffffff81168114610ee357600080fd5b600063ffffffff821680610f7257610f72610e60565b600019019291505056fea26469706673582212207d3cf61a34f642871967ccd0ce3162434bad7bd4b1b8afb529e618601779e75a64736f6c63430008090033",
108
+ "bytecode": "0x610fca61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6e565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db8565b610305565b8180156100a957600080fd5b5061007b6100b8366004610e09565b61053e565b8180156100c957600080fd5b5061007b6100d8366004610e35565b610664565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610963565b610a0d565b6bffffffffffffffffffffffff198116600090815260168701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e62565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff90931692909217811790925560148881018054606087901c73ffffffffffffffffffffffffffffffffffffffff19909116178082559390930490911691906102a183610e8e565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601483015460601b6bffffffffffffffffffffffff1990811690831614156103955760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601684016020526040902060016002820154600160a01b900460ff1660058111156103d7576103d7610e62565b1461042f5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6013840154600282015460009161047c9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb2565b63ffffffff16421015905080806104bb57506013850154600160a01b900467ffffffffffffffff166104af868686610a34565b67ffffffffffffffff16105b61052d5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105378585610b6c565b5050505050565b60028301546001600160a01b031633146105aa5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b961015d8484610963565b905060016bffffffffffffffffffffffff1982166000908152601686016020526040902060020154600160a01b900460ff1660058111156105fc576105fc610e62565b146106545760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065e8482610b6c565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c457600080fd5b505afa1580156106d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fc9190610eda565b600381111561070d5761070d610e62565b146107805760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601482015460601b6bffffffffffffffffffffffff198116156108cb5760006107aa848385610a34565b6bffffffffffffffffffffffff1983166000908152601686016020526040812060020154601387015492935063ffffffff680100000000000000009091048116926107f6911683610eb2565b63ffffffff1642101590508080156108285750601386015467ffffffffffffffff640100000000909104811690841610155b806108555750601386015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c75760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094657600080fd5b505af115801561095a573d6000803e3d6000fd5b50505050505050565b60606000610972600284610f02565b61099d57507f02000000000000000000000000000000000000000000000000000000000000006109c0565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526016840160205260408120600101548015610b6457808335610a716040860160208701610f24565b610a816060870160408801610f4a565b604051602001610aee9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b515760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b616060840160408501610f4a565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260168301602052604090206001810154610ba457610b9f8383610cc0565b610c3c565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601483015460601b6bffffffffffffffffffffffff199081169083161415610c7e5760148301805473ffffffffffffffffffffffffffffffffffffffff191690555b60148381018054600160a01b900463ffffffff1691610c9c83610f74565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260168401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8457600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db257600080fd5b50919050565b600080600060a08486031215610dcd57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df157600080fd5b9150610e008560408601610da0565b90509250925092565b600080600060608486031215610e1e57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4857600080fd5b82359150610e598460208501610da0565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea857610ea8610e78565b6001019392505050565b600063ffffffff808316818516808303821115610ed157610ed1610e78565b01949350505050565b600060208284031215610eec57600080fd5b815160048110610efb57600080fd5b9392505050565b600082610f1f57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3657600080fd5b813563ffffffff81168114610efb57600080fd5b600060208284031215610f5c57600080fd5b813567ffffffffffffffff81168114610efb57600080fd5b600063ffffffff821680610f8a57610f8a610e78565b600019019291505056fea2646970667358221220c648e4d72297256883720b0ce612eb0ab993e4ba4856580b064f7d78f6d62df364736f6c63430008090033",
109
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6e565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db8565b610305565b8180156100a957600080fd5b5061007b6100b8366004610e09565b61053e565b8180156100c957600080fd5b5061007b6100d8366004610e35565b610664565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610963565b610a0d565b6bffffffffffffffffffffffff198116600090815260168701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e62565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff90931692909217811790925560148881018054606087901c73ffffffffffffffffffffffffffffffffffffffff19909116178082559390930490911691906102a183610e8e565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601483015460601b6bffffffffffffffffffffffff1990811690831614156103955760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601684016020526040902060016002820154600160a01b900460ff1660058111156103d7576103d7610e62565b1461042f5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6013840154600282015460009161047c9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb2565b63ffffffff16421015905080806104bb57506013850154600160a01b900467ffffffffffffffff166104af868686610a34565b67ffffffffffffffff16105b61052d5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105378585610b6c565b5050505050565b60028301546001600160a01b031633146105aa5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b961015d8484610963565b905060016bffffffffffffffffffffffff1982166000908152601686016020526040902060020154600160a01b900460ff1660058111156105fc576105fc610e62565b146106545760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065e8482610b6c565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c457600080fd5b505afa1580156106d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fc9190610eda565b600381111561070d5761070d610e62565b146107805760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601482015460601b6bffffffffffffffffffffffff198116156108cb5760006107aa848385610a34565b6bffffffffffffffffffffffff1983166000908152601686016020526040812060020154601387015492935063ffffffff680100000000000000009091048116926107f6911683610eb2565b63ffffffff1642101590508080156108285750601386015467ffffffffffffffff640100000000909104811690841610155b806108555750601386015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c75760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094657600080fd5b505af115801561095a573d6000803e3d6000fd5b50505050505050565b60606000610972600284610f02565b61099d57507f02000000000000000000000000000000000000000000000000000000000000006109c0565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526016840160205260408120600101548015610b6457808335610a716040860160208701610f24565b610a816060870160408801610f4a565b604051602001610aee9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b515760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b616060840160408501610f4a565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260168301602052604090206001810154610ba457610b9f8383610cc0565b610c3c565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601483015460601b6bffffffffffffffffffffffff199081169083161415610c7e5760148301805473ffffffffffffffffffffffffffffffffffffffff191690555b60148381018054600160a01b900463ffffffff1691610c9c83610f74565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260168401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8457600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db257600080fd5b50919050565b600080600060a08486031215610dcd57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df157600080fd5b9150610e008560408601610da0565b90509250925092565b600080600060608486031215610e1e57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4857600080fd5b82359150610e598460208501610da0565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea857610ea8610e78565b6001019392505050565b600063ffffffff808316818516808303821115610ed157610ed1610e78565b01949350505050565b600060208284031215610eec57600080fd5b815160048110610efb57600080fd5b9392505050565b600082610f1f57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3657600080fd5b813563ffffffff81168114610efb57600080fd5b600060208284031215610f5c57600080fd5b813567ffffffffffffffff81168114610efb57600080fd5b600063ffffffff821680610f8a57610f8a610e78565b600019019291505056fea2646970667358221220c648e4d72297256883720b0ce612eb0ab993e4ba4856580b064f7d78f6d62df364736f6c63430008090033",
110
110
  "linkReferences": {},
111
111
  "deployedLinkReferences": {}
112
112
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d3fb7ddf13682b804733089ddc2e3593.json"
3
+ "buildInfo": "../../../build-info/56246e970773303d73e2322335b49cbc.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d3fb7ddf13682b804733089ddc2e3593.json"
3
+ "buildInfo": "../../../build-info/56246e970773303d73e2322335b49cbc.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/d3fb7ddf13682b804733089ddc2e3593.json"
3
+ "buildInfo": "../../../build-info/56246e970773303d73e2322335b49cbc.json"
4
4
  }
@@ -181,8 +181,9 @@ contract Bridge is Governable, EcdsaWalletOwner {
181
181
 
182
182
  event WalletParametersUpdated(
183
183
  uint32 walletCreationPeriod,
184
- uint64 walletMinBtcBalance,
185
- uint64 walletMaxBtcBalance,
184
+ uint64 walletCreationMinBtcBalance,
185
+ uint64 walletCreationMaxBtcBalance,
186
+ uint64 walletClosureMinBtcBalance,
186
187
  uint32 walletMaxAge,
187
188
  uint64 walletMaxBtcTransfer,
188
189
  uint32 walletClosingPeriod
@@ -235,8 +236,9 @@ contract Bridge is Governable, EcdsaWalletOwner {
235
236
  self.fraudChallengeDefeatTimeout = 7 days;
236
237
  self.fraudChallengeDepositAmount = 2 ether;
237
238
  self.walletCreationPeriod = 1 weeks;
238
- self.walletMinBtcBalance = 1e8; // 1 BTC
239
- self.walletMaxBtcBalance = 10e8; // 10 BTC
239
+ self.walletCreationMinBtcBalance = 1e8; // 1 BTC
240
+ self.walletCreationMaxBtcBalance = 100e8; // 100 BTC
241
+ self.walletClosureMinBtcBalance = 5 * 1e7; // 0.5 BTC
240
242
  self.walletMaxAge = 26 weeks; // ~6 months
241
243
  self.walletMaxBtcTransfer = 10e8; // 10 BTC
242
244
  self.walletClosingPeriod = 40 days;
@@ -960,10 +962,12 @@ contract Bridge is Governable, EcdsaWalletOwner {
960
962
  /// @param walletCreationPeriod New value of the wallet creation period in
961
963
  /// seconds, determines how frequently a new wallet creation can be
962
964
  /// requested
963
- /// @param walletMinBtcBalance New value of the wallet minimum BTC balance
964
- /// in satoshi, used to decide about wallet creation or closing
965
- /// @param walletMaxBtcBalance New value of the wallet maximum BTC balance
966
- /// in satoshi, used to decide about wallet creation
965
+ /// @param walletCreationMinBtcBalance New value of the wallet minimum BTC
966
+ /// balance in satoshi, used to decide about wallet creation
967
+ /// @param walletCreationMaxBtcBalance New value of the wallet maximum BTC
968
+ /// balance in satoshi, used to decide about wallet creation
969
+ /// @param walletClosureMinBtcBalance New value of the wallet minimum BTC
970
+ /// balance in satoshi, used to decide about wallet closure
967
971
  /// @param walletMaxAge New value of the wallet maximum age in seconds,
968
972
  /// indicates the maximum age of a wallet in seconds, after which
969
973
  /// the wallet moving funds process can be requested
@@ -982,16 +986,18 @@ contract Bridge is Governable, EcdsaWalletOwner {
982
986
  /// - Wallet closing period must be greater than zero
983
987
  function updateWalletParameters(
984
988
  uint32 walletCreationPeriod,
985
- uint64 walletMinBtcBalance,
986
- uint64 walletMaxBtcBalance,
989
+ uint64 walletCreationMinBtcBalance,
990
+ uint64 walletCreationMaxBtcBalance,
991
+ uint64 walletClosureMinBtcBalance,
987
992
  uint32 walletMaxAge,
988
993
  uint64 walletMaxBtcTransfer,
989
994
  uint32 walletClosingPeriod
990
995
  ) external onlyGovernance {
991
996
  self.updateWalletParameters(
992
997
  walletCreationPeriod,
993
- walletMinBtcBalance,
994
- walletMaxBtcBalance,
998
+ walletCreationMinBtcBalance,
999
+ walletCreationMaxBtcBalance,
1000
+ walletClosureMinBtcBalance,
995
1001
  walletMaxAge,
996
1002
  walletMaxBtcTransfer,
997
1003
  walletClosingPeriod
@@ -1246,10 +1252,12 @@ contract Bridge is Governable, EcdsaWalletOwner {
1246
1252
 
1247
1253
  /// @return walletCreationPeriod Determines how frequently a new wallet
1248
1254
  /// creation can be requested. Value in seconds.
1249
- /// @return walletMinBtcBalance The minimum BTC threshold in satoshi that is
1250
- /// used to decide about wallet creation or closing.
1251
- /// @return walletMaxBtcBalance The maximum BTC threshold in satoshi that is
1252
- /// used to decide about wallet creation.
1255
+ /// @return walletCreationMinBtcBalance The minimum BTC threshold in satoshi
1256
+ /// that is used to decide about wallet creation.
1257
+ /// @return walletCreationMaxBtcBalance The maximum BTC threshold in satoshi
1258
+ /// that is used to decide about wallet creation.
1259
+ /// @return walletClosureMinBtcBalance The minimum BTC threshold in satoshi
1260
+ /// that is used to decide about wallet closure.
1253
1261
  /// @return walletMaxAge The maximum age of a wallet in seconds, after which
1254
1262
  /// the wallet moving funds process can be requested.
1255
1263
  /// @return walletMaxBtcTransfer The maximum BTC amount in satoshi than
@@ -1264,16 +1272,18 @@ contract Bridge is Governable, EcdsaWalletOwner {
1264
1272
  view
1265
1273
  returns (
1266
1274
  uint32 walletCreationPeriod,
1267
- uint64 walletMinBtcBalance,
1268
- uint64 walletMaxBtcBalance,
1275
+ uint64 walletCreationMinBtcBalance,
1276
+ uint64 walletCreationMaxBtcBalance,
1277
+ uint64 walletClosureMinBtcBalance,
1269
1278
  uint32 walletMaxAge,
1270
1279
  uint64 walletMaxBtcTransfer,
1271
1280
  uint32 walletClosingPeriod
1272
1281
  )
1273
1282
  {
1274
1283
  walletCreationPeriod = self.walletCreationPeriod;
1275
- walletMinBtcBalance = self.walletMinBtcBalance;
1276
- walletMaxBtcBalance = self.walletMaxBtcBalance;
1284
+ walletCreationMinBtcBalance = self.walletCreationMinBtcBalance;
1285
+ walletCreationMaxBtcBalance = self.walletCreationMaxBtcBalance;
1286
+ walletClosureMinBtcBalance = self.walletClosureMinBtcBalance;
1277
1287
  walletMaxAge = self.walletMaxAge;
1278
1288
  walletMaxBtcTransfer = self.walletMaxBtcTransfer;
1279
1289
  walletClosingPeriod = self.walletClosingPeriod;
@@ -175,11 +175,20 @@ library BridgeState {
175
175
  // Value in seconds.
176
176
  uint32 walletCreationPeriod;
177
177
  // The minimum BTC threshold in satoshi that is used to decide about
178
- // wallet creation or closing.
179
- uint64 walletMinBtcBalance;
178
+ // wallet creation. Specifically, we allow for the creation of a new
179
+ // wallet if the active wallet is old enough and their amount of BTC
180
+ // is greater than or equal this threshold.
181
+ uint64 walletCreationMinBtcBalance;
180
182
  // The maximum BTC threshold in satoshi that is used to decide about
181
- // wallet creation.
182
- uint64 walletMaxBtcBalance;
183
+ // wallet creation. Specifically, we allow for the creation of a new
184
+ // wallet if the active wallet's amount of BTC is greater than or equal
185
+ // this threshold, regardless of the active wallet's age.
186
+ uint64 walletCreationMaxBtcBalance;
187
+ // The minimum BTC threshold in satoshi that is used to decide about
188
+ // wallet closing. Specifically, we allow for the closure of the given
189
+ // wallet if their amount of BTC is lesser than this threshold,
190
+ // regardless of the wallet's age.
191
+ uint64 walletClosureMinBtcBalance;
183
192
  // The maximum age of a wallet in seconds, after which the wallet
184
193
  // moving funds process can be requested.
185
194
  uint32 walletMaxAge;
@@ -224,8 +233,9 @@ library BridgeState {
224
233
 
225
234
  event WalletParametersUpdated(
226
235
  uint32 walletCreationPeriod,
227
- uint64 walletMinBtcBalance,
228
- uint64 walletMaxBtcBalance,
236
+ uint64 walletCreationMinBtcBalance,
237
+ uint64 walletCreationMaxBtcBalance,
238
+ uint64 walletClosureMinBtcBalance,
229
239
  uint32 walletMaxAge,
230
240
  uint64 walletMaxBtcTransfer,
231
241
  uint32 walletClosingPeriod
@@ -426,10 +436,12 @@ library BridgeState {
426
436
  /// @param _walletCreationPeriod New value of the wallet creation period in
427
437
  /// seconds, determines how frequently a new wallet creation can be
428
438
  /// requested
429
- /// @param _walletMinBtcBalance New value of the wallet minimum BTC balance
430
- /// in satoshi, used to decide about wallet creation or closing
431
- /// @param _walletMaxBtcBalance New value of the wallet maximum BTC balance
432
- /// in satoshi, used to decide about wallet creation
439
+ /// @param _walletCreationMinBtcBalance New value of the wallet minimum BTC
440
+ /// balance in satoshi, used to decide about wallet creation
441
+ /// @param _walletCreationMaxBtcBalance New value of the wallet maximum BTC
442
+ /// balance in satoshi, used to decide about wallet creation
443
+ /// @param _walletClosureMinBtcBalance New value of the wallet minimum BTC
444
+ /// balance in satoshi, used to decide about wallet closure
433
445
  /// @param _walletMaxAge New value of the wallet maximum age in seconds,
434
446
  /// indicates the maximum age of a wallet in seconds, after which
435
447
  /// the wallet moving funds process can be requested
@@ -449,19 +461,20 @@ library BridgeState {
449
461
  function updateWalletParameters(
450
462
  Storage storage self,
451
463
  uint32 _walletCreationPeriod,
452
- uint64 _walletMinBtcBalance,
453
- uint64 _walletMaxBtcBalance,
464
+ uint64 _walletCreationMinBtcBalance,
465
+ uint64 _walletCreationMaxBtcBalance,
466
+ uint64 _walletClosureMinBtcBalance,
454
467
  uint32 _walletMaxAge,
455
468
  uint64 _walletMaxBtcTransfer,
456
469
  uint32 _walletClosingPeriod
457
470
  ) internal {
458
471
  require(
459
- _walletMinBtcBalance > 0,
460
- "Wallet minimum BTC balance must be greater than zero"
472
+ _walletCreationMaxBtcBalance > _walletCreationMinBtcBalance,
473
+ "Wallet creation maximum BTC balance must be greater than the creation minimum BTC balance"
461
474
  );
462
475
  require(
463
- _walletMaxBtcBalance > _walletMinBtcBalance,
464
- "Wallet maximum BTC balance must be greater than the minimum"
476
+ _walletClosureMinBtcBalance > 0,
477
+ "Wallet closure minimum BTC balance must be greater than zero"
465
478
  );
466
479
  require(
467
480
  _walletMaxBtcTransfer > 0,
@@ -473,16 +486,18 @@ library BridgeState {
473
486
  );
474
487
 
475
488
  self.walletCreationPeriod = _walletCreationPeriod;
476
- self.walletMinBtcBalance = _walletMinBtcBalance;
477
- self.walletMaxBtcBalance = _walletMaxBtcBalance;
489
+ self.walletCreationMinBtcBalance = _walletCreationMinBtcBalance;
490
+ self.walletCreationMaxBtcBalance = _walletCreationMaxBtcBalance;
491
+ self.walletClosureMinBtcBalance = _walletClosureMinBtcBalance;
478
492
  self.walletMaxAge = _walletMaxAge;
479
493
  self.walletMaxBtcTransfer = _walletMaxBtcTransfer;
480
494
  self.walletClosingPeriod = _walletClosingPeriod;
481
495
 
482
496
  emit WalletParametersUpdated(
483
497
  _walletCreationPeriod,
484
- _walletMinBtcBalance,
485
- _walletMaxBtcBalance,
498
+ _walletCreationMinBtcBalance,
499
+ _walletCreationMaxBtcBalance,
500
+ _walletClosureMinBtcBalance,
486
501
  _walletMaxAge,
487
502
  _walletMaxBtcTransfer,
488
503
  _walletClosingPeriod
@@ -163,8 +163,9 @@ library Wallets {
163
163
 
164
164
  require(
165
165
  (activeWalletOldEnough &&
166
- activeWalletBtcBalance >= self.walletMinBtcBalance) ||
167
- activeWalletBtcBalance >= self.walletMaxBtcBalance,
166
+ activeWalletBtcBalance >=
167
+ self.walletCreationMinBtcBalance) ||
168
+ activeWalletBtcBalance >= self.walletCreationMaxBtcBalance,
168
169
  "Wallet creation conditions are not met"
169
170
  );
170
171
  }
@@ -356,7 +357,7 @@ library Wallets {
356
357
  require(
357
358
  walletOldEnough ||
358
359
  getWalletBtcBalance(self, walletPubKeyHash, walletMainUtxo) <
359
- self.walletMinBtcBalance,
360
+ self.walletClosureMinBtcBalance,
360
361
  "Wallet needs to be old enough or have too few satoshis"
361
362
  );
362
363
 
package/export.json CHANGED
@@ -14574,13 +14574,19 @@
14574
14574
  {
14575
14575
  "indexed": false,
14576
14576
  "internalType": "uint64",
14577
- "name": "walletMinBtcBalance",
14577
+ "name": "walletCreationMinBtcBalance",
14578
14578
  "type": "uint64"
14579
14579
  },
14580
14580
  {
14581
14581
  "indexed": false,
14582
14582
  "internalType": "uint64",
14583
- "name": "walletMaxBtcBalance",
14583
+ "name": "walletCreationMaxBtcBalance",
14584
+ "type": "uint64"
14585
+ },
14586
+ {
14587
+ "indexed": false,
14588
+ "internalType": "uint64",
14589
+ "name": "walletClosureMinBtcBalance",
14584
14590
  "type": "uint64"
14585
14591
  },
14586
14592
  {
@@ -16119,12 +16125,17 @@
16119
16125
  },
16120
16126
  {
16121
16127
  "internalType": "uint64",
16122
- "name": "walletMinBtcBalance",
16128
+ "name": "walletCreationMinBtcBalance",
16123
16129
  "type": "uint64"
16124
16130
  },
16125
16131
  {
16126
16132
  "internalType": "uint64",
16127
- "name": "walletMaxBtcBalance",
16133
+ "name": "walletCreationMaxBtcBalance",
16134
+ "type": "uint64"
16135
+ },
16136
+ {
16137
+ "internalType": "uint64",
16138
+ "name": "walletClosureMinBtcBalance",
16128
16139
  "type": "uint64"
16129
16140
  },
16130
16141
  {
@@ -16159,12 +16170,17 @@
16159
16170
  },
16160
16171
  {
16161
16172
  "internalType": "uint64",
16162
- "name": "walletMinBtcBalance",
16173
+ "name": "walletCreationMinBtcBalance",
16174
+ "type": "uint64"
16175
+ },
16176
+ {
16177
+ "internalType": "uint64",
16178
+ "name": "walletCreationMaxBtcBalance",
16163
16179
  "type": "uint64"
16164
16180
  },
16165
16181
  {
16166
16182
  "internalType": "uint64",
16167
- "name": "walletMaxBtcBalance",
16183
+ "name": "walletClosureMinBtcBalance",
16168
16184
  "type": "uint64"
16169
16185
  },
16170
16186
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keep-network/tbtc-v2",
3
- "version": "0.1.1-dev.51+main.2bbde1a93f2bb8ae73f42ac83ee999962a07cfb8",
3
+ "version": "0.1.1-dev.52+main.e8e6fbac6b44cd97e21045dcf78ff9c682e14ca6",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "artifacts/",