@keep-network/tbtc-v2 0.1.1-dev.41 → 0.1.1-dev.42
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.
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/VendingMachine.json +10 -10
- package/artifacts/solcInputs/{e9b173393b9fd7287a0bfaa6d4eb4b71.json → 002940e9cc8128f6629e90620c66cba5.json} +22 -22
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.json +86 -140
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.json +35 -3
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.json +2 -2
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.json +2 -2
- package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +1 -1
- package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +4 -22
- package/build/contracts/bridge/Redeem.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redeem.sol/OutboundTx.json +2 -2
- package/build/contracts/bridge/Redeem.sol/Redeem.dbg.json +1 -1
- package/build/contracts/bridge/Redeem.sol/Redeem.json +4 -22
- package/build/contracts/bridge/Sweep.sol/Sweep.dbg.json +1 -1
- package/build/contracts/bridge/Sweep.sol/Sweep.json +2 -2
- package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/bridge/Wallets.sol/Wallets.json +2 -47
- package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/IVault.sol/IVault.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/contracts/bridge/Bridge.sol +79 -76
- package/contracts/bridge/BridgeState.sol +78 -4
- package/contracts/bridge/Deposit.sol +1 -4
- package/contracts/bridge/Fraud.sol +1 -2
- package/contracts/bridge/MovingFunds.sol +2 -4
- package/contracts/bridge/Redeem.sol +6 -11
- package/contracts/bridge/Sweep.sol +3 -4
- package/contracts/bridge/Wallets.sol +40 -121
- package/package.json +1 -1
|
@@ -28,25 +28,6 @@
|
|
|
28
28
|
"name": "NewWalletRequested",
|
|
29
29
|
"type": "event"
|
|
30
30
|
},
|
|
31
|
-
{
|
|
32
|
-
"anonymous": false,
|
|
33
|
-
"inputs": [
|
|
34
|
-
{
|
|
35
|
-
"indexed": false,
|
|
36
|
-
"internalType": "uint64",
|
|
37
|
-
"name": "newMinBtcBalance",
|
|
38
|
-
"type": "uint64"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"indexed": false,
|
|
42
|
-
"internalType": "uint64",
|
|
43
|
-
"name": "newMaxBtcBalance",
|
|
44
|
-
"type": "uint64"
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"name": "WalletBtcBalanceRangeUpdated",
|
|
48
|
-
"type": "event"
|
|
49
|
-
},
|
|
50
31
|
{
|
|
51
32
|
"anonymous": false,
|
|
52
33
|
"inputs": [
|
|
@@ -66,32 +47,6 @@
|
|
|
66
47
|
"name": "WalletClosed",
|
|
67
48
|
"type": "event"
|
|
68
49
|
},
|
|
69
|
-
{
|
|
70
|
-
"anonymous": false,
|
|
71
|
-
"inputs": [
|
|
72
|
-
{
|
|
73
|
-
"indexed": false,
|
|
74
|
-
"internalType": "uint32",
|
|
75
|
-
"name": "newCreationPeriod",
|
|
76
|
-
"type": "uint32"
|
|
77
|
-
}
|
|
78
|
-
],
|
|
79
|
-
"name": "WalletCreationPeriodUpdated",
|
|
80
|
-
"type": "event"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"anonymous": false,
|
|
84
|
-
"inputs": [
|
|
85
|
-
{
|
|
86
|
-
"indexed": false,
|
|
87
|
-
"internalType": "uint32",
|
|
88
|
-
"name": "newMaxAge",
|
|
89
|
-
"type": "uint32"
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"name": "WalletMaxAgeUpdated",
|
|
93
|
-
"type": "event"
|
|
94
|
-
},
|
|
95
50
|
{
|
|
96
51
|
"anonymous": false,
|
|
97
52
|
"inputs": [
|
|
@@ -131,8 +86,8 @@
|
|
|
131
86
|
"type": "event"
|
|
132
87
|
}
|
|
133
88
|
],
|
|
134
|
-
"bytecode": "0x61190761003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100d35760003560e01c806365951fcf1161008b578063b4e671f411610065578063b4e671f4146101da578063ea2a3dcc146101fa578063f832341d1461021a57600080fd5b806365951fcf1461017a5780639655f02b1461019a578063998b564c146101ba57600080fd5b806335e741c9116100bc57806335e741c91461011a57806345d9969c1461013a5780634fd7d4861461015a57600080fd5b8063041aee99146100d85780631803c09e146100fa575b600080fd5b8180156100e457600080fd5b506100f86100f336600461160b565b61023a565b005b81801561010657600080fd5b506100f8610115366004611637565b6102ab565b81801561012657600080fd5b506100f861013536600461167b565b6103d3565b81801561014657600080fd5b506100f861015536600461160b565b610589565b81801561016657600080fd5b506100f86101753660046116b0565b6105e9565b81801561018657600080fd5b506100f86101953660046116e2565b6107bb565b8180156101a657600080fd5b506100f86101b536600461171d565b6108b0565b8180156101c657600080fd5b506100f86101d5366004611772565b610abe565b8180156101e657600080fd5b506100f86101f53660046117a5565b610c55565b81801561020657600080fd5b506100f86102153660046116e2565b610f4a565b81801561022657600080fd5b506100f86102353660046117c9565b611020565b81547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff83169081029190911783556040519081527f0c96a98792be84d818dd96f4167766ce3fbb8fdbfece805d7c2ec87873797b62906020015b60405180910390a15050565b82546001600160a01b031633146103195760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061032d610328848461114f565b6111f9565b905060016001600160601b031982166000908152600286810160205260409091200154600160801b900460ff16600481111561036b5761036b611805565b146103c35760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610310565b6103cd8482611220565b50505050565b6001600160601b03198216600090815260028085016020526040909120906002820154600160801b900460ff16600481111561041157610411611805565b146104845760405162461bcd60e51b815260206004820152602960248201527f45434453412077616c6c6574206d75737420626520696e204d6f76696e67467560448201527f6e647320737461746500000000000000000000000000000000000000000000006064820152608401610310565b6003810154806104fc5760405162461bcd60e51b815260206004820152602b60248201527f5461726765742077616c6c65747320636f6d6d69746d656e74206e6f7420737560448201527f626d6974746564207965740000000000000000000000000000000000000000006064820152608401610310565b8281146105715760405162461bcd60e51b815260206004820152603160248201527f5461726765742077616c6c65747320646f6e277420636f72726573706f6e642060448201527f746f2074686520636f6d6d69746d656e740000000000000000000000000000006064820152608401610310565b600060018301556105828585611315565b5050505050565b6001820180546bffffffff000000000000000019166801000000000000000063ffffffff8416908102919091179091556040519081527fb9680823827cf58b566fd60a2a37e51011531b53fa90ff8f109d6d94921dde009060200161029f565b83546001600160a01b031633146106525760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610310565b6000610661610328848461114f565b6001600160601b03198116600090815260028701602052604081209192506002820154600160801b900460ff16600481111561069f5761069f611805565b146107125760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610310565b848155600281018054600160801b7fffffffffffffffffffffffffffffff00ffffffff00000000ffffffffffffffff909116680100000000000000004263ffffffff1602171790556001860180546bffffffffffffffffffffffff16600160601b606085901c021790556040516001600160601b031983169086907f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e90600090a3505050505050565b6001600160601b031981166000908152600283810160205260409091200154600160801b900460ff1660018160048111156107f8576107f8611805565b14806108155750600281600481111561081357610813611805565b145b6108875760405162461bcd60e51b815260206004820152603160248201527f45434453412077616c6c6574206d75737420626520696e204c697665206f722060448201527f4d6f76696e6746756e64732073746174650000000000000000000000000000006064820152608401610310565b600181600481111561089b5761089b611805565b14156108ab576108ab8383611220565b505050565b60018301546001600160601b0319838116600160601b90920460601b1614156109415760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610310565b6001600160601b031982166000908152600284016020526040902060016002820154600160801b900460ff16600481111561097e5761097e611805565b146109d65760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610310565b60018401546002820154600091610a069163ffffffff68010000000000000000928390048116929091041661181b565b63ffffffff1642101590508080610a4257508454600160c01b900467ffffffffffffffff16610a368686866113da565b67ffffffffffffffff16105b610ab45760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610310565b6105828585611220565b60008267ffffffffffffffff1611610b3e5760405162461bcd60e51b815260206004820152602160248201527f4d696e696d756d206d7573742062652067726561746572207468616e207a657260448201527f6f000000000000000000000000000000000000000000000000000000000000006064820152608401610310565b8167ffffffffffffffff168167ffffffffffffffff1611610bc75760405162461bcd60e51b815260206004820152602860248201527f4d6178696d756d206d7573742062652067726561746572207468616e2074686560448201527f206d696e696d756d0000000000000000000000000000000000000000000000006064820152608401610310565b825477ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b67ffffffffffffffff84811691820292909217855560018501805467ffffffffffffffff191692841692831790556040805191825260208201929092527f93f75d2a1ad31d60f2381eb935c4b4d8743c9607d7bfaeabeffc62fbf4e21182910160405180910390a1505050565b8154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b158015610cb257600080fd5b505afa158015610cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cea9190611851565b6003811115610cfb57610cfb611805565b14610d6e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610310565b6001820154600160601b900460601b6001600160601b0319811615610ea6576000610d9a8483856113da565b6001600160601b0319831660009081526002808701602052604082200154865492935063ffffffff68010000000000000000909104811692610de591600160a01b909104168361181b565b63ffffffff164210159050808015610e135750855467ffffffffffffffff600160c01b909104811690841610155b80610e305750600186015467ffffffffffffffff90811690841610155b610ea25760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610310565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18254604080517f72cc8c6d00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916372cc8c6d9160048082019260009290919082900301818387803b158015610f2d57600080fd5b505af1158015610f41573d6000803e3d6000fd5b50505050505050565b6001600160601b031981166000908152600283810160205260409091200154600160801b900460ff166001816004811115610f8757610f87611805565b1480610fa457506002816004811115610fa257610fa2611805565b145b6110165760405162461bcd60e51b815260206004820152603160248201527f45434453412077616c6c6574206d75737420626520696e204c697665206f722060448201527f4d6f76696e6746756e64732073746174650000000000000000000000000000006064820152608401610310565b6108ab838361150d565b6001600160a01b03811661109c5760405162461bcd60e51b815260206004820152602c60248201527f45434453412057616c6c6574205265676973747279206164647265737320636160448201527f6e6e6f74206265207a65726f00000000000000000000000000000000000000006064820152608401610310565b81546001600160a01b03161561111a5760405162461bcd60e51b815260206004820152602960248201527f45434453412057616c6c6574205265676973747279206164647265737320616c60448201527f72656164792073657400000000000000000000000000000000000000000000006064820152608401610310565b81547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0391909116179055565b6060600061115e600284611879565b61118957507f02000000000000000000000000000000000000000000000000000000000000006111ac565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6001600160601b031981166000908152600283016020526040902060018101546112535761124e8383611315565b6112d9565b60028101805463ffffffff4216600160601b027fffffffffffffffffffffffffffffff0000000000ffffffffffffffffffffffff9091161770020000000000000000000000000000000017905580546040516001600160601b0319841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b60018301546001600160601b0319838116600160601b90920460601b1614156108ab57505060010180546bffffffffffffffffffffffff169055565b6001600160601b03198116600081815260028481016020526040808320918201805470ff0000000000000000000000000000000019167003000000000000000000000000000000001790558154905191939290917f47b159947c3066cb253f60e8f046cfd747411788a545cb189679e3fa1467b28d9190a38254815460405163343bb92760e01b81526001600160a01b039092169163343bb927916113c09160040190815260200190565b600060405180830381600087803b158015610f2d57600080fd5b6001600160601b031982166000908152600284016020526040812060010154801561150557808335611412604086016020870161189b565b61142260608701604088016118b6565b60405160200161148f9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b60405160208183030381529060405280519060200120146114f25760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610310565b61150260608401604085016118b6565b91505b509392505050565b6001600160601b03198116600081815260028481016020526040808320918201805470ff0000000000000000000000000000000019167004000000000000000000000000000000001790558154905191939290917f9272a280b0f32f70b00ad0b546499c68e3ecc6f7bb7ef43491ec5d7b99bf69ef9190a360018301546001600160601b0319838116600160601b90920460601b1614156115bf576001830180546bffffffffffffffffffffffff1690555b8254815460405163343bb92760e01b81526001600160a01b039092169163343bb927916113c09160040190815260200190565b803563ffffffff8116811461160657600080fd5b919050565b6000806040838503121561161e57600080fd5b8235915061162e602084016115f2565b90509250929050565b60008060006060848603121561164c57600080fd5b505081359360208301359350604090920135919050565b80356001600160601b03198116811461160657600080fd5b60008060006060848603121561169057600080fd5b833592506116a060208501611663565b9150604084013590509250925092565b600080600080608085870312156116c657600080fd5b5050823594602084013594506040840135936060013592509050565b600080604083850312156116f557600080fd5b8235915061162e60208401611663565b60006060828403121561171757600080fd5b50919050565b600080600060a0848603121561173257600080fd5b8335925061174260208501611663565b91506117518560408601611705565b90509250925092565b803567ffffffffffffffff8116811461160657600080fd5b60008060006060848603121561178757600080fd5b833592506117976020850161175a565b91506117516040850161175a565b600080608083850312156117b857600080fd5b8235915061162e8460208501611705565b600080604083850312156117dc57600080fd5b8235915060208301356001600160a01b03811681146117fa57600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b600063ffffffff80831681851680830382111561184857634e487b7160e01b600052601160045260246000fd5b01949350505050565b60006020828403121561186357600080fd5b81516004811061187257600080fd5b9392505050565b60008261189657634e487b7160e01b600052601260045260246000fd5b500690565b6000602082840312156118ad57600080fd5b611872826115f2565b6000602082840312156118c857600080fd5b6118728261175a56fea26469706673582212207e53aad72fb4c3298c73e60f03e3909617a4d5db8da1841ba7b9dc8a3b8884af64736f6c63430008090033",
|
|
135
|
-
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100d35760003560e01c806365951fcf1161008b578063b4e671f411610065578063b4e671f4146101da578063ea2a3dcc146101fa578063f832341d1461021a57600080fd5b806365951fcf1461017a5780639655f02b1461019a578063998b564c146101ba57600080fd5b806335e741c9116100bc57806335e741c91461011a57806345d9969c1461013a5780634fd7d4861461015a57600080fd5b8063041aee99146100d85780631803c09e146100fa575b600080fd5b8180156100e457600080fd5b506100f86100f336600461160b565b61023a565b005b81801561010657600080fd5b506100f8610115366004611637565b6102ab565b81801561012657600080fd5b506100f861013536600461167b565b6103d3565b81801561014657600080fd5b506100f861015536600461160b565b610589565b81801561016657600080fd5b506100f86101753660046116b0565b6105e9565b81801561018657600080fd5b506100f86101953660046116e2565b6107bb565b8180156101a657600080fd5b506100f86101b536600461171d565b6108b0565b8180156101c657600080fd5b506100f86101d5366004611772565b610abe565b8180156101e657600080fd5b506100f86101f53660046117a5565b610c55565b81801561020657600080fd5b506100f86102153660046116e2565b610f4a565b81801561022657600080fd5b506100f86102353660046117c9565b611020565b81547fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff16600160a01b63ffffffff83169081029190911783556040519081527f0c96a98792be84d818dd96f4167766ce3fbb8fdbfece805d7c2ec87873797b62906020015b60405180910390a15050565b82546001600160a01b031633146103195760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061032d610328848461114f565b6111f9565b905060016001600160601b031982166000908152600286810160205260409091200154600160801b900460ff16600481111561036b5761036b611805565b146103c35760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610310565b6103cd8482611220565b50505050565b6001600160601b03198216600090815260028085016020526040909120906002820154600160801b900460ff16600481111561041157610411611805565b146104845760405162461bcd60e51b815260206004820152602960248201527f45434453412077616c6c6574206d75737420626520696e204d6f76696e67467560448201527f6e647320737461746500000000000000000000000000000000000000000000006064820152608401610310565b6003810154806104fc5760405162461bcd60e51b815260206004820152602b60248201527f5461726765742077616c6c65747320636f6d6d69746d656e74206e6f7420737560448201527f626d6974746564207965740000000000000000000000000000000000000000006064820152608401610310565b8281146105715760405162461bcd60e51b815260206004820152603160248201527f5461726765742077616c6c65747320646f6e277420636f72726573706f6e642060448201527f746f2074686520636f6d6d69746d656e740000000000000000000000000000006064820152608401610310565b600060018301556105828585611315565b5050505050565b6001820180546bffffffff000000000000000019166801000000000000000063ffffffff8416908102919091179091556040519081527fb9680823827cf58b566fd60a2a37e51011531b53fa90ff8f109d6d94921dde009060200161029f565b83546001600160a01b031633146106525760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610310565b6000610661610328848461114f565b6001600160601b03198116600090815260028701602052604081209192506002820154600160801b900460ff16600481111561069f5761069f611805565b146107125760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610310565b848155600281018054600160801b7fffffffffffffffffffffffffffffff00ffffffff00000000ffffffffffffffff909116680100000000000000004263ffffffff1602171790556001860180546bffffffffffffffffffffffff16600160601b606085901c021790556040516001600160601b031983169086907f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e90600090a3505050505050565b6001600160601b031981166000908152600283810160205260409091200154600160801b900460ff1660018160048111156107f8576107f8611805565b14806108155750600281600481111561081357610813611805565b145b6108875760405162461bcd60e51b815260206004820152603160248201527f45434453412077616c6c6574206d75737420626520696e204c697665206f722060448201527f4d6f76696e6746756e64732073746174650000000000000000000000000000006064820152608401610310565b600181600481111561089b5761089b611805565b14156108ab576108ab8383611220565b505050565b60018301546001600160601b0319838116600160601b90920460601b1614156109415760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610310565b6001600160601b031982166000908152600284016020526040902060016002820154600160801b900460ff16600481111561097e5761097e611805565b146109d65760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610310565b60018401546002820154600091610a069163ffffffff68010000000000000000928390048116929091041661181b565b63ffffffff1642101590508080610a4257508454600160c01b900467ffffffffffffffff16610a368686866113da565b67ffffffffffffffff16105b610ab45760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610310565b6105828585611220565b60008267ffffffffffffffff1611610b3e5760405162461bcd60e51b815260206004820152602160248201527f4d696e696d756d206d7573742062652067726561746572207468616e207a657260448201527f6f000000000000000000000000000000000000000000000000000000000000006064820152608401610310565b8167ffffffffffffffff168167ffffffffffffffff1611610bc75760405162461bcd60e51b815260206004820152602860248201527f4d6178696d756d206d7573742062652067726561746572207468616e2074686560448201527f206d696e696d756d0000000000000000000000000000000000000000000000006064820152608401610310565b825477ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b67ffffffffffffffff84811691820292909217855560018501805467ffffffffffffffff191692841692831790556040805191825260208201929092527f93f75d2a1ad31d60f2381eb935c4b4d8743c9607d7bfaeabeffc62fbf4e21182910160405180910390a1505050565b8154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b158015610cb257600080fd5b505afa158015610cc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cea9190611851565b6003811115610cfb57610cfb611805565b14610d6e5760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610310565b6001820154600160601b900460601b6001600160601b0319811615610ea6576000610d9a8483856113da565b6001600160601b0319831660009081526002808701602052604082200154865492935063ffffffff68010000000000000000909104811692610de591600160a01b909104168361181b565b63ffffffff164210159050808015610e135750855467ffffffffffffffff600160c01b909104811690841610155b80610e305750600186015467ffffffffffffffff90811690841610155b610ea25760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610310565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18254604080517f72cc8c6d00000000000000000000000000000000000000000000000000000000815290516001600160a01b03909216916372cc8c6d9160048082019260009290919082900301818387803b158015610f2d57600080fd5b505af1158015610f41573d6000803e3d6000fd5b50505050505050565b6001600160601b031981166000908152600283810160205260409091200154600160801b900460ff166001816004811115610f8757610f87611805565b1480610fa457506002816004811115610fa257610fa2611805565b145b6110165760405162461bcd60e51b815260206004820152603160248201527f45434453412077616c6c6574206d75737420626520696e204c697665206f722060448201527f4d6f76696e6746756e64732073746174650000000000000000000000000000006064820152608401610310565b6108ab838361150d565b6001600160a01b03811661109c5760405162461bcd60e51b815260206004820152602c60248201527f45434453412057616c6c6574205265676973747279206164647265737320636160448201527f6e6e6f74206265207a65726f00000000000000000000000000000000000000006064820152608401610310565b81546001600160a01b03161561111a5760405162461bcd60e51b815260206004820152602960248201527f45434453412057616c6c6574205265676973747279206164647265737320616c60448201527f72656164792073657400000000000000000000000000000000000000000000006064820152608401610310565b81547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0391909116179055565b6060600061115e600284611879565b61118957507f02000000000000000000000000000000000000000000000000000000000000006111ac565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6001600160601b031981166000908152600283016020526040902060018101546112535761124e8383611315565b6112d9565b60028101805463ffffffff4216600160601b027fffffffffffffffffffffffffffffff0000000000ffffffffffffffffffffffff9091161770020000000000000000000000000000000017905580546040516001600160601b0319841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b60018301546001600160601b0319838116600160601b90920460601b1614156108ab57505060010180546bffffffffffffffffffffffff169055565b6001600160601b03198116600081815260028481016020526040808320918201805470ff0000000000000000000000000000000019167003000000000000000000000000000000001790558154905191939290917f47b159947c3066cb253f60e8f046cfd747411788a545cb189679e3fa1467b28d9190a38254815460405163343bb92760e01b81526001600160a01b039092169163343bb927916113c09160040190815260200190565b600060405180830381600087803b158015610f2d57600080fd5b6001600160601b031982166000908152600284016020526040812060010154801561150557808335611412604086016020870161189b565b61142260608701604088016118b6565b60405160200161148f9392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b60405160208183030381529060405280519060200120146114f25760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610310565b61150260608401604085016118b6565b91505b509392505050565b6001600160601b03198116600081815260028481016020526040808320918201805470ff0000000000000000000000000000000019167004000000000000000000000000000000001790558154905191939290917f9272a280b0f32f70b00ad0b546499c68e3ecc6f7bb7ef43491ec5d7b99bf69ef9190a360018301546001600160601b0319838116600160601b90920460601b1614156115bf576001830180546bffffffffffffffffffffffff1690555b8254815460405163343bb92760e01b81526001600160a01b039092169163343bb927916113c09160040190815260200190565b803563ffffffff8116811461160657600080fd5b919050565b6000806040838503121561161e57600080fd5b8235915061162e602084016115f2565b90509250929050565b60008060006060848603121561164c57600080fd5b505081359360208301359350604090920135919050565b80356001600160601b03198116811461160657600080fd5b60008060006060848603121561169057600080fd5b833592506116a060208501611663565b9150604084013590509250925092565b600080600080608085870312156116c657600080fd5b5050823594602084013594506040840135936060013592509050565b600080604083850312156116f557600080fd5b8235915061162e60208401611663565b60006060828403121561171757600080fd5b50919050565b600080600060a0848603121561173257600080fd5b8335925061174260208501611663565b91506117518560408601611705565b90509250925092565b803567ffffffffffffffff8116811461160657600080fd5b60008060006060848603121561178757600080fd5b833592506117976020850161175a565b91506117516040850161175a565b600080608083850312156117b857600080fd5b8235915061162e8460208501611705565b600080604083850312156117dc57600080fd5b8235915060208301356001600160a01b03811681146117fa57600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b600063ffffffff80831681851680830382111561184857634e487b7160e01b600052601160045260246000fd5b01949350505050565b60006020828403121561186357600080fd5b81516004811061187257600080fd5b9392505050565b60008261189657634e487b7160e01b600052601260045260246000fd5b500690565b6000602082840312156118ad57600080fd5b611872826115f2565b6000602082840312156118c857600080fd5b6118728261175a56fea26469706673582212207e53aad72fb4c3298c73e60f03e3909617a4d5db8da1841ba7b9dc8a3b8884af64736f6c63430008090033",
|
|
89
|
+
"bytecode": "0x610efc61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610cf1565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610d3b565b6102bf565b8180156100a957600080fd5b5061007b6100b8366004610d87565b6104e7565b8180156100c957600080fd5b5061007b6100d8366004610db3565b610608565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d84846108fd565b6109a7565b6001600160601b03198116600090815260148701602052604081209192506002820154600160801b900460ff1660048111156101a0576101a0610de0565b146102135760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160801b7fffffffffffffffffffffffffffffff00ffffffff00000000ffffffffffffffff909116680100000000000000004263ffffffff16021717905560138601805473ffffffffffffffffffffffffffffffffffffffff1916606084901c1790556040516001600160601b031983169086907f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e90600090a3505050505050565b601383015460601b6001600160601b0319908116908316141561034a5760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6001600160601b031982166000908152601484016020526040902060016002820154600160801b900460ff16600481111561038757610387610de0565b146103df5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b601284015460028201546000916104249163ffffffff740100000000000000000000000000000000000000009092048216916801000000000000000090910416610df6565b63ffffffff164210159050808061046457506012850154640100000000900467ffffffffffffffff166104588686866109ce565b67ffffffffffffffff16105b6104d65760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6104e08585610b01565b5050505050565b60028301546001600160a01b031633146105535760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b600061056261015d84846108fd565b905060016001600160601b031982166000908152601486016020526040902060020154600160801b900460ff1660048111156105a0576105a0610de0565b146105f85760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6106028482610b01565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b15801561066857600080fd5b505afa15801561067c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a09190610e2c565b60038111156106b1576106b1610de0565b146107245760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601382015460601b6001600160601b03198116156108655760006107498483856109ce565b6001600160601b031983166000908152601486016020526040812060020154601287015492935063ffffffff68010000000000000000909104811692610790911683610df6565b63ffffffff1642101590508080156107c25750601286015467ffffffffffffffff640100000000909104811690841610155b806107ef5750601286015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108615760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156108e057600080fd5b505af11580156108f4573d6000803e3d6000fd5b50505050505050565b6060600061090c600284610e54565b61093757507f020000000000000000000000000000000000000000000000000000000000000061095a565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6001600160601b0319821660009081526014840160205260408120600101548015610af957808335610a066040860160208701610e76565b610a166060870160408801610e9c565b604051602001610a839392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610ae65760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610af66060840160408501610e9c565b91505b509392505050565b6001600160601b03198116600090815260148301602052604090206001810154610b3457610b2f8383610c05565b610bc3565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffffffffffff0000000000ffffffffffffffffffffffff9091161770020000000000000000000000000000000017905580546040516001600160601b0319841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601383015460601b6001600160601b03199081169083161415610c005760138301805473ffffffffffffffffffffffffffffffffffffffff191690555b505050565b6001600160601b0319811660008181526014840160205260408082206002810180547fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff16700300000000000000000000000000000000179055805491519093927f47b159947c3066cb253f60e8f046cfd747411788a545cb189679e3fa1467b28d91a3600283015481546040517f343bb9270000000000000000000000000000000000000000000000000000000081526001600160a01b039092169163343bb92791610cd79160040190815260200190565b600060405180830381600087803b1580156108e057600080fd5b60008060008060808587031215610d0757600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610d3557600080fd5b50919050565b600080600060a08486031215610d5057600080fd5b8335925060208401356001600160601b031981168114610d6f57600080fd5b9150610d7e8560408601610d23565b90509250925092565b600080600060608486031215610d9c57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610dc657600080fd5b82359150610dd78460208501610d23565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b600063ffffffff808316818516808303821115610e2357634e487b7160e01b600052601160045260246000fd5b01949350505050565b600060208284031215610e3e57600080fd5b815160048110610e4d57600080fd5b9392505050565b600082610e7157634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610e8857600080fd5b813563ffffffff81168114610e4d57600080fd5b600060208284031215610eae57600080fd5b813567ffffffffffffffff81168114610e4d57600080fdfea2646970667358221220a60290fcd641def3891bd349310544df0fa3ca2ae8d89fd4111ea950c433649b64736f6c63430008090033",
|
|
90
|
+
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634afbe4c91461005b57806399b0b8471461007d578063c87de7f41461009d578063d079fbb1146100bd575b600080fd5b81801561006757600080fd5b5061007b610076366004610cf1565b6100dd565b005b81801561008957600080fd5b5061007b610098366004610d3b565b6102bf565b8180156100a957600080fd5b5061007b6100b8366004610d87565b6104e7565b8180156100c957600080fd5b5061007b6100d8366004610db3565b610608565b60028401546001600160a01b0316331461014e5760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b60648201526084015b60405180910390fd5b600061016261015d84846108fd565b6109a7565b6001600160601b03198116600090815260148701602052604081209192506002820154600160801b900460ff1660048111156101a0576101a0610de0565b146102135760405162461bcd60e51b815260206004820152602860248201527f45434453412077616c6c657420686173206265656e20616c726561647920726560448201527f67697374657265640000000000000000000000000000000000000000000000006064820152608401610145565b848155600281018054600160801b7fffffffffffffffffffffffffffffff00ffffffff00000000ffffffffffffffff909116680100000000000000004263ffffffff16021717905560138601805473ffffffffffffffffffffffffffffffffffffffff1916606084901c1790556040516001600160601b031983169086907f2dbb47dce81d6b11cca1f1e3b10143d6f7e1e7e92d2dd9aacbb1f875379d308e90600090a3505050505050565b601383015460601b6001600160601b0319908116908316141561034a5760405162461bcd60e51b815260206004820152602c60248201527f4163746976652077616c6c65742063616e6e6f7420626520636f6e736964657260448201527f656420636c6f736561626c6500000000000000000000000000000000000000006064820152608401610145565b6001600160601b031982166000908152601484016020526040902060016002820154600160801b900460ff16600481111561038757610387610de0565b146103df5760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b601284015460028201546000916104249163ffffffff740100000000000000000000000000000000000000009092048216916801000000000000000090910416610df6565b63ffffffff164210159050808061046457506012850154640100000000900467ffffffffffffffff166104588686866109ce565b67ffffffffffffffff16105b6104d65760405162461bcd60e51b815260206004820152603660248201527f57616c6c6574206e6565647320746f206265206f6c6420656e6f756768206f7260448201527f206861766520746f6f20666577207361746f73686973000000000000000000006064820152608401610145565b6104e08585610b01565b5050505050565b60028301546001600160a01b031633146105535760405162461bcd60e51b815260206004820152602760248201527f43616c6c6572206973206e6f74207468652045434453412057616c6c657420526044820152666567697374727960c81b6064820152608401610145565b600061056261015d84846108fd565b905060016001600160601b031982166000908152601486016020526040902060020154600160801b900460ff1660048111156105a0576105a0610de0565b146105f85760405162461bcd60e51b815260206004820152602260248201527f45434453412077616c6c6574206d75737420626520696e204c69766520737461604482015261746560f01b6064820152608401610145565b6106028482610b01565b50505050565b6002820154604080517fcc56238800000000000000000000000000000000000000000000000000000000815290516000926001600160a01b03169163cc562388916004808301926020929190829003018186803b15801561066857600080fd5b505afa15801561067c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a09190610e2c565b60038111156106b1576106b1610de0565b146107245760405162461bcd60e51b815260206004820152602360248201527f57616c6c6574206372656174696f6e20616c726561647920696e2070726f677260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610145565b601382015460601b6001600160601b03198116156108655760006107498483856109ce565b6001600160601b031983166000908152601486016020526040812060020154601287015492935063ffffffff68010000000000000000909104811692610790911683610df6565b63ffffffff1642101590508080156107c25750601286015467ffffffffffffffff640100000000909104811690841610155b806107ef5750601286015467ffffffffffffffff6c01000000000000000000000000909104811690841610155b6108615760405162461bcd60e51b815260206004820152602660248201527f57616c6c6574206372656174696f6e20636f6e646974696f6e7320617265206e60448201527f6f74206d657400000000000000000000000000000000000000000000000000006064820152608401610145565b5050505b6040517f31fecb80caf1e1128496dd5a6f1083ba29fd5fe64c3fe04e2d1b6f9cfc27d5a390600090a18260020160009054906101000a90046001600160a01b03166001600160a01b03166372cc8c6d6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156108e057600080fd5b505af11580156108f4573d6000803e3d6000fd5b50505050505050565b6060600061090c600284610e54565b61093757507f020000000000000000000000000000000000000000000000000000000000000061095a565b507f03000000000000000000000000000000000000000000000000000000000000005b6040517fff00000000000000000000000000000000000000000000000000000000000000821660208201526021810185905260410160405160208183030381529060405291505092915050565b60006020600083516020850160025afa50602060006020600060035afa5050600c51919050565b6001600160601b0319821660009081526014840160205260408120600101548015610af957808335610a066040860160208701610e76565b610a166060870160408801610e9c565b604051602001610a839392919092835260e09190911b7fffffffff0000000000000000000000000000000000000000000000000000000016602083015260c01b7fffffffffffffffff000000000000000000000000000000000000000000000000166024820152602c0190565b6040516020818303038152906040528051906020012014610ae65760405162461bcd60e51b815260206004820152601d60248201527f496e76616c69642077616c6c6574206d61696e205554584f20646174610000006044820152606401610145565b610af66060840160408501610e9c565b91505b509392505050565b6001600160601b03198116600090815260148301602052604090206001810154610b3457610b2f8383610c05565b610bc3565b60028101805463ffffffff42166c01000000000000000000000000027fffffffffffffffffffffffffffffff0000000000ffffffffffffffffffffffff9091161770020000000000000000000000000000000017905580546040516001600160601b0319841691907fbdc9ce990a067e5fd3a5d8dfc68e27e9f221aaa3fe55265e0b7e93c460b3efe290600090a35b601383015460601b6001600160601b03199081169083161415610c005760138301805473ffffffffffffffffffffffffffffffffffffffff191690555b505050565b6001600160601b0319811660008181526014840160205260408082206002810180547fffffffffffffffffffffffffffffff00ffffffffffffffffffffffffffffffff16700300000000000000000000000000000000179055805491519093927f47b159947c3066cb253f60e8f046cfd747411788a545cb189679e3fa1467b28d91a3600283015481546040517f343bb9270000000000000000000000000000000000000000000000000000000081526001600160a01b039092169163343bb92791610cd79160040190815260200190565b600060405180830381600087803b1580156108e057600080fd5b60008060008060808587031215610d0757600080fd5b5050823594602084013594506040840135936060013592509050565b600060608284031215610d3557600080fd5b50919050565b600080600060a08486031215610d5057600080fd5b8335925060208401356001600160601b031981168114610d6f57600080fd5b9150610d7e8560408601610d23565b90509250925092565b600080600060608486031215610d9c57600080fd5b505081359360208301359350604090920135919050565b60008060808385031215610dc657600080fd5b82359150610dd78460208501610d23565b90509250929050565b634e487b7160e01b600052602160045260246000fd5b600063ffffffff808316818516808303821115610e2357634e487b7160e01b600052601160045260246000fd5b01949350505050565b600060208284031215610e3e57600080fd5b815160048110610e4d57600080fd5b9392505050565b600082610e7157634e487b7160e01b600052601260045260246000fd5b500690565b600060208284031215610e8857600080fd5b813563ffffffff81168114610e4d57600080fd5b600060208284031215610eae57600080fd5b813567ffffffffffffffff81168114610e4d57600080fdfea2646970667358221220a60290fcd641def3891bd349310544df0fa3ca2ae8d89fd4111ea950c433649b64736f6c63430008090033",
|
|
136
91
|
"linkReferences": {},
|
|
137
92
|
"deployedLinkReferences": {}
|
|
138
93
|
}
|
|
@@ -66,7 +66,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
66
66
|
using Redeem for BridgeState.Storage;
|
|
67
67
|
using MovingFunds for BridgeState.Storage;
|
|
68
68
|
using Fraud for BridgeState.Storage;
|
|
69
|
-
using Wallets for
|
|
69
|
+
using Wallets for BridgeState.Storage;
|
|
70
70
|
|
|
71
71
|
using BTCUtils for bytes;
|
|
72
72
|
using BTCUtils for uint256;
|
|
@@ -74,18 +74,13 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
74
74
|
|
|
75
75
|
BridgeState.Storage internal self;
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
event WalletBtcBalanceRangeUpdated(
|
|
83
|
-
uint64 newMinBtcBalance,
|
|
84
|
-
uint64 newMaxBtcBalance
|
|
77
|
+
event WalletParametersUpdated(
|
|
78
|
+
uint32 walletCreationPeriod,
|
|
79
|
+
uint64 walletMinBtcBalance,
|
|
80
|
+
uint64 walletMaxBtcBalance,
|
|
81
|
+
uint32 walletMaxAge
|
|
85
82
|
);
|
|
86
83
|
|
|
87
|
-
event WalletMaxAgeUpdated(uint32 newMaxAge);
|
|
88
|
-
|
|
89
84
|
event NewWalletRequested();
|
|
90
85
|
|
|
91
86
|
event NewWalletRegistered(
|
|
@@ -190,6 +185,12 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
190
185
|
require(_relay != address(0), "Relay address cannot be zero");
|
|
191
186
|
self.relay = IRelay(_relay);
|
|
192
187
|
|
|
188
|
+
require(
|
|
189
|
+
_ecdsaWalletRegistry != address(0),
|
|
190
|
+
"ECDSA Wallet Registry address cannot be zero"
|
|
191
|
+
);
|
|
192
|
+
self.ecdsaWalletRegistry = EcdsaWalletRegistry(_ecdsaWalletRegistry);
|
|
193
|
+
|
|
193
194
|
require(_treasury != address(0), "Treasury address cannot be zero");
|
|
194
195
|
self.treasury = _treasury;
|
|
195
196
|
|
|
@@ -208,54 +209,10 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
208
209
|
self.fraudNotifierRewardMultiplier = 100; // 100%
|
|
209
210
|
self.fraudChallengeDefeatTimeout = 7 days;
|
|
210
211
|
self.fraudChallengeDepositAmount = 2 ether;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
wallets.setBtcBalanceRange(1 * 1e8, 10 * 1e8); // [1 BTC, 10 BTC]
|
|
216
|
-
wallets.setMaxAge(26 weeks); // ~6 months
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/// @notice Updates parameters used by the `Wallets` library.
|
|
220
|
-
/// @param creationPeriod New value of the wallet creation period
|
|
221
|
-
/// @param minBtcBalance New value of the minimum BTC balance
|
|
222
|
-
/// @param maxBtcBalance New value of the maximum BTC balance
|
|
223
|
-
/// @param maxAge New value of the wallet maximum age
|
|
224
|
-
/// @dev Requirements:
|
|
225
|
-
/// - Caller must be the contract owner.
|
|
226
|
-
/// - Minimum BTC balance must be greater than zero
|
|
227
|
-
/// - Maximum BTC balance must be greater than minimum BTC balance
|
|
228
|
-
function updateWalletsParameters(
|
|
229
|
-
uint32 creationPeriod,
|
|
230
|
-
uint64 minBtcBalance,
|
|
231
|
-
uint64 maxBtcBalance,
|
|
232
|
-
uint32 maxAge
|
|
233
|
-
) external onlyOwner {
|
|
234
|
-
wallets.setCreationPeriod(creationPeriod);
|
|
235
|
-
wallets.setBtcBalanceRange(minBtcBalance, maxBtcBalance);
|
|
236
|
-
wallets.setMaxAge(maxAge);
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/// @return creationPeriod Value of the wallet creation period
|
|
240
|
-
/// @return minBtcBalance Value of the minimum BTC balance
|
|
241
|
-
/// @return maxBtcBalance Value of the maximum BTC balance
|
|
242
|
-
/// @return maxAge Value of the wallet max age
|
|
243
|
-
function getWalletsParameters()
|
|
244
|
-
external
|
|
245
|
-
view
|
|
246
|
-
returns (
|
|
247
|
-
uint32 creationPeriod,
|
|
248
|
-
uint64 minBtcBalance,
|
|
249
|
-
uint64 maxBtcBalance,
|
|
250
|
-
uint32 maxAge
|
|
251
|
-
)
|
|
252
|
-
{
|
|
253
|
-
creationPeriod = wallets.creationPeriod;
|
|
254
|
-
minBtcBalance = wallets.minBtcBalance;
|
|
255
|
-
maxBtcBalance = wallets.maxBtcBalance;
|
|
256
|
-
maxAge = wallets.maxAge;
|
|
257
|
-
|
|
258
|
-
return (creationPeriod, minBtcBalance, maxBtcBalance, maxAge);
|
|
212
|
+
self.walletCreationPeriod = 1 weeks;
|
|
213
|
+
self.walletMinBtcBalance = 1e8; // 1 BTC
|
|
214
|
+
self.walletMaxBtcBalance = 10e8; // 10 BTC
|
|
215
|
+
self.walletMaxAge = 26 weeks; // ~6 months
|
|
259
216
|
}
|
|
260
217
|
|
|
261
218
|
/// @notice Allows the Governance to mark the given vault address as trusted
|
|
@@ -299,7 +256,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
299
256
|
function requestNewWallet(BitcoinTx.UTXO calldata activeWalletMainUtxo)
|
|
300
257
|
external
|
|
301
258
|
{
|
|
302
|
-
|
|
259
|
+
self.requestNewWallet(activeWalletMainUtxo);
|
|
303
260
|
}
|
|
304
261
|
|
|
305
262
|
/// @notice A callback function that is called by the ECDSA Wallet Registry
|
|
@@ -315,7 +272,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
315
272
|
bytes32 publicKeyX,
|
|
316
273
|
bytes32 publicKeyY
|
|
317
274
|
) external override {
|
|
318
|
-
|
|
275
|
+
self.registerNewWallet(ecdsaWalletID, publicKeyX, publicKeyY);
|
|
319
276
|
}
|
|
320
277
|
|
|
321
278
|
/// @notice A callback function that is called by the ECDSA Wallet Registry
|
|
@@ -330,7 +287,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
330
287
|
bytes32 publicKeyX,
|
|
331
288
|
bytes32 publicKeyY
|
|
332
289
|
) external override {
|
|
333
|
-
|
|
290
|
+
self.notifyWalletHeartbeatFailed(publicKeyX, publicKeyY);
|
|
334
291
|
}
|
|
335
292
|
|
|
336
293
|
/// @notice Notifies that the wallet is either old enough or has too few
|
|
@@ -352,7 +309,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
352
309
|
bytes20 walletPubKeyHash,
|
|
353
310
|
BitcoinTx.UTXO calldata walletMainUtxo
|
|
354
311
|
) external {
|
|
355
|
-
|
|
312
|
+
self.notifyCloseableWallet(walletPubKeyHash, walletMainUtxo);
|
|
356
313
|
}
|
|
357
314
|
|
|
358
315
|
/// @notice Gets details about a registered wallet.
|
|
@@ -364,7 +321,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
364
321
|
view
|
|
365
322
|
returns (Wallets.Wallet memory)
|
|
366
323
|
{
|
|
367
|
-
return
|
|
324
|
+
return self.registeredWallets[walletPubKeyHash];
|
|
368
325
|
}
|
|
369
326
|
|
|
370
327
|
/// @notice Gets the public key hash of the active wallet.
|
|
@@ -372,7 +329,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
372
329
|
/// over the compressed ECDSA public key) of the active wallet.
|
|
373
330
|
/// Returns bytes20(0) if there is no active wallet at the moment.
|
|
374
331
|
function getActiveWalletPubKeyHash() external view returns (bytes20) {
|
|
375
|
-
return
|
|
332
|
+
return self.activeWalletPubKeyHash;
|
|
376
333
|
}
|
|
377
334
|
|
|
378
335
|
/// @notice Used by the depositor to reveal information about their P2(W)SH
|
|
@@ -413,7 +370,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
413
370
|
BitcoinTx.Info calldata fundingTx,
|
|
414
371
|
Deposit.DepositRevealInfo calldata reveal
|
|
415
372
|
) external {
|
|
416
|
-
self.revealDeposit(
|
|
373
|
+
self.revealDeposit(fundingTx, reveal);
|
|
417
374
|
}
|
|
418
375
|
|
|
419
376
|
/// @notice Used by the wallet to prove the BTC deposit sweep transaction
|
|
@@ -457,7 +414,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
457
414
|
BitcoinTx.Proof calldata sweepProof,
|
|
458
415
|
BitcoinTx.UTXO calldata mainUtxo
|
|
459
416
|
) external {
|
|
460
|
-
self.submitSweepProof(
|
|
417
|
+
self.submitSweepProof(sweepTx, sweepProof, mainUtxo);
|
|
461
418
|
}
|
|
462
419
|
|
|
463
420
|
/// @notice Submits a fraud challenge indicating that a UTXO being under
|
|
@@ -497,7 +454,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
497
454
|
bytes32 sighash,
|
|
498
455
|
BitcoinTx.RSVSignature calldata signature
|
|
499
456
|
) external payable {
|
|
500
|
-
self.submitFraudChallenge(
|
|
457
|
+
self.submitFraudChallenge(walletPublicKey, sighash, signature);
|
|
501
458
|
}
|
|
502
459
|
|
|
503
460
|
/// @notice Allows to defeat a pending fraud challenge against a wallet if
|
|
@@ -612,7 +569,6 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
612
569
|
uint64 amount
|
|
613
570
|
) external {
|
|
614
571
|
self.requestRedemption(
|
|
615
|
-
wallets,
|
|
616
572
|
walletPubKeyHash,
|
|
617
573
|
mainUtxo,
|
|
618
574
|
redeemerOutputScript,
|
|
@@ -671,7 +627,6 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
671
627
|
bytes20 walletPubKeyHash
|
|
672
628
|
) external {
|
|
673
629
|
self.submitRedemptionProof(
|
|
674
|
-
wallets,
|
|
675
630
|
redemptionTx,
|
|
676
631
|
redemptionProof,
|
|
677
632
|
mainUtxo,
|
|
@@ -707,11 +662,7 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
707
662
|
bytes20 walletPubKeyHash,
|
|
708
663
|
bytes calldata redeemerOutputScript
|
|
709
664
|
) external {
|
|
710
|
-
self.notifyRedemptionTimeout(
|
|
711
|
-
wallets,
|
|
712
|
-
walletPubKeyHash,
|
|
713
|
-
redeemerOutputScript
|
|
714
|
-
);
|
|
665
|
+
self.notifyRedemptionTimeout(walletPubKeyHash, redeemerOutputScript);
|
|
715
666
|
}
|
|
716
667
|
|
|
717
668
|
/// @notice Used by the wallet to prove the BTC moving funds transaction
|
|
@@ -766,7 +717,6 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
766
717
|
bytes20 walletPubKeyHash
|
|
767
718
|
) external {
|
|
768
719
|
self.submitMovingFundsProof(
|
|
769
|
-
wallets,
|
|
770
720
|
movingFundsTx,
|
|
771
721
|
movingFundsProof,
|
|
772
722
|
mainUtxo,
|
|
@@ -912,6 +862,59 @@ contract Bridge is Ownable, EcdsaWalletOwner {
|
|
|
912
862
|
fraudChallengeDepositAmount = self.fraudChallengeDepositAmount;
|
|
913
863
|
}
|
|
914
864
|
|
|
865
|
+
/// @return walletCreationPeriod Determines how frequently a new wallet
|
|
866
|
+
/// creation can be requested. Value in seconds.
|
|
867
|
+
/// @return walletMinBtcBalance The minimum BTC threshold in satoshi that is
|
|
868
|
+
/// used to decide about wallet creation or closing.
|
|
869
|
+
/// @return walletMaxBtcBalance The maximum BTC threshold in satoshi that is
|
|
870
|
+
/// used to decide about wallet creation.
|
|
871
|
+
/// @return walletMaxAge The maximum age of a wallet in seconds, after which
|
|
872
|
+
/// the wallet moving funds process can be requested.
|
|
873
|
+
function walletParameters()
|
|
874
|
+
external
|
|
875
|
+
view
|
|
876
|
+
returns (
|
|
877
|
+
uint32 walletCreationPeriod,
|
|
878
|
+
uint64 walletMinBtcBalance,
|
|
879
|
+
uint64 walletMaxBtcBalance,
|
|
880
|
+
uint32 walletMaxAge
|
|
881
|
+
)
|
|
882
|
+
{
|
|
883
|
+
walletCreationPeriod = self.walletCreationPeriod;
|
|
884
|
+
walletMinBtcBalance = self.walletMinBtcBalance;
|
|
885
|
+
walletMaxBtcBalance = self.walletMaxBtcBalance;
|
|
886
|
+
walletMaxAge = self.walletMaxAge;
|
|
887
|
+
}
|
|
888
|
+
|
|
889
|
+
/// @notice Updates parameters of wallets.
|
|
890
|
+
/// @param walletCreationPeriod New value of the wallet creation period in
|
|
891
|
+
/// seconds, determines how frequently a new wallet creation can be
|
|
892
|
+
/// requested
|
|
893
|
+
/// @param walletMinBtcBalance New value of the wallet minimum BTC balance
|
|
894
|
+
/// in sathoshis, used to decide about wallet creation or closing
|
|
895
|
+
/// @param walletMaxBtcBalance New value of the wallet maximum BTC balance
|
|
896
|
+
/// in sathoshis, used to decide about wallet creation
|
|
897
|
+
/// @param walletMaxAge New value of the wallet maximum age in seconds,
|
|
898
|
+
/// indicates the maximum age of a wallet in seconds, after which
|
|
899
|
+
/// the wallet moving funds process can be requested
|
|
900
|
+
/// @dev Requirements:
|
|
901
|
+
/// - Wallet minimum BTC balance must be greater than zero
|
|
902
|
+
/// - Wallet maximum BTC balance must be greater than the wallet
|
|
903
|
+
/// minimum BTC balance
|
|
904
|
+
function updateWalletParameters(
|
|
905
|
+
uint32 walletCreationPeriod,
|
|
906
|
+
uint64 walletMinBtcBalance,
|
|
907
|
+
uint64 walletMaxBtcBalance,
|
|
908
|
+
uint32 walletMaxAge
|
|
909
|
+
) external onlyOwner {
|
|
910
|
+
self.updateWalletParameters(
|
|
911
|
+
walletCreationPeriod,
|
|
912
|
+
walletMinBtcBalance,
|
|
913
|
+
walletMaxBtcBalance,
|
|
914
|
+
walletMaxAge
|
|
915
|
+
);
|
|
916
|
+
}
|
|
917
|
+
|
|
915
918
|
/// @notice Indicates if the vault with the given address is trusted or not.
|
|
916
919
|
/// Depositors can route their revealed deposits only to trusted
|
|
917
920
|
/// vaults and have trusted vaults notified about new deposits as
|
|
@@ -19,19 +19,22 @@ import "./IRelay.sol";
|
|
|
19
19
|
import "./Deposit.sol";
|
|
20
20
|
import "./Redeem.sol";
|
|
21
21
|
import "./Fraud.sol";
|
|
22
|
+
import "./Wallets.sol";
|
|
22
23
|
|
|
23
24
|
import "../bank/Bank.sol";
|
|
24
25
|
|
|
25
26
|
library BridgeState {
|
|
26
27
|
// TODO: Make parameters governable
|
|
27
28
|
struct Storage {
|
|
28
|
-
//
|
|
29
|
-
// successfully evaluate an SPV proof.
|
|
30
|
-
uint256 txProofDifficultyFactor;
|
|
31
|
-
// Address of the Bank this Bridge belongs to.
|
|
29
|
+
// Address of the Bank the Bridge belongs to.
|
|
32
30
|
Bank bank;
|
|
33
31
|
// Bitcoin relay providing the current Bitcoin network difficulty.
|
|
34
32
|
IRelay relay;
|
|
33
|
+
// ECDSA Wallet Registry contract handle.
|
|
34
|
+
EcdsaWalletRegistry ecdsaWalletRegistry;
|
|
35
|
+
// The number of confirmations on the Bitcoin chain required to
|
|
36
|
+
// successfully evaluate an SPV proof.
|
|
37
|
+
uint256 txProofDifficultyFactor;
|
|
35
38
|
// Address where the deposit and redemption treasury fees will be sent
|
|
36
39
|
// to. Treasury takes part in the operators rewarding process.
|
|
37
40
|
address treasury;
|
|
@@ -155,6 +158,77 @@ library BridgeState {
|
|
|
155
158
|
// spent if it was used as an input of a transaction that have been
|
|
156
159
|
// proven in the Bridge.
|
|
157
160
|
mapping(uint256 => bool) spentMainUTXOs;
|
|
161
|
+
// Determines how frequently a new wallet creation can be requested.
|
|
162
|
+
// Value in seconds.
|
|
163
|
+
uint32 walletCreationPeriod;
|
|
164
|
+
// The minimum BTC threshold in satoshi that is used to decide about
|
|
165
|
+
// wallet creation or closing.
|
|
166
|
+
uint64 walletMinBtcBalance;
|
|
167
|
+
// The maximum BTC threshold in satoshi that is used to decide about
|
|
168
|
+
// wallet creation.
|
|
169
|
+
uint64 walletMaxBtcBalance;
|
|
170
|
+
// The maximum age of a wallet in seconds, after which the wallet
|
|
171
|
+
// moving funds process can be requested.
|
|
172
|
+
uint32 walletMaxAge;
|
|
173
|
+
// 20-byte wallet public key hash being reference to the currently
|
|
174
|
+
// active wallet. Can be unset to the zero value under certain
|
|
175
|
+
// circumstances.
|
|
176
|
+
bytes20 activeWalletPubKeyHash;
|
|
177
|
+
// Maps the 20-byte wallet public key hash (computed using Bitcoin
|
|
178
|
+
// HASH160 over the compressed ECDSA public key) to the basic wallet
|
|
179
|
+
// information like state and pending redemptions value.
|
|
180
|
+
mapping(bytes20 => Wallets.Wallet) registeredWallets;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
event WalletParametersUpdated(
|
|
184
|
+
uint32 walletCreationPeriod,
|
|
185
|
+
uint64 walletMinBtcBalance,
|
|
186
|
+
uint64 walletMaxBtcBalance,
|
|
187
|
+
uint32 walletMaxAge
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
/// @notice Updates parameters of wallets.
|
|
191
|
+
/// @param _walletCreationPeriod New value of the wallet creation period in
|
|
192
|
+
/// seconds, determines how frequently a new wallet creation can be
|
|
193
|
+
/// requested
|
|
194
|
+
/// @param _walletMinBtcBalance New value of the wallet minimum BTC balance
|
|
195
|
+
/// in sathoshis, used to decide about wallet creation or closing
|
|
196
|
+
/// @param _walletMaxBtcBalance New value of the wallet maximum BTC balance
|
|
197
|
+
/// in sathoshis, used to decide about wallet creation
|
|
198
|
+
/// @param _walletMaxAge New value of the wallet maximum age in seconds,
|
|
199
|
+
/// indicates the maximum age of a wallet in seconds, after which
|
|
200
|
+
/// the wallet moving funds process can be requested
|
|
201
|
+
/// @dev Requirements:
|
|
202
|
+
/// - Wallet minimum BTC balance must be greater than zero
|
|
203
|
+
/// - Wallet maximum BTC balance must be greater than the wallet
|
|
204
|
+
/// minimum BTC balance
|
|
205
|
+
function updateWalletParameters(
|
|
206
|
+
Storage storage self,
|
|
207
|
+
uint32 _walletCreationPeriod,
|
|
208
|
+
uint64 _walletMinBtcBalance,
|
|
209
|
+
uint64 _walletMaxBtcBalance,
|
|
210
|
+
uint32 _walletMaxAge
|
|
211
|
+
) internal {
|
|
212
|
+
require(
|
|
213
|
+
_walletMinBtcBalance > 0,
|
|
214
|
+
"Wallet minimum BTC balance must be greater than zero"
|
|
215
|
+
);
|
|
216
|
+
require(
|
|
217
|
+
_walletMaxBtcBalance > _walletMinBtcBalance,
|
|
218
|
+
"Wallet maximum BTC balance must be greater than the minimum"
|
|
219
|
+
);
|
|
220
|
+
|
|
221
|
+
self.walletCreationPeriod = _walletCreationPeriod;
|
|
222
|
+
self.walletMinBtcBalance = _walletMinBtcBalance;
|
|
223
|
+
self.walletMaxBtcBalance = _walletMaxBtcBalance;
|
|
224
|
+
self.walletMaxAge = _walletMaxAge;
|
|
225
|
+
|
|
226
|
+
emit WalletParametersUpdated(
|
|
227
|
+
_walletCreationPeriod,
|
|
228
|
+
_walletMinBtcBalance,
|
|
229
|
+
_walletMaxBtcBalance,
|
|
230
|
+
_walletMaxAge
|
|
231
|
+
);
|
|
158
232
|
}
|
|
159
233
|
|
|
160
234
|
// TODO: Is it the right place for this function? Should we move it to Bridge?
|
|
@@ -23,8 +23,6 @@ import "./BridgeState.sol";
|
|
|
23
23
|
import "./Wallets.sol";
|
|
24
24
|
|
|
25
25
|
library Deposit {
|
|
26
|
-
using Wallets for Wallets.Data;
|
|
27
|
-
|
|
28
26
|
using BTCUtils for bytes;
|
|
29
27
|
using BytesLib for bytes;
|
|
30
28
|
|
|
@@ -123,12 +121,11 @@ library Deposit {
|
|
|
123
121
|
/// deposit script unlocks to receive their BTC back.
|
|
124
122
|
function revealDeposit(
|
|
125
123
|
BridgeState.Storage storage self,
|
|
126
|
-
Wallets.Data storage wallets,
|
|
127
124
|
BitcoinTx.Info calldata fundingTx,
|
|
128
125
|
DepositRevealInfo calldata reveal
|
|
129
126
|
) external {
|
|
130
127
|
require(
|
|
131
|
-
|
|
128
|
+
self.registeredWallets[reveal.walletPubKeyHash].state ==
|
|
132
129
|
Wallets.WalletState.Live,
|
|
133
130
|
"Wallet is not in Live state"
|
|
134
131
|
);
|
|
@@ -104,7 +104,6 @@ library Fraud {
|
|
|
104
104
|
/// - Wallet can be challenged for the given signature only once
|
|
105
105
|
function submitFraudChallenge(
|
|
106
106
|
BridgeState.Storage storage self,
|
|
107
|
-
Wallets.Data storage wallets,
|
|
108
107
|
bytes calldata walletPublicKey,
|
|
109
108
|
bytes32 sighash,
|
|
110
109
|
BitcoinTx.RSVSignature calldata signature
|
|
@@ -131,7 +130,7 @@ library Fraud {
|
|
|
131
130
|
);
|
|
132
131
|
bytes20 walletPubKeyHash = compressedWalletPublicKey.hash160View();
|
|
133
132
|
|
|
134
|
-
Wallets.Wallet storage wallet =
|
|
133
|
+
Wallets.Wallet storage wallet = self.registeredWallets[
|
|
135
134
|
walletPubKeyHash
|
|
136
135
|
];
|
|
137
136
|
|
|
@@ -24,7 +24,7 @@ import "./Redeem.sol";
|
|
|
24
24
|
|
|
25
25
|
library MovingFunds {
|
|
26
26
|
using BridgeState for BridgeState.Storage;
|
|
27
|
-
using Wallets for
|
|
27
|
+
using Wallets for BridgeState.Storage;
|
|
28
28
|
|
|
29
29
|
using BTCUtils for bytes;
|
|
30
30
|
using BytesLib for bytes;
|
|
@@ -81,7 +81,6 @@ library MovingFunds {
|
|
|
81
81
|
/// to `movingFundsTxMaxTotalFee` governable parameter.
|
|
82
82
|
function submitMovingFundsProof(
|
|
83
83
|
BridgeState.Storage storage self,
|
|
84
|
-
Wallets.Data storage wallets,
|
|
85
84
|
BitcoinTx.Info calldata movingFundsTx,
|
|
86
85
|
BitcoinTx.Proof calldata movingFundsProof,
|
|
87
86
|
BitcoinTx.UTXO calldata mainUtxo,
|
|
@@ -101,7 +100,6 @@ library MovingFunds {
|
|
|
101
100
|
// it refers to the expected wallet's main UTXO.
|
|
102
101
|
OutboundTx.processWalletOutboundTxInput(
|
|
103
102
|
self,
|
|
104
|
-
wallets,
|
|
105
103
|
movingFundsTx.inputVector,
|
|
106
104
|
mainUtxo,
|
|
107
105
|
walletPubKeyHash
|
|
@@ -118,7 +116,7 @@ library MovingFunds {
|
|
|
118
116
|
"Transaction fee is too high"
|
|
119
117
|
);
|
|
120
118
|
|
|
121
|
-
|
|
119
|
+
self.notifyWalletFundsMoved(walletPubKeyHash, targetWalletsHash);
|
|
122
120
|
|
|
123
121
|
emit MovingFundsCompleted(walletPubKeyHash, movingFundsTxHash);
|
|
124
122
|
}
|