@keep-network/tbtc-v2 0.1.1-dev.53 → 0.1.1-dev.54

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 (67) hide show
  1. package/artifacts/Bank.json +6 -6
  2. package/artifacts/Bridge.json +187 -144
  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 +8 -8
  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 +13 -12
  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 +11 -11
  16. package/artifacts/ReimbursementPool.json +2 -2
  17. package/artifacts/Relay.json +11 -11
  18. package/artifacts/SortitionPool.json +2 -2
  19. package/artifacts/Sweep.json +7 -7
  20. package/artifacts/T.json +2 -2
  21. package/artifacts/TBTC.json +6 -6
  22. package/artifacts/TBTCToken.json +6 -6
  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 +13 -13
  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/{fa22a04615b4037761340d27e55c86ee.json → 799c7b289d9b6d9cfc600d2fc23c7b64.json} +6 -6
  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 +71 -34
  39. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  40. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +14 -2
  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 +46 -7
  62. package/contracts/bridge/BridgeState.sol +32 -0
  63. package/contracts/bridge/Fraud.sol +1 -1
  64. package/contracts/bridge/MovingFunds.sol +16 -3
  65. package/contracts/bridge/Redemption.sol +4 -4
  66. package/export.json +37 -13
  67. package/package.json +1 -1
@@ -105,8 +105,8 @@
105
105
  "type": "event"
106
106
  }
107
107
  ],
108
- "bytecode": "0x610fc961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260188701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601688018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601683015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601884016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6015840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506015850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601886016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601682015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601886016020526040812060020154601587015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601586015467ffffffffffffffff640100000000909104811690841610155b806108535750601586015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526018840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260188301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601683015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760168301805473ffffffffffffffffffffffffffffffffffffffff191690555b601683018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260188401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea264697066735822122096029d789a86d700205ad41f66aeb39f80cd5e687414fe625f63d07730ed954064736f6c63430008090033",
109
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260188701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601688018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601683015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601884016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6015840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506015850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601886016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601682015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601886016020526040812060020154601587015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601586015467ffffffffffffffff640100000000909104811690841610155b806108535750601586015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526018840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260188301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601683015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760168301805473ffffffffffffffffffffffffffffffffffffffff191690555b601683018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260188401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea264697066735822122096029d789a86d700205ad41f66aeb39f80cd5e687414fe625f63d07730ed954064736f6c63430008090033",
108
+ "bytecode": "0x610fc961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260198701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601788018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601783015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601984016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6016840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506016850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601986016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601782015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601986016020526040812060020154601687015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601686015467ffffffffffffffff640100000000909104811690841610155b806108535750601686015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526019840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260198301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601783015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760178301805473ffffffffffffffffffffffffffffffffffffffff191690555b601783018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260198401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea264697066735822122042531d987a66f22ba581f99073d53e28dbf61355e7e99b062554946dfc20656c64736f6c63430008090033",
109
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260198701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601788018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601783015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601984016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6016840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506016850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601986016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601782015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601986016020526040812060020154601687015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601686015467ffffffffffffffff640100000000909104811690841610155b806108535750601686015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526019840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260198301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601783015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760178301805473ffffffffffffffffffffffffffffffffffffffff191690555b601783018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260198401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea264697066735822122042531d987a66f22ba581f99073d53e28dbf61355e7e99b062554946dfc20656c64736f6c63430008090033",
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/6c07349b3303af572ca3fa620ed6ac06.json"
3
+ "buildInfo": "../../../build-info/05cc45695cb9d698abcf6fb2f07c0127.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/6c07349b3303af572ca3fa620ed6ac06.json"
3
+ "buildInfo": "../../../build-info/05cc45695cb9d698abcf6fb2f07c0127.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/6c07349b3303af572ca3fa620ed6ac06.json"
3
+ "buildInfo": "../../../build-info/05cc45695cb9d698abcf6fb2f07c0127.json"
4
4
  }
@@ -178,6 +178,8 @@ contract Bridge is Governable, EcdsaWalletOwner {
178
178
  event MovingFundsParametersUpdated(
179
179
  uint64 movingFundsTxMaxTotalFee,
180
180
  uint32 movingFundsTimeout,
181
+ uint96 movingFundsTimeoutSlashingAmount,
182
+ uint256 movingFundsTimeoutNotifierRewardMultiplier,
181
183
  uint64 movingFundsDustThreshold
182
184
  );
183
185
 
@@ -234,6 +236,8 @@ contract Bridge is Governable, EcdsaWalletOwner {
234
236
  self.redemptionTimeoutNotifierRewardMultiplier = 100; // 100%
235
237
  self.movingFundsTxMaxTotalFee = 10000; // 10000 satoshi
236
238
  self.movingFundsTimeout = 7 days;
239
+ self.movingFundsTimeoutSlashingAmount = 10000 * 1e18; // 10000 T
240
+ self.movingFundsTimeoutNotifierRewardMultiplier = 100; //100%
237
241
  self.movingFundsDustThreshold = 20000; // 20000 satoshi
238
242
  self.fraudSlashingAmount = 10000 * 1e18; // 10000 T
239
243
  self.fraudNotifierRewardMultiplier = 100; // 100%
@@ -446,10 +450,10 @@ contract Bridge is Governable, EcdsaWalletOwner {
446
450
  /// - the tokens taken from the redeemer on redemption request will
447
451
  /// be returned to the redeemer,
448
452
  /// - the request will be moved from pending redemptions to
449
- /// timed-out redemptions.
453
+ /// timed-out redemptions,
450
454
  /// - if the state of the wallet is `Live` or `MovingFunds`, the
451
455
  /// wallet operators will be slashed and the notifier will be
452
- /// rewarded
456
+ /// rewarded,
453
457
  /// - if the state of wallet is `Live`, the wallet will be closed or
454
458
  /// marked as `MovingFunds` (depending on the presence or absence
455
459
  /// of the wallet's main UTXO) and the wallet will no longer be
@@ -467,10 +471,10 @@ contract Bridge is Governable, EcdsaWalletOwner {
467
471
  /// for the given `walletID`. Those IDs are not directly stored
468
472
  /// in the contract for gas efficiency purposes but they can be
469
473
  /// read from appropriate `DkgResultSubmitted` and `DkgResultApproved`
470
- /// events.
474
+ /// events of the `WalletRegistry` contract
471
475
  /// - The amount of time defined by `redemptionTimeout` must have
472
476
  /// passed since the redemption was requested (the request must be
473
- /// timed-out).
477
+ /// timed-out)
474
478
  function notifyRedemptionTimeout(
475
479
  bytes20 walletPubKeyHash,
476
480
  uint32[] calldata walletMembersIDs,
@@ -600,11 +604,21 @@ contract Bridge is Governable, EcdsaWalletOwner {
600
604
  /// @notice Notifies about a timed out moving funds process. Terminates
601
605
  /// the wallet and slashes signing group members as a result.
602
606
  /// @param walletPubKeyHash 20-byte public key hash of the wallet
607
+ /// @param walletMembersIDs Identifiers of the wallet signing group members
603
608
  /// @dev Requirements:
604
609
  /// - The wallet must be in the MovingFunds state
605
610
  /// - The moving funds timeout must be actually exceeded
606
- function notifyMovingFundsTimeout(bytes20 walletPubKeyHash) external {
607
- self.notifyMovingFundsTimeout(walletPubKeyHash);
611
+ /// - The expression `keccak256(abi.encode(walletMembersIDs))` must
612
+ /// be exactly the same as the hash stored under `membersIdsHash`
613
+ /// for the given `walletID`. Those IDs are not directly stored
614
+ /// in the contract for gas efficiency purposes but they can be
615
+ /// read from appropriate `DkgResultSubmitted` and `DkgResultApproved`
616
+ /// events of the `WalletRegistry` contract
617
+ function notifyMovingFundsTimeout(
618
+ bytes20 walletPubKeyHash,
619
+ uint32[] calldata walletMembersIDs
620
+ ) external {
621
+ self.notifyMovingFundsTimeout(walletPubKeyHash, walletMembersIDs);
608
622
  }
609
623
 
610
624
  /// @notice Notifies about a moving funds wallet whose BTC balance is
@@ -824,7 +838,7 @@ contract Bridge is Governable, EcdsaWalletOwner {
824
838
  /// for the given `walletID`. Those IDs are not directly stored
825
839
  /// in the contract for gas efficiency purposes but they can be
826
840
  /// read from appropriate `DkgResultSubmitted` and `DkgResultApproved`
827
- /// events.
841
+ /// events of the `WalletRegistry` contract
828
842
  /// - The amount of time indicated by `challengeDefeatTimeout` must pass
829
843
  /// after the challenge was reported
830
844
  function notifyFraudChallengeDefeatTimeout(
@@ -970,6 +984,14 @@ contract Bridge is Governable, EcdsaWalletOwner {
970
984
  /// be reported as timed out. It is counted from the moment when the
971
985
  /// wallet was requested to move their funds and switched to the
972
986
  /// MovingFunds state.
987
+ /// @param movingFundsTimeoutSlashingAmount New value of the moving funds
988
+ /// timeout slashing amount in T, it is the amount slashed from each
989
+ /// wallet member for moving funds timeout
990
+ /// @param movingFundsTimeoutNotifierRewardMultiplier New value of the
991
+ /// moving funds timeout notifier reward multiplier as percentage,
992
+ /// it determines the percentage of the notifier reward from the
993
+ /// staking contact the notifier of a moving funds timeout receives.
994
+ /// The value must be in the range [0, 100]
973
995
  /// @param movingFundsDustThreshold New value of the moving funds dust
974
996
  /// threshold. It is the minimal satoshi amount that makes sense to
975
997
  // be transferred during the moving funds process. Moving funds
@@ -979,15 +1001,21 @@ contract Bridge is Governable, EcdsaWalletOwner {
979
1001
  /// @dev Requirements:
980
1002
  /// - Moving funds transaction max total fee must be greater than zero
981
1003
  /// - Moving funds timeout must be greater than zero
1004
+ /// - Moving funds timeout notifier reward multiplier must be in the
1005
+ /// range [0, 100]
982
1006
  /// - Moving funds dust threshold must be greater than zero
983
1007
  function updateMovingFundsParameters(
984
1008
  uint64 movingFundsTxMaxTotalFee,
985
1009
  uint32 movingFundsTimeout,
1010
+ uint96 movingFundsTimeoutSlashingAmount,
1011
+ uint256 movingFundsTimeoutNotifierRewardMultiplier,
986
1012
  uint64 movingFundsDustThreshold
987
1013
  ) external onlyGovernance {
988
1014
  self.updateMovingFundsParameters(
989
1015
  movingFundsTxMaxTotalFee,
990
1016
  movingFundsTimeout,
1017
+ movingFundsTimeoutSlashingAmount,
1018
+ movingFundsTimeoutNotifierRewardMultiplier,
991
1019
  movingFundsDustThreshold
992
1020
  );
993
1021
  }
@@ -1275,6 +1303,11 @@ contract Bridge is Governable, EcdsaWalletOwner {
1275
1303
  /// can be reported as timed out. It is counted from the moment
1276
1304
  /// when the wallet was requested to move their funds and switched
1277
1305
  /// to the MovingFunds state. Value in seconds.
1306
+ /// @return movingFundsTimeoutSlashingAmount The amount of stake slashed
1307
+ /// from each member of a wallet for a moving funds timeout.
1308
+ /// @return movingFundsTimeoutNotifierRewardMultiplier The percentage of the
1309
+ /// notifier reward from the staking contract the notifier of a
1310
+ /// moving funds timeout receives. The value is in the range [0, 100].
1278
1311
  /// @return movingFundsDustThreshold The minimal satoshi amount that makes
1279
1312
  // sense to be transferred during the moving funds process. Moving
1280
1313
  // funds wallets having their BTC balance below that value can
@@ -1286,11 +1319,17 @@ contract Bridge is Governable, EcdsaWalletOwner {
1286
1319
  returns (
1287
1320
  uint64 movingFundsTxMaxTotalFee,
1288
1321
  uint32 movingFundsTimeout,
1322
+ uint96 movingFundsTimeoutSlashingAmount,
1323
+ uint256 movingFundsTimeoutNotifierRewardMultiplier,
1289
1324
  uint64 movingFundsDustThreshold
1290
1325
  )
1291
1326
  {
1292
1327
  movingFundsTxMaxTotalFee = self.movingFundsTxMaxTotalFee;
1293
1328
  movingFundsTimeout = self.movingFundsTimeout;
1329
+ movingFundsTimeoutSlashingAmount = self
1330
+ .movingFundsTimeoutSlashingAmount;
1331
+ movingFundsTimeoutNotifierRewardMultiplier = self
1332
+ .movingFundsTimeoutNotifierRewardMultiplier;
1294
1333
  movingFundsDustThreshold = self.movingFundsDustThreshold;
1295
1334
  }
1296
1335
 
@@ -88,6 +88,13 @@ library BridgeState {
88
88
  // was requested to move their funds and switched to the MovingFunds
89
89
  // state. Value in seconds.
90
90
  uint32 movingFundsTimeout;
91
+ // The amount of stake slashed from each member of a wallet for a moving
92
+ // funds timeout.
93
+ uint96 movingFundsTimeoutSlashingAmount;
94
+ // The percentage of the notifier reward from the staking contract
95
+ // the notifier of a moving funds timeout receives. The value is in the
96
+ // range [0, 100].
97
+ uint256 movingFundsTimeoutNotifierRewardMultiplier;
91
98
  // The minimal satoshi amount that makes sense to be transferred during
92
99
  // the moving funds process. Moving funds wallets having their BTC
93
100
  // balance below that value can begin closing immediately as
@@ -237,6 +244,8 @@ library BridgeState {
237
244
  event MovingFundsParametersUpdated(
238
245
  uint64 movingFundsTxMaxTotalFee,
239
246
  uint32 movingFundsTimeout,
247
+ uint96 movingFundsTimeoutSlashingAmount,
248
+ uint256 movingFundsTimeoutNotifierRewardMultiplier,
240
249
  uint64 movingFundsDustThreshold
241
250
  );
242
251
 
@@ -421,6 +430,14 @@ library BridgeState {
421
430
  /// be reported as timed out. It is counted from the moment when the
422
431
  /// wallet was requested to move their funds and switched to the
423
432
  /// MovingFunds state.
433
+ /// @param _movingFundsTimeoutSlashingAmount New value of the moving funds
434
+ /// timeout slashing amount in T, it is the amount slashed from each
435
+ /// wallet member for moving funds timeout
436
+ /// @param _movingFundsTimeoutNotifierRewardMultiplier New value of the
437
+ /// moving funds timeout notifier reward multiplier as percentage,
438
+ /// it determines the percentage of the notifier reward from the
439
+ /// staking contact the notifier of a moving funds timeout receives.
440
+ /// The value must be in the range [0, 100]
424
441
  /// @param _movingFundsDustThreshold New value of the moving funds dust
425
442
  /// threshold. It is the minimal satoshi amount that makes sense to
426
443
  // be transferred during the moving funds process. Moving funds
@@ -430,11 +447,15 @@ library BridgeState {
430
447
  /// @dev Requirements:
431
448
  /// - Moving funds transaction max total fee must be greater than zero
432
449
  /// - Moving funds timeout must be greater than zero
450
+ /// - Moving funds timeout notifier reward multiplier must be in the
451
+ /// range [0, 100]
433
452
  /// - Moving funds dust threshold must be greater than zero
434
453
  function updateMovingFundsParameters(
435
454
  Storage storage self,
436
455
  uint64 _movingFundsTxMaxTotalFee,
437
456
  uint32 _movingFundsTimeout,
457
+ uint96 _movingFundsTimeoutSlashingAmount,
458
+ uint256 _movingFundsTimeoutNotifierRewardMultiplier,
438
459
  uint64 _movingFundsDustThreshold
439
460
  ) internal {
440
461
  require(
@@ -447,6 +468,11 @@ library BridgeState {
447
468
  "Moving funds timeout must be greater than zero"
448
469
  );
449
470
 
471
+ require(
472
+ _movingFundsTimeoutNotifierRewardMultiplier <= 100,
473
+ "Moving funds timeout notifier reward multiplier must be in the range [0, 100]"
474
+ );
475
+
450
476
  require(
451
477
  _movingFundsDustThreshold > 0,
452
478
  "Moving funds dust threshold must be greater than zero"
@@ -454,11 +480,17 @@ library BridgeState {
454
480
 
455
481
  self.movingFundsTxMaxTotalFee = _movingFundsTxMaxTotalFee;
456
482
  self.movingFundsTimeout = _movingFundsTimeout;
483
+ self
484
+ .movingFundsTimeoutSlashingAmount = _movingFundsTimeoutSlashingAmount;
485
+ self
486
+ .movingFundsTimeoutNotifierRewardMultiplier = _movingFundsTimeoutNotifierRewardMultiplier;
457
487
  self.movingFundsDustThreshold = _movingFundsDustThreshold;
458
488
 
459
489
  emit MovingFundsParametersUpdated(
460
490
  _movingFundsTxMaxTotalFee,
461
491
  _movingFundsTimeout,
492
+ _movingFundsTimeoutSlashingAmount,
493
+ _movingFundsTimeoutNotifierRewardMultiplier,
462
494
  _movingFundsDustThreshold
463
495
  );
464
496
  }
@@ -277,7 +277,7 @@ library Fraud {
277
277
  /// for the given `walletID`. Those IDs are not directly stored
278
278
  /// in the contract for gas efficiency purposes but they can be
279
279
  /// read from appropriate `DkgResultSubmitted` and `DkgResultApproved`
280
- /// events.
280
+ /// events of the `WalletRegistry` contract
281
281
  /// - The amount of time indicated by `challengeDefeatTimeout` must pass
282
282
  /// after the challenge was reported
283
283
  function notifyFraudChallengeDefeatTimeout(
@@ -434,12 +434,20 @@ library MovingFunds {
434
434
  /// @notice Notifies about a timed out moving funds process. Terminates
435
435
  /// the wallet and slashes signing group members as a result.
436
436
  /// @param walletPubKeyHash 20-byte public key hash of the wallet
437
+ /// @param walletMembersIDs Identifiers of the wallet signing group members
437
438
  /// @dev Requirements:
438
439
  /// - The wallet must be in the MovingFunds state
439
440
  /// - The moving funds timeout must be actually exceeded
441
+ /// - The expression `keccak256(abi.encode(walletMembersIDs))` must
442
+ /// be exactly the same as the hash stored under `membersIdsHash`
443
+ /// for the given `walletID`. Those IDs are not directly stored
444
+ /// in the contract for gas efficiency purposes but they can be
445
+ /// read from appropriate `DkgResultSubmitted` and `DkgResultApproved`
446
+ /// events of the `WalletRegistry` contract
440
447
  function notifyMovingFundsTimeout(
441
448
  BridgeState.Storage storage self,
442
- bytes20 walletPubKeyHash
449
+ bytes20 walletPubKeyHash,
450
+ uint32[] calldata walletMembersIDs
443
451
  ) external {
444
452
  Wallets.Wallet storage wallet = self.registeredWallets[
445
453
  walletPubKeyHash
@@ -459,8 +467,13 @@ library MovingFunds {
459
467
 
460
468
  self.terminateWallet(walletPubKeyHash);
461
469
 
462
- // TODO: Perform slashing of wallet operators, reward the notifier
463
- // using seized amount, and add unit tests for that.
470
+ self.ecdsaWalletRegistry.seize(
471
+ self.movingFundsTimeoutSlashingAmount,
472
+ self.movingFundsTimeoutNotifierRewardMultiplier,
473
+ msg.sender,
474
+ wallet.ecdsaWalletID,
475
+ walletMembersIDs
476
+ );
464
477
 
465
478
  // slither-disable-next-line reentrancy-events
466
479
  emit MovingFundsTimedOut(walletPubKeyHash);
@@ -771,10 +771,10 @@ library Redemption {
771
771
  /// - the tokens taken from the redeemer on redemption request will
772
772
  /// be returned to the redeemer,
773
773
  /// - the request will be moved from pending redemptions to
774
- /// timed-out redemptions.
774
+ /// timed-out redemptions,
775
775
  /// - if the state of the wallet is `Live` or `MovingFunds`, the
776
776
  /// wallet operators will be slashed and the notifier will be
777
- /// rewarded
777
+ /// rewarded,
778
778
  /// - if the state of wallet is `Live`, the wallet will be closed or
779
779
  /// marked as `MovingFunds` (depending on the presence or absence
780
780
  /// of the wallet's main UTXO) and the wallet will no longer be
@@ -792,10 +792,10 @@ library Redemption {
792
792
  /// for the given `walletID`. Those IDs are not directly stored
793
793
  /// in the contract for gas efficiency purposes but they can be
794
794
  /// read from appropriate `DkgResultSubmitted` and `DkgResultApproved`
795
- /// events.
795
+ /// events of the `WalletRegistry` contract
796
796
  /// - The amount of time defined by `redemptionTimeout` must have
797
797
  /// passed since the redemption was requested (the request must be
798
- /// timed-out).
798
+ /// timed-out)
799
799
  function notifyRedemptionTimeout(
800
800
  BridgeState.Storage storage self,
801
801
  bytes20 walletPubKeyHash,
package/export.json CHANGED
@@ -14326,6 +14326,18 @@
14326
14326
  "name": "movingFundsTimeout",
14327
14327
  "type": "uint32"
14328
14328
  },
14329
+ {
14330
+ "indexed": false,
14331
+ "internalType": "uint96",
14332
+ "name": "movingFundsTimeoutSlashingAmount",
14333
+ "type": "uint96"
14334
+ },
14335
+ {
14336
+ "indexed": false,
14337
+ "internalType": "uint256",
14338
+ "name": "movingFundsTimeoutNotifierRewardMultiplier",
14339
+ "type": "uint256"
14340
+ },
14329
14341
  {
14330
14342
  "indexed": false,
14331
14343
  "internalType": "uint64",
@@ -14949,6 +14961,16 @@
14949
14961
  "name": "movingFundsTimeout",
14950
14962
  "type": "uint32"
14951
14963
  },
14964
+ {
14965
+ "internalType": "uint96",
14966
+ "name": "movingFundsTimeoutSlashingAmount",
14967
+ "type": "uint96"
14968
+ },
14969
+ {
14970
+ "internalType": "uint256",
14971
+ "name": "movingFundsTimeoutNotifierRewardMultiplier",
14972
+ "type": "uint256"
14973
+ },
14952
14974
  {
14953
14975
  "internalType": "uint64",
14954
14976
  "name": "movingFundsDustThreshold",
@@ -15057,6 +15079,11 @@
15057
15079
  "internalType": "bytes20",
15058
15080
  "name": "walletPubKeyHash",
15059
15081
  "type": "bytes20"
15082
+ },
15083
+ {
15084
+ "internalType": "uint32[]",
15085
+ "name": "walletMembersIDs",
15086
+ "type": "uint32[]"
15060
15087
  }
15061
15088
  ],
15062
15089
  "name": "notifyMovingFundsTimeout",
@@ -16028,19 +16055,6 @@
16028
16055
  "stateMutability": "view",
16029
16056
  "type": "function"
16030
16057
  },
16031
- {
16032
- "inputs": [
16033
- {
16034
- "internalType": "bytes20",
16035
- "name": "walletPubKeyHash",
16036
- "type": "bytes20"
16037
- }
16038
- ],
16039
- "name": "unsetWalletMainUtxo",
16040
- "outputs": [],
16041
- "stateMutability": "nonpayable",
16042
- "type": "function"
16043
- },
16044
16058
  {
16045
16059
  "inputs": [
16046
16060
  {
@@ -16104,6 +16118,16 @@
16104
16118
  "name": "movingFundsTimeout",
16105
16119
  "type": "uint32"
16106
16120
  },
16121
+ {
16122
+ "internalType": "uint96",
16123
+ "name": "movingFundsTimeoutSlashingAmount",
16124
+ "type": "uint96"
16125
+ },
16126
+ {
16127
+ "internalType": "uint256",
16128
+ "name": "movingFundsTimeoutNotifierRewardMultiplier",
16129
+ "type": "uint256"
16130
+ },
16107
16131
  {
16108
16132
  "internalType": "uint64",
16109
16133
  "name": "movingFundsDustThreshold",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keep-network/tbtc-v2",
3
- "version": "0.1.1-dev.53+main.c54109fae574d6cb1a51932d48c610c026000292",
3
+ "version": "0.1.1-dev.54+main.76eaffd21a4cdb7ff99e40f5d66c1c66eda4f730",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "artifacts/",