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

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 (64) hide show
  1. package/artifacts/Bank.json +6 -6
  2. package/artifacts/Bridge.json +81 -76
  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 +9 -9
  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 +9 -9
  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 +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 +6 -6
  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 +7 -7
  32. package/artifacts/solcInputs/{799c7b289d9b6d9cfc600d2fc23c7b64.json → 6d69fc514efd874ebb1cb86b04981772.json} +2 -2
  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 +72 -72
  39. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
  40. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +16 -16
  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 +49 -49
  62. package/contracts/bridge/BridgeState.sol +52 -52
  63. package/export.json +38 -38
  64. package/package.json +1 -1
@@ -105,8 +105,8 @@
105
105
  "type": "event"
106
106
  }
107
107
  ],
108
- "bytecode": "0x610fc961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260198701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601788018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601783015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601984016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6016840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506016850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601986016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601782015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601986016020526040812060020154601687015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601686015467ffffffffffffffff640100000000909104811690841610155b806108535750601686015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526019840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260198301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601783015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760178301805473ffffffffffffffffffffffffffffffffffffffff191690555b601783018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260198401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea264697066735822122042531d987a66f22ba581f99073d53e28dbf61355e7e99b062554946dfc20656c64736f6c63430008090033",
109
- "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260198701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601788018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601783015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601984016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6016840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506016850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601986016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601782015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601986016020526040812060020154601687015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601686015467ffffffffffffffff640100000000909104811690841610155b806108535750601686015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526019840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260198301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601783015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760178301805473ffffffffffffffffffffffffffffffffffffffff191690555b601783018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260198401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea264697066735822122042531d987a66f22ba581f99073d53e28dbf61355e7e99b062554946dfc20656c64736f6c63430008090033",
108
+ "bytecode": "0x610fc961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260198701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601788018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601783015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601984016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6016840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506016850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601986016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601782015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601986016020526040812060020154601687015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601686015467ffffffffffffffff640100000000909104811690841610155b806108535750601686015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526019840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260198301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601783015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760178301805473ffffffffffffffffffffffffffffffffffffffff191690555b601783018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260198401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea2646970667358221220c680eb195bda3c9271a0375e223a5e104decf9a7ae72c554010aeb05965d708c64736f6c63430008090033",
109
+ "deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610d6d565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610db7565b610303565b8180156100a957600080fd5b5061007b6100b8366004610e08565b61053c565b8180156100c957600080fd5b5061007b6100d8366004610e34565b610662565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d8484610961565b610a0b565b6bffffffffffffffffffffffff198116600090815260198701602052604081209192506002820154600160a01b900460ff1660058111156101a5576101a5610e61565b146102185760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160a01b63ffffffff42811668010000000000000000027fffffffffffffffffffffff00ffffffffffffffff00000000ffffffffffffffff909316929092178117909255601788018054606086901c73ffffffffffffffffffffffffffffffffffffffff1990911617808255929092041690601461029f83610e8d565b91906101000a81548163ffffffff021916908363ffffffff16021790555050816bffffffffffffffffffffffff1916857f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e60405160405180910390a3505050505050565b601783015460601b6bffffffffffffffffffffffff1990811690831614156103935760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6bffffffffffffffffffffffff1982166000908152601984016020526040902060016002820154600160a01b900460ff1660058111156103d5576103d5610e61565b1461042d5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6016840154600282015460009161047a9163ffffffff7c01000000000000000000000000000000000000000000000000000000009092048216916801000000000000000090910416610eb1565b63ffffffff16421015905080806104b957506016850154600160a01b900467ffffffffffffffff166104ad868686610a32565b67ffffffffffffffff16105b61052b5760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6105358585610b6a565b5050505050565b60028301546001600160a01b031633146105a85760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b60006105b761015d8484610961565b905060016bffffffffffffffffffffffff1982166000908152601986016020526040902060020154600160a01b900460ff1660058111156105fa576105fa610e61565b146106525760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b61065c8482610b6a565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b1580156106c257600080fd5b505afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa9190610ed9565b600381111561070b5761070b610e61565b1461077e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601782015460601b6bffffffffffffffffffffffff198116156108c95760006107a8848385610a32565b6bffffffffffffffffffffffff1983166000908152601986016020526040812060020154601687015492935063ffffffff680100000000000000009091048116926107f4911683610eb1565b63ffffffff1642101590508080156108265750601686015467ffffffffffffffff640100000000909104811690841610155b806108535750601686015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108c55760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050505050565b60606000610970600284610f01565b61099b57507f02000000000000000000000000000000000000000000000000000000000000006109be565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6bffffffffffffffffffffffff19821660009081526019840160205260408120600101548015610b6257808335610a6f6040860160208701610f23565b610a7f6060870160408801610f49565b604051602001610aec9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610b4f5760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610b5f6060840160408501610f49565b91505b509392505050565b6bffffffffffffffffffffffff198116600090815260198301602052604090206001810154610ba257610b9d8383610cbf565b610c3a565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffff00ffffffff00000000ffffffffffffffffffffffff909116177402000000000000000000000000000000000000000017905580546040516bffffffffffffffffffffffff19841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601783015460601b6bffffffffffffffffffffffff199081169083161415610c7c5760178301805473ffffffffffffffffffffffffffffffffffffffff191690555b601783018054600160a01b900463ffffffff16906014610c9b83610f73565b91906101000a81548163ffffffff021916908363ffffffff16021790555050505050565b6bffffffffffffffffffffffff198116600081815260198401602052604080822060028101805463ffffffff4216700100000000000000000000000000000000027fffffffffffffffffffffff0000000000ffffffffffffffffffffffffffffffff9091161774030000000000000000000000000000000000000000179055805491519093927f68cb496f5e64383745876664ef119840f154a729c03ba866b8aecb5c9f53d51691a3505050565b60008060008060808587031215610d8357600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610db157600080fd5b50919050565b600080600060a08486031215610dcc57600080fd5b8335925060208401356bffffffffffffffffffffffff1981168114610df057600080fd5b9150610dff8560408601610d9f565b90509250925092565b600080600060608486031215610e1d57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610e4757600080fd5b82359150610e588460208501610d9f565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600063ffffffff80831681811415610ea757610ea7610e77565b6001019392505050565b600063ffffffff808316818516808303821115610ed057610ed0610e77565b01949350505050565b600060208284031215610eeb57600080fd5b815160048110610efa57600080fd5b9392505050565b600082610f1e57634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610f3557600080fd5b813563ffffffff81168114610efa57600080fd5b600060208284031215610f5b57600080fd5b813567ffffffffffffffff81168114610efa57600080fd5b600063ffffffff821680610f8957610f89610e77565b600019019291505056fea2646970667358221220c680eb195bda3c9271a0375e223a5e104decf9a7ae72c554010aeb05965d708c64736f6c63430008090033",
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/05cc45695cb9d698abcf6fb2f07c0127.json"
3
+ "buildInfo": "../../../build-info/84acd2201691623304956bd1e3c32f1a.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/05cc45695cb9d698abcf6fb2f07c0127.json"
3
+ "buildInfo": "../../../build-info/84acd2201691623304956bd1e3c32f1a.json"
4
4
  }
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "_format": "hh-sol-dbg-1",
3
- "buildInfo": "../../../build-info/05cc45695cb9d698abcf6fb2f07c0127.json"
3
+ "buildInfo": "../../../build-info/84acd2201691623304956bd1e3c32f1a.json"
4
4
  }
@@ -177,10 +177,10 @@ contract Bridge is Governable, EcdsaWalletOwner {
177
177
 
178
178
  event MovingFundsParametersUpdated(
179
179
  uint64 movingFundsTxMaxTotalFee,
180
+ uint64 movingFundsDustThreshold,
180
181
  uint32 movingFundsTimeout,
181
182
  uint96 movingFundsTimeoutSlashingAmount,
182
- uint256 movingFundsTimeoutNotifierRewardMultiplier,
183
- uint64 movingFundsDustThreshold
183
+ uint256 movingFundsTimeoutNotifierRewardMultiplier
184
184
  );
185
185
 
186
186
  event WalletParametersUpdated(
@@ -194,10 +194,10 @@ contract Bridge is Governable, EcdsaWalletOwner {
194
194
  );
195
195
 
196
196
  event FraudParametersUpdated(
197
- uint96 fraudSlashingAmount,
198
- uint256 fraudNotifierRewardMultiplier,
197
+ uint256 fraudChallengeDepositAmount,
199
198
  uint256 fraudChallengeDefeatTimeout,
200
- uint256 fraudChallengeDepositAmount
199
+ uint96 fraudSlashingAmount,
200
+ uint256 fraudNotifierRewardMultiplier
201
201
  );
202
202
 
203
203
  constructor(
@@ -235,14 +235,14 @@ contract Bridge is Governable, EcdsaWalletOwner {
235
235
  self.redemptionTimeoutSlashingAmount = 10000 * 1e18; // 10000 T
236
236
  self.redemptionTimeoutNotifierRewardMultiplier = 100; // 100%
237
237
  self.movingFundsTxMaxTotalFee = 10000; // 10000 satoshi
238
+ self.movingFundsDustThreshold = 20000; // 20000 satoshi
238
239
  self.movingFundsTimeout = 7 days;
239
240
  self.movingFundsTimeoutSlashingAmount = 10000 * 1e18; // 10000 T
240
241
  self.movingFundsTimeoutNotifierRewardMultiplier = 100; //100%
241
- self.movingFundsDustThreshold = 20000; // 20000 satoshi
242
+ self.fraudChallengeDepositAmount = 2 ether;
243
+ self.fraudChallengeDefeatTimeout = 7 days;
242
244
  self.fraudSlashingAmount = 10000 * 1e18; // 10000 T
243
245
  self.fraudNotifierRewardMultiplier = 100; // 100%
244
- self.fraudChallengeDefeatTimeout = 7 days;
245
- self.fraudChallengeDepositAmount = 2 ether;
246
246
  self.walletCreationPeriod = 1 weeks;
247
247
  self.walletCreationMinBtcBalance = 1e8; // 1 BTC
248
248
  self.walletCreationMaxBtcBalance = 100e8; // 100 BTC
@@ -979,6 +979,12 @@ contract Bridge is Governable, EcdsaWalletOwner {
979
979
  /// BTC transaction fee that is acceptable in a single moving funds
980
980
  /// transaction. This is a _total_ max fee for the entire moving
981
981
  /// funds transaction.
982
+ /// @param movingFundsDustThreshold New value of the moving funds dust
983
+ /// threshold. It is the minimal satoshi amount that makes sense to
984
+ // be transferred during the moving funds process. Moving funds
985
+ // wallets having their BTC balance below that value can begin
986
+ // closing immediately as transferring such a low value may not be
987
+ // possible due to BTC network fees.
982
988
  /// @param movingFundsTimeout New value of the moving funds timeout in
983
989
  /// seconds. It is the time after which the moving funds process can
984
990
  /// be reported as timed out. It is counted from the moment when the
@@ -992,31 +998,25 @@ contract Bridge is Governable, EcdsaWalletOwner {
992
998
  /// it determines the percentage of the notifier reward from the
993
999
  /// staking contact the notifier of a moving funds timeout receives.
994
1000
  /// The value must be in the range [0, 100]
995
- /// @param movingFundsDustThreshold New value of the moving funds dust
996
- /// threshold. It is the minimal satoshi amount that makes sense to
997
- // be transferred during the moving funds process. Moving funds
998
- // wallets having their BTC balance below that value can begin
999
- // closing immediately as transferring such a low value may not be
1000
- // possible due to BTC network fees.
1001
1001
  /// @dev Requirements:
1002
1002
  /// - Moving funds transaction max total fee must be greater than zero
1003
+ /// - Moving funds dust threshold must be greater than zero
1003
1004
  /// - Moving funds timeout must be greater than zero
1004
1005
  /// - Moving funds timeout notifier reward multiplier must be in the
1005
1006
  /// range [0, 100]
1006
- /// - Moving funds dust threshold must be greater than zero
1007
1007
  function updateMovingFundsParameters(
1008
1008
  uint64 movingFundsTxMaxTotalFee,
1009
+ uint64 movingFundsDustThreshold,
1009
1010
  uint32 movingFundsTimeout,
1010
1011
  uint96 movingFundsTimeoutSlashingAmount,
1011
- uint256 movingFundsTimeoutNotifierRewardMultiplier,
1012
- uint64 movingFundsDustThreshold
1012
+ uint256 movingFundsTimeoutNotifierRewardMultiplier
1013
1013
  ) external onlyGovernance {
1014
1014
  self.updateMovingFundsParameters(
1015
1015
  movingFundsTxMaxTotalFee,
1016
+ movingFundsDustThreshold,
1016
1017
  movingFundsTimeout,
1017
1018
  movingFundsTimeoutSlashingAmount,
1018
- movingFundsTimeoutNotifierRewardMultiplier,
1019
- movingFundsDustThreshold
1019
+ movingFundsTimeoutNotifierRewardMultiplier
1020
1020
  );
1021
1021
  }
1022
1022
 
@@ -1067,6 +1067,12 @@ contract Bridge is Governable, EcdsaWalletOwner {
1067
1067
  }
1068
1068
 
1069
1069
  /// @notice Updates parameters related to frauds.
1070
+ /// @param fraudChallengeDepositAmount New value of the fraud challenge
1071
+ /// deposit amount in wei, it is the amount of ETH the party
1072
+ /// challenging the wallet for fraud needs to deposit
1073
+ /// @param fraudChallengeDefeatTimeout New value of the challenge defeat
1074
+ /// timeout in seconds, it is the amount of time the wallet has to
1075
+ /// defeat a fraud challenge. The value must be greater than zero
1070
1076
  /// @param fraudSlashingAmount New value of the fraud slashing amount in T,
1071
1077
  /// it is the amount slashed from each wallet member for committing
1072
1078
  /// a fraud
@@ -1074,26 +1080,20 @@ contract Bridge is Governable, EcdsaWalletOwner {
1074
1080
  /// reward multiplier as percentage, it determines the percentage of
1075
1081
  /// the notifier reward from the staking contact the notifier of
1076
1082
  /// a fraud receives. The value must be in the range [0, 100]
1077
- /// @param fraudChallengeDefeatTimeout New value of the challenge defeat
1078
- /// timeout in seconds, it is the amount of time the wallet has to
1079
- /// defeat a fraud challenge. The value must be greater than zero
1080
- /// @param fraudChallengeDepositAmount New value of the fraud challenge
1081
- /// deposit amount in wei, it is the amount of ETH the party
1082
- /// challenging the wallet for fraud needs to deposit
1083
1083
  /// @dev Requirements:
1084
- /// - Fraud notifier reward multiplier must be in the range [0, 100]
1085
1084
  /// - Fraud challenge defeat timeout must be greater than 0
1085
+ /// - Fraud notifier reward multiplier must be in the range [0, 100]
1086
1086
  function updateFraudParameters(
1087
- uint96 fraudSlashingAmount,
1088
- uint256 fraudNotifierRewardMultiplier,
1087
+ uint256 fraudChallengeDepositAmount,
1089
1088
  uint256 fraudChallengeDefeatTimeout,
1090
- uint256 fraudChallengeDepositAmount
1089
+ uint96 fraudSlashingAmount,
1090
+ uint256 fraudNotifierRewardMultiplier
1091
1091
  ) external onlyGovernance {
1092
1092
  self.updateFraudParameters(
1093
- fraudSlashingAmount,
1094
- fraudNotifierRewardMultiplier,
1093
+ fraudChallengeDepositAmount,
1095
1094
  fraudChallengeDefeatTimeout,
1096
- fraudChallengeDepositAmount
1095
+ fraudSlashingAmount,
1096
+ fraudNotifierRewardMultiplier
1097
1097
  );
1098
1098
  }
1099
1099
 
@@ -1299,6 +1299,11 @@ contract Bridge is Governable, EcdsaWalletOwner {
1299
1299
  /// transaction fee that is acceptable in a single moving funds
1300
1300
  /// transaction. This is a _total_ max fee for the entire moving
1301
1301
  /// funds transaction.
1302
+ /// @return movingFundsDustThreshold The minimal satoshi amount that makes
1303
+ /// sense to be transferred during the moving funds process. Moving
1304
+ /// funds wallets having their BTC balance below that value can
1305
+ /// begin closing immediately as transferring such a low value may
1306
+ /// not be possible due to BTC network fees.
1302
1307
  /// @return movingFundsTimeout Time after which the moving funds process
1303
1308
  /// can be reported as timed out. It is counted from the moment
1304
1309
  /// when the wallet was requested to move their funds and switched
@@ -1308,29 +1313,24 @@ contract Bridge is Governable, EcdsaWalletOwner {
1308
1313
  /// @return movingFundsTimeoutNotifierRewardMultiplier The percentage of the
1309
1314
  /// notifier reward from the staking contract the notifier of a
1310
1315
  /// moving funds timeout receives. The value is in the range [0, 100].
1311
- /// @return movingFundsDustThreshold The minimal satoshi amount that makes
1312
- // sense to be transferred during the moving funds process. Moving
1313
- // funds wallets having their BTC balance below that value can
1314
- // begin closing immediately as transferring such a low value may
1315
- // not be possible due to BTC network fees.
1316
1316
  function movingFundsParameters()
1317
1317
  external
1318
1318
  view
1319
1319
  returns (
1320
1320
  uint64 movingFundsTxMaxTotalFee,
1321
+ uint64 movingFundsDustThreshold,
1321
1322
  uint32 movingFundsTimeout,
1322
1323
  uint96 movingFundsTimeoutSlashingAmount,
1323
- uint256 movingFundsTimeoutNotifierRewardMultiplier,
1324
- uint64 movingFundsDustThreshold
1324
+ uint256 movingFundsTimeoutNotifierRewardMultiplier
1325
1325
  )
1326
1326
  {
1327
1327
  movingFundsTxMaxTotalFee = self.movingFundsTxMaxTotalFee;
1328
+ movingFundsDustThreshold = self.movingFundsDustThreshold;
1328
1329
  movingFundsTimeout = self.movingFundsTimeout;
1329
1330
  movingFundsTimeoutSlashingAmount = self
1330
1331
  .movingFundsTimeoutSlashingAmount;
1331
1332
  movingFundsTimeoutNotifierRewardMultiplier = self
1332
1333
  .movingFundsTimeoutNotifierRewardMultiplier;
1333
- movingFundsDustThreshold = self.movingFundsDustThreshold;
1334
1334
  }
1335
1335
 
1336
1336
  /// @return walletCreationPeriod Determines how frequently a new wallet
@@ -1373,29 +1373,29 @@ contract Bridge is Governable, EcdsaWalletOwner {
1373
1373
  }
1374
1374
 
1375
1375
  /// @notice Returns the current values of Bridge fraud parameters.
1376
+ /// @return fraudChallengeDepositAmount The amount of ETH in wei the party
1377
+ /// challenging the wallet for fraud needs to deposit.
1378
+ /// @return fraudChallengeDefeatTimeout The amount of time the wallet has to
1379
+ /// defeat a fraud challenge.
1376
1380
  /// @return fraudSlashingAmount The amount slashed from each wallet member
1377
1381
  /// for committing a fraud.
1378
1382
  /// @return fraudNotifierRewardMultiplier The percentage of the notifier
1379
1383
  /// reward from the staking contract the notifier of a fraud
1380
1384
  /// receives. The value is in the range [0, 100].
1381
- /// @return fraudChallengeDefeatTimeout The amount of time the wallet has to
1382
- /// defeat a fraud challenge.
1383
- /// @return fraudChallengeDepositAmount The amount of ETH in wei the party
1384
- /// challenging the wallet for fraud needs to deposit.
1385
1385
  function fraudParameters()
1386
1386
  external
1387
1387
  view
1388
1388
  returns (
1389
- uint96 fraudSlashingAmount,
1390
- uint256 fraudNotifierRewardMultiplier,
1389
+ uint256 fraudChallengeDepositAmount,
1391
1390
  uint256 fraudChallengeDefeatTimeout,
1392
- uint256 fraudChallengeDepositAmount
1391
+ uint96 fraudSlashingAmount,
1392
+ uint256 fraudNotifierRewardMultiplier
1393
1393
  )
1394
1394
  {
1395
+ fraudChallengeDepositAmount = self.fraudChallengeDepositAmount;
1396
+ fraudChallengeDefeatTimeout = self.fraudChallengeDefeatTimeout;
1395
1397
  fraudSlashingAmount = self.fraudSlashingAmount;
1396
1398
  fraudNotifierRewardMultiplier = self.fraudNotifierRewardMultiplier;
1397
- fraudChallengeDefeatTimeout = self.fraudChallengeDefeatTimeout;
1398
- fraudChallengeDepositAmount = self.fraudChallengeDepositAmount;
1399
1399
  }
1400
1400
 
1401
1401
  /// @notice Returns the addresses of contracts Bridge is interacting with.
@@ -83,6 +83,12 @@ library BridgeState {
83
83
  // if per single redemption. `movingFundsTxMaxTotalFee` is a total
84
84
  // fee for the entire transaction.
85
85
  uint64 movingFundsTxMaxTotalFee;
86
+ // The minimal satoshi amount that makes sense to be transferred during
87
+ // the moving funds process. Moving funds wallets having their BTC
88
+ // balance below that value can begin closing immediately as
89
+ // transferring such a low value may not be possible due to
90
+ // BTC network fees.
91
+ uint64 movingFundsDustThreshold;
86
92
  // Time after which the moving funds process can be reported as
87
93
  // timed out. It is counted from the moment when the wallet
88
94
  // was requested to move their funds and switched to the MovingFunds
@@ -95,12 +101,6 @@ library BridgeState {
95
101
  // the notifier of a moving funds timeout receives. The value is in the
96
102
  // range [0, 100].
97
103
  uint256 movingFundsTimeoutNotifierRewardMultiplier;
98
- // The minimal satoshi amount that makes sense to be transferred during
99
- // the moving funds process. Moving funds wallets having their BTC
100
- // balance below that value can begin closing immediately as
101
- // transferring such a low value may not be possible due to
102
- // BTC network fees.
103
- uint64 movingFundsDustThreshold;
104
104
  // The minimal amount that can be requested for redemption.
105
105
  // Value of this parameter must take into account the value of
106
106
  // `redemptionTreasuryFeeDivisor` and `redemptionTxMaxFee`
@@ -165,16 +165,16 @@ library BridgeState {
165
165
  // mapping basing on a timed out request stored previously in
166
166
  // `pendingRedemptions` mapping.
167
167
  mapping(uint256 => Redemption.RedemptionRequest) timedOutRedemptions;
168
+ // The amount of ETH in wei the party challenging the wallet for fraud
169
+ // needs to deposit.
170
+ uint256 fraudChallengeDepositAmount;
171
+ // The amount of time the wallet has to defeat a fraud challenge.
172
+ uint256 fraudChallengeDefeatTimeout;
168
173
  // The amount of stake slashed from each member of a wallet for a fraud.
169
174
  uint96 fraudSlashingAmount;
170
175
  // The percentage of the notifier reward from the staking contract
171
176
  // the notifier of a fraud receives. The value is in the range [0, 100].
172
177
  uint256 fraudNotifierRewardMultiplier;
173
- // The amount of time the wallet has to defeat a fraud challenge.
174
- uint256 fraudChallengeDefeatTimeout;
175
- // The amount of ETH in wei the party challenging the wallet for fraud
176
- // needs to deposit.
177
- uint256 fraudChallengeDepositAmount;
178
178
  // Collection of all submitted fraud challenges indexed by challenge
179
179
  // key built as `keccak256(walletPublicKey|sighash)`.
180
180
  mapping(uint256 => Fraud.FraudChallenge) fraudChallenges;
@@ -243,10 +243,10 @@ library BridgeState {
243
243
 
244
244
  event MovingFundsParametersUpdated(
245
245
  uint64 movingFundsTxMaxTotalFee,
246
+ uint64 movingFundsDustThreshold,
246
247
  uint32 movingFundsTimeout,
247
248
  uint96 movingFundsTimeoutSlashingAmount,
248
- uint256 movingFundsTimeoutNotifierRewardMultiplier,
249
- uint64 movingFundsDustThreshold
249
+ uint256 movingFundsTimeoutNotifierRewardMultiplier
250
250
  );
251
251
 
252
252
  event WalletParametersUpdated(
@@ -260,10 +260,10 @@ library BridgeState {
260
260
  );
261
261
 
262
262
  event FraudParametersUpdated(
263
- uint96 fraudSlashingAmount,
264
- uint256 fraudNotifierRewardMultiplier,
263
+ uint256 fraudChallengeDepositAmount,
265
264
  uint256 fraudChallengeDefeatTimeout,
266
- uint256 fraudChallengeDepositAmount
265
+ uint96 fraudSlashingAmount,
266
+ uint256 fraudNotifierRewardMultiplier
267
267
  );
268
268
 
269
269
  /// @notice Updates parameters of deposits.
@@ -425,6 +425,12 @@ library BridgeState {
425
425
  /// BTC transaction fee that is acceptable in a single moving funds
426
426
  /// transaction. This is a _total_ max fee for the entire moving
427
427
  /// funds transaction.
428
+ /// @param _movingFundsDustThreshold New value of the moving funds dust
429
+ /// threshold. It is the minimal satoshi amount that makes sense to
430
+ // be transferred during the moving funds process. Moving funds
431
+ // wallets having their BTC balance below that value can begin
432
+ // closing immediately as transferring such a low value may not be
433
+ // possible due to BTC network fees.
428
434
  /// @param _movingFundsTimeout New value of the moving funds timeout in
429
435
  /// seconds. It is the time after which the moving funds process can
430
436
  /// be reported as timed out. It is counted from the moment when the
@@ -438,31 +444,30 @@ library BridgeState {
438
444
  /// it determines the percentage of the notifier reward from the
439
445
  /// staking contact the notifier of a moving funds timeout receives.
440
446
  /// The value must be in the range [0, 100]
441
- /// @param _movingFundsDustThreshold New value of the moving funds dust
442
- /// threshold. It is the minimal satoshi amount that makes sense to
443
- // be transferred during the moving funds process. Moving funds
444
- // wallets having their BTC balance below that value can begin
445
- // closing immediately as transferring such a low value may not be
446
- // possible due to BTC network fees.
447
447
  /// @dev Requirements:
448
448
  /// - Moving funds transaction max total fee must be greater than zero
449
+ /// - Moving funds dust threshold must be greater than zero
449
450
  /// - Moving funds timeout must be greater than zero
450
451
  /// - Moving funds timeout notifier reward multiplier must be in the
451
452
  /// range [0, 100]
452
- /// - Moving funds dust threshold must be greater than zero
453
453
  function updateMovingFundsParameters(
454
454
  Storage storage self,
455
455
  uint64 _movingFundsTxMaxTotalFee,
456
+ uint64 _movingFundsDustThreshold,
456
457
  uint32 _movingFundsTimeout,
457
458
  uint96 _movingFundsTimeoutSlashingAmount,
458
- uint256 _movingFundsTimeoutNotifierRewardMultiplier,
459
- uint64 _movingFundsDustThreshold
459
+ uint256 _movingFundsTimeoutNotifierRewardMultiplier
460
460
  ) internal {
461
461
  require(
462
462
  _movingFundsTxMaxTotalFee > 0,
463
463
  "Moving funds transaction max total fee must be greater than zero"
464
464
  );
465
465
 
466
+ require(
467
+ _movingFundsDustThreshold > 0,
468
+ "Moving funds dust threshold must be greater than zero"
469
+ );
470
+
466
471
  require(
467
472
  _movingFundsTimeout > 0,
468
473
  "Moving funds timeout must be greater than zero"
@@ -473,25 +478,20 @@ library BridgeState {
473
478
  "Moving funds timeout notifier reward multiplier must be in the range [0, 100]"
474
479
  );
475
480
 
476
- require(
477
- _movingFundsDustThreshold > 0,
478
- "Moving funds dust threshold must be greater than zero"
479
- );
480
-
481
481
  self.movingFundsTxMaxTotalFee = _movingFundsTxMaxTotalFee;
482
+ self.movingFundsDustThreshold = _movingFundsDustThreshold;
482
483
  self.movingFundsTimeout = _movingFundsTimeout;
483
484
  self
484
485
  .movingFundsTimeoutSlashingAmount = _movingFundsTimeoutSlashingAmount;
485
486
  self
486
487
  .movingFundsTimeoutNotifierRewardMultiplier = _movingFundsTimeoutNotifierRewardMultiplier;
487
- self.movingFundsDustThreshold = _movingFundsDustThreshold;
488
488
 
489
489
  emit MovingFundsParametersUpdated(
490
490
  _movingFundsTxMaxTotalFee,
491
+ _movingFundsDustThreshold,
491
492
  _movingFundsTimeout,
492
493
  _movingFundsTimeoutSlashingAmount,
493
- _movingFundsTimeoutNotifierRewardMultiplier,
494
- _movingFundsDustThreshold
494
+ _movingFundsTimeoutNotifierRewardMultiplier
495
495
  );
496
496
  }
497
497
 
@@ -568,6 +568,12 @@ library BridgeState {
568
568
  }
569
569
 
570
570
  /// @notice Updates parameters related to frauds.
571
+ /// @param _fraudChallengeDepositAmount New value of the fraud challenge
572
+ /// deposit amount in wei, it is the amount of ETH the party
573
+ /// challenging the wallet for fraud needs to deposit
574
+ /// @param _fraudChallengeDefeatTimeout New value of the challenge defeat
575
+ /// timeout in seconds, it is the amount of time the wallet has to
576
+ /// defeat a fraud challenge. The value must be greater than zero
571
577
  /// @param _fraudSlashingAmount New value of the fraud slashing amount in T,
572
578
  /// it is the amount slashed from each wallet member for committing
573
579
  /// a fraud
@@ -575,42 +581,36 @@ library BridgeState {
575
581
  /// reward multiplier as percentage, it determines the percentage of
576
582
  /// the notifier reward from the staking contact the notifier of
577
583
  /// a fraud receives. The value must be in the range [0, 100]
578
- /// @param _fraudChallengeDefeatTimeout New value of the challenge defeat
579
- /// timeout in seconds, it is the amount of time the wallet has to
580
- /// defeat a fraud challenge. The value must be greater than zero
581
- /// @param _fraudChallengeDepositAmount New value of the fraud challenge
582
- /// deposit amount in wei, it is the amount of ETH the party
583
- /// challenging the wallet for fraud needs to deposit
584
584
  /// @dev Requirements:
585
- /// - Fraud notifier reward multiplier must be in the range [0, 100]
586
585
  /// - Fraud challenge defeat timeout must be greater than 0
586
+ /// - Fraud notifier reward multiplier must be in the range [0, 100]
587
587
  function updateFraudParameters(
588
588
  Storage storage self,
589
- uint96 _fraudSlashingAmount,
590
- uint256 _fraudNotifierRewardMultiplier,
589
+ uint256 _fraudChallengeDepositAmount,
591
590
  uint256 _fraudChallengeDefeatTimeout,
592
- uint256 _fraudChallengeDepositAmount
591
+ uint96 _fraudSlashingAmount,
592
+ uint256 _fraudNotifierRewardMultiplier
593
593
  ) internal {
594
594
  require(
595
- _fraudNotifierRewardMultiplier <= 100,
596
- "Fraud notifier reward multiplier must be in the range [0, 100]"
595
+ _fraudChallengeDefeatTimeout > 0,
596
+ "Fraud challenge defeat timeout must be greater than zero"
597
597
  );
598
598
 
599
599
  require(
600
- _fraudChallengeDefeatTimeout > 0,
601
- "Fraud challenge defeat timeout must be greater than zero"
600
+ _fraudNotifierRewardMultiplier <= 100,
601
+ "Fraud notifier reward multiplier must be in the range [0, 100]"
602
602
  );
603
603
 
604
+ self.fraudChallengeDepositAmount = _fraudChallengeDepositAmount;
605
+ self.fraudChallengeDefeatTimeout = _fraudChallengeDefeatTimeout;
604
606
  self.fraudSlashingAmount = _fraudSlashingAmount;
605
607
  self.fraudNotifierRewardMultiplier = _fraudNotifierRewardMultiplier;
606
- self.fraudChallengeDefeatTimeout = _fraudChallengeDefeatTimeout;
607
- self.fraudChallengeDepositAmount = _fraudChallengeDepositAmount;
608
608
 
609
609
  emit FraudParametersUpdated(
610
- _fraudSlashingAmount,
611
- _fraudNotifierRewardMultiplier,
610
+ _fraudChallengeDepositAmount,
612
611
  _fraudChallengeDefeatTimeout,
613
- _fraudChallengeDepositAmount
612
+ _fraudSlashingAmount,
613
+ _fraudNotifierRewardMultiplier
614
614
  );
615
615
  }
616
616
  }