@keep-network/tbtc-v2 0.1.1-dev.70 → 0.1.1-dev.71
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/Bank.json +3 -3
- package/artifacts/DefaultProxyAdmin.json +2 -2
- package/artifacts/Deposit.json +2 -2
- package/artifacts/DepositSweep.json +2 -2
- package/artifacts/EcdsaDkgValidator.json +2 -2
- package/artifacts/EcdsaInactivity.json +1 -1
- package/artifacts/Fraud.json +2 -2
- package/artifacts/KeepRegistry.json +1 -1
- package/artifacts/KeepStake.json +2 -2
- package/artifacts/KeepToken.json +2 -2
- package/artifacts/KeepTokenStaking.json +1 -1
- package/artifacts/MovingFunds.json +2 -2
- package/artifacts/NuCypherStakingEscrow.json +1 -1
- package/artifacts/NuCypherToken.json +2 -2
- package/artifacts/RandomBeaconStub.json +1 -1
- package/artifacts/Redemption.json +2 -2
- package/artifacts/ReimbursementPool.json +2 -2
- package/artifacts/Relay.json +2 -2
- package/artifacts/SortitionPool.json +3 -3
- package/artifacts/T.json +2 -2
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/TokenStaking.json +1 -1
- package/artifacts/TokenholderGovernor.json +9 -9
- package/artifacts/TokenholderTimelock.json +8 -8
- package/artifacts/VendingMachine.json +3 -3
- package/artifacts/VendingMachineKeep.json +1 -1
- package/artifacts/VendingMachineNuCypher.json +1 -1
- package/artifacts/WalletRegistry.json +6 -6
- package/artifacts/WalletRegistry_Implementation.json +1 -1
- package/artifacts/WalletRegistry_Proxy.json +6 -6
- package/artifacts/Wallets.json +2 -2
- package/artifacts/solcInputs/{922f95457ca7980d018c851fb3308a7e.json → 55619e5b15411ce6622d6da869c273a1.json} +4 -4
- 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/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- 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/Heartbeat.sol/Heartbeat.dbg.json +1 -1
- 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/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- 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/token/TBTC.sol/TBTC.dbg.json +1 -1
- package/build/contracts/vault/DonationVault.sol/DonationVault.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/build/contracts/vault/TBTCVault.sol/TBTCVault.json +98 -2
- package/contracts/vault/TBTCVault.sol +33 -1
- package/package.json +1 -1
|
@@ -19,6 +19,25 @@
|
|
|
19
19
|
"stateMutability": "nonpayable",
|
|
20
20
|
"type": "constructor"
|
|
21
21
|
},
|
|
22
|
+
{
|
|
23
|
+
"anonymous": false,
|
|
24
|
+
"inputs": [
|
|
25
|
+
{
|
|
26
|
+
"indexed": false,
|
|
27
|
+
"internalType": "address",
|
|
28
|
+
"name": "oldGovernance",
|
|
29
|
+
"type": "address"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"indexed": false,
|
|
33
|
+
"internalType": "address",
|
|
34
|
+
"name": "newGovernance",
|
|
35
|
+
"type": "address"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"name": "GovernanceTransferred",
|
|
39
|
+
"type": "event"
|
|
40
|
+
},
|
|
22
41
|
{
|
|
23
42
|
"anonymous": false,
|
|
24
43
|
"inputs": [
|
|
@@ -70,6 +89,19 @@
|
|
|
70
89
|
"stateMutability": "view",
|
|
71
90
|
"type": "function"
|
|
72
91
|
},
|
|
92
|
+
{
|
|
93
|
+
"inputs": [],
|
|
94
|
+
"name": "governance",
|
|
95
|
+
"outputs": [
|
|
96
|
+
{
|
|
97
|
+
"internalType": "address",
|
|
98
|
+
"name": "",
|
|
99
|
+
"type": "address"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"stateMutability": "view",
|
|
103
|
+
"type": "function"
|
|
104
|
+
},
|
|
73
105
|
{
|
|
74
106
|
"inputs": [
|
|
75
107
|
{
|
|
@@ -147,6 +179,57 @@
|
|
|
147
179
|
"stateMutability": "nonpayable",
|
|
148
180
|
"type": "function"
|
|
149
181
|
},
|
|
182
|
+
{
|
|
183
|
+
"inputs": [
|
|
184
|
+
{
|
|
185
|
+
"internalType": "contract IERC20",
|
|
186
|
+
"name": "token",
|
|
187
|
+
"type": "address"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"internalType": "address",
|
|
191
|
+
"name": "recipient",
|
|
192
|
+
"type": "address"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"internalType": "uint256",
|
|
196
|
+
"name": "amount",
|
|
197
|
+
"type": "uint256"
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"name": "recoverERC20",
|
|
201
|
+
"outputs": [],
|
|
202
|
+
"stateMutability": "nonpayable",
|
|
203
|
+
"type": "function"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"inputs": [
|
|
207
|
+
{
|
|
208
|
+
"internalType": "contract IERC721",
|
|
209
|
+
"name": "token",
|
|
210
|
+
"type": "address"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"internalType": "address",
|
|
214
|
+
"name": "recipient",
|
|
215
|
+
"type": "address"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"internalType": "uint256",
|
|
219
|
+
"name": "tokenId",
|
|
220
|
+
"type": "uint256"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"internalType": "bytes",
|
|
224
|
+
"name": "data",
|
|
225
|
+
"type": "bytes"
|
|
226
|
+
}
|
|
227
|
+
],
|
|
228
|
+
"name": "recoverERC721",
|
|
229
|
+
"outputs": [],
|
|
230
|
+
"stateMutability": "nonpayable",
|
|
231
|
+
"type": "function"
|
|
232
|
+
},
|
|
150
233
|
{
|
|
151
234
|
"inputs": [
|
|
152
235
|
{
|
|
@@ -172,10 +255,23 @@
|
|
|
172
255
|
],
|
|
173
256
|
"stateMutability": "view",
|
|
174
257
|
"type": "function"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"inputs": [
|
|
261
|
+
{
|
|
262
|
+
"internalType": "address",
|
|
263
|
+
"name": "newGovernance",
|
|
264
|
+
"type": "address"
|
|
265
|
+
}
|
|
266
|
+
],
|
|
267
|
+
"name": "transferGovernance",
|
|
268
|
+
"outputs": [],
|
|
269
|
+
"stateMutability": "nonpayable",
|
|
270
|
+
"type": "function"
|
|
175
271
|
}
|
|
176
272
|
],
|
|
177
|
-
"bytecode": "
|
|
178
|
-
"deployedBytecode": "
|
|
273
|
+
"bytecode": "0x608060405234801561001057600080fd5b5060405161108e38038061108e83398101604081905261002f916101a8565b6001600160a01b03821661008a5760405162461bcd60e51b815260206004820181905260248201527f42616e6b2063616e206e6f7420626520746865207a65726f206164647265737360448201526064015b60405180910390fd5b6001600160a01b0381166100ef5760405162461bcd60e51b815260206004820152602660248201527f5442544320746f6b656e2063616e206e6f7420626520746865207a65726f206160448201526564647265737360d01b6064820152608401610081565b603280546001600160a01b038085166001600160a01b03199283161790925560338054928416929091169190911790556101283361012f565b50506101e2565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b03811681146101a557600080fd5b50565b600080604083850312156101bb57600080fd5b82516101c681610190565b60208401519092506101d781610190565b809150509250929050565b610e9d806101f16000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c80638f4ffcb111610081578063db006a751161005b578063db006a7514610184578063e5d3d71414610197578063fc4e51f6146101aa57600080fd5b80638f4ffcb11461014b578063a0712d681461015e578063d38bfff41461017157600080fd5b806353794137116100b257806353794137146100f65780635aa6e6751461010957806376cdb03b1461013857600080fd5b80631171bda9146100ce578063461c6373146100e3575b600080fd5b6100e16100dc366004610b4e565b6101bd565b005b6100e16100f1366004610bdb565b6102a8565b6100e1610104366004610c47565b6103bb565b60005461011c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b60325461011c906001600160a01b031681565b6100e1610159366004610cb5565b610566565b6100e161016c366004610d28565b610625565b6100e161017f366004610d41565b610747565b6100e1610192366004610d28565b610829565b60335461011c906001600160a01b031681565b6100e16101b8366004610d65565b610833565b6000546001600160a01b0316331461021c5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064015b60405180910390fd5b6033546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda990606401600060405180830381600087803b15801561028b57600080fd5b505af115801561029f573d6000803e3d6000fd5b50505050505050565b6032546001600160a01b031633146103025760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b8261034f5760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f7273207370656369666965640000000000000000006044820152606401610213565b60005b838110156103b4576103a285858381811061036f5761036f610dbb565b90506020020160208101906103849190610d41565b84848481811061039657610396610dbb565b90506020020135610917565b806103ac81610dd1565b915050610352565b5050505050565b6032546001600160a01b031633146104155760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b6032546040516370a0823160e01b81526001600160a01b038481166004830152839216906370a082319060240160206040518083038186803b15801561045a57600080fd5b505afa15801561046e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104929190610dfa565b10156104eb5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6104f58282610917565b603254604051631f1b6d2760e21b81526001600160a01b0384811660048301523060248301526044820184905290911690637c6db49c906064015b600060405180830381600087803b15801561054a57600080fd5b505af115801561055e573d6000803e3d6000fd5b505050505050565b6033546001600160a01b038481169116146105c35760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f7420544254430000000000000000000000000000006044820152606401610213565b336001600160a01b0384161461061b5760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f77656400000000000000006044820152606401610213565b6103b485856109ac565b6032546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561066d57600080fd5b505afa158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190610dfa565b10156106fe5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6107088183610917565b603254604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c90606401610530565b6000546001600160a01b031633146107a15760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6001600160a01b03811661081d5760405162461bcd60e51b815260206004820152602260248201527f4e657720676f7665726e616e636520697320746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610213565b61082681610ac0565b50565b61082633826109ac565b6000546001600160a01b0316331461088d5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6033546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f6906108de9088908890889088908890600401610e13565b600060405180830381600087803b1580156108f857600080fd5b505af115801561090c573d6000803e3d6000fd5b505050505050505050565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe8260405161095291815260200190565b60405180910390a26033546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f1990604401610530565b816001600160a01b03167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b9369826040516109e791815260200190565b60405180910390a26033546040517f79cc67900000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b158015610a5657600080fd5b505af1158015610a6a573d6000803e3d6000fd5b50506032546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef9150604401610530565b600080546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b038116811461082657600080fd5b600080600060608486031215610b6357600080fd5b8335610b6e81610b39565b92506020840135610b7e81610b39565b929592945050506040919091013590565b60008083601f840112610ba157600080fd5b50813567ffffffffffffffff811115610bb957600080fd5b6020830191508360208260051b8501011115610bd457600080fd5b9250929050565b60008060008060408587031215610bf157600080fd5b843567ffffffffffffffff80821115610c0957600080fd5b610c1588838901610b8f565b90965094506020870135915080821115610c2e57600080fd5b50610c3b87828801610b8f565b95989497509550505050565b60008060408385031215610c5a57600080fd5b8235610c6581610b39565b946020939093013593505050565b60008083601f840112610c8557600080fd5b50813567ffffffffffffffff811115610c9d57600080fd5b602083019150836020828501011115610bd457600080fd5b600080600080600060808688031215610ccd57600080fd5b8535610cd881610b39565b9450602086013593506040860135610cef81610b39565b9250606086013567ffffffffffffffff811115610d0b57600080fd5b610d1788828901610c73565b969995985093965092949392505050565b600060208284031215610d3a57600080fd5b5035919050565b600060208284031215610d5357600080fd5b8135610d5e81610b39565b9392505050565b600080600080600060808688031215610d7d57600080fd5b8535610d8881610b39565b94506020860135610d9881610b39565b935060408601359250606086013567ffffffffffffffff811115610d0b57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600019821415610df357634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610e0c57600080fd5b5051919050565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f8501168301019050969550505050505056fea2646970667358221220ad1a8a2443526a3d896fd71d0a84753f3b464f49a3759597071b64bf74b8406964736f6c63430008090033",
|
|
274
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c80638f4ffcb111610081578063db006a751161005b578063db006a7514610184578063e5d3d71414610197578063fc4e51f6146101aa57600080fd5b80638f4ffcb11461014b578063a0712d681461015e578063d38bfff41461017157600080fd5b806353794137116100b257806353794137146100f65780635aa6e6751461010957806376cdb03b1461013857600080fd5b80631171bda9146100ce578063461c6373146100e3575b600080fd5b6100e16100dc366004610b4e565b6101bd565b005b6100e16100f1366004610bdb565b6102a8565b6100e1610104366004610c47565b6103bb565b60005461011c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b60325461011c906001600160a01b031681565b6100e1610159366004610cb5565b610566565b6100e161016c366004610d28565b610625565b6100e161017f366004610d41565b610747565b6100e1610192366004610d28565b610829565b60335461011c906001600160a01b031681565b6100e16101b8366004610d65565b610833565b6000546001600160a01b0316331461021c5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064015b60405180910390fd5b6033546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda990606401600060405180830381600087803b15801561028b57600080fd5b505af115801561029f573d6000803e3d6000fd5b50505050505050565b6032546001600160a01b031633146103025760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b8261034f5760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f7273207370656369666965640000000000000000006044820152606401610213565b60005b838110156103b4576103a285858381811061036f5761036f610dbb565b90506020020160208101906103849190610d41565b84848481811061039657610396610dbb565b90506020020135610917565b806103ac81610dd1565b915050610352565b5050505050565b6032546001600160a01b031633146104155760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b6032546040516370a0823160e01b81526001600160a01b038481166004830152839216906370a082319060240160206040518083038186803b15801561045a57600080fd5b505afa15801561046e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104929190610dfa565b10156104eb5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6104f58282610917565b603254604051631f1b6d2760e21b81526001600160a01b0384811660048301523060248301526044820184905290911690637c6db49c906064015b600060405180830381600087803b15801561054a57600080fd5b505af115801561055e573d6000803e3d6000fd5b505050505050565b6033546001600160a01b038481169116146105c35760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f7420544254430000000000000000000000000000006044820152606401610213565b336001600160a01b0384161461061b5760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f77656400000000000000006044820152606401610213565b6103b485856109ac565b6032546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561066d57600080fd5b505afa158015610681573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a59190610dfa565b10156106fe5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6107088183610917565b603254604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c90606401610530565b6000546001600160a01b031633146107a15760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6001600160a01b03811661081d5760405162461bcd60e51b815260206004820152602260248201527f4e657720676f7665726e616e636520697320746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610213565b61082681610ac0565b50565b61082633826109ac565b6000546001600160a01b0316331461088d5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6033546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f6906108de9088908890889088908890600401610e13565b600060405180830381600087803b1580156108f857600080fd5b505af115801561090c573d6000803e3d6000fd5b505050505050505050565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe8260405161095291815260200190565b60405180910390a26033546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f1990604401610530565b816001600160a01b03167f4896181ff8f4543cc00db9fe9b6fb7e6f032b7eb772c72ab1ec1b4d2e03b9369826040516109e791815260200190565b60405180910390a26033546040517f79cc67900000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b158015610a5657600080fd5b505af1158015610a6a573d6000803e3d6000fd5b50506032546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef9150604401610530565b600080546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b038116811461082657600080fd5b600080600060608486031215610b6357600080fd5b8335610b6e81610b39565b92506020840135610b7e81610b39565b929592945050506040919091013590565b60008083601f840112610ba157600080fd5b50813567ffffffffffffffff811115610bb957600080fd5b6020830191508360208260051b8501011115610bd457600080fd5b9250929050565b60008060008060408587031215610bf157600080fd5b843567ffffffffffffffff80821115610c0957600080fd5b610c1588838901610b8f565b90965094506020870135915080821115610c2e57600080fd5b50610c3b87828801610b8f565b95989497509550505050565b60008060408385031215610c5a57600080fd5b8235610c6581610b39565b946020939093013593505050565b60008083601f840112610c8557600080fd5b50813567ffffffffffffffff811115610c9d57600080fd5b602083019150836020828501011115610bd457600080fd5b600080600080600060808688031215610ccd57600080fd5b8535610cd881610b39565b9450602086013593506040860135610cef81610b39565b9250606086013567ffffffffffffffff811115610d0b57600080fd5b610d1788828901610c73565b969995985093965092949392505050565b600060208284031215610d3a57600080fd5b5035919050565b600060208284031215610d5357600080fd5b8135610d5e81610b39565b9392505050565b600080600080600060808688031215610d7d57600080fd5b8535610d8881610b39565b94506020860135610d9881610b39565b935060408601359250606086013567ffffffffffffffff811115610d0b57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600019821415610df357634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610e0c57600080fd5b5051919050565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f8501168301019050969550505050505056fea2646970667358221220ad1a8a2443526a3d896fd71d0a84753f3b464f49a3759597071b64bf74b8406964736f6c63430008090033",
|
|
179
275
|
"linkReferences": {},
|
|
180
276
|
"deployedLinkReferences": {}
|
|
181
277
|
}
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
pragma solidity ^0.8.9;
|
|
17
17
|
|
|
18
|
+
import "@keep-network/random-beacon/contracts/Governable.sol";
|
|
19
|
+
|
|
18
20
|
import "./IVault.sol";
|
|
19
21
|
import "../bank/Bank.sol";
|
|
20
22
|
import "../token/TBTC.sol";
|
|
@@ -27,7 +29,7 @@ import "../token/TBTC.sol";
|
|
|
27
29
|
/// Bank.
|
|
28
30
|
/// @dev TBTC Vault is the owner of TBTC token contract and is the only contract
|
|
29
31
|
/// minting the token.
|
|
30
|
-
contract TBTCVault is IVault {
|
|
32
|
+
contract TBTCVault is IVault, Governable {
|
|
31
33
|
Bank public bank;
|
|
32
34
|
TBTC public tbtcToken;
|
|
33
35
|
|
|
@@ -53,6 +55,36 @@ contract TBTCVault is IVault {
|
|
|
53
55
|
|
|
54
56
|
bank = _bank;
|
|
55
57
|
tbtcToken = _tbtcToken;
|
|
58
|
+
|
|
59
|
+
_transferGovernance(msg.sender);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/// @notice Allows the governance of the TBTCVault to recover any ERC20
|
|
63
|
+
/// token sent mistakenly to the TBTC token contract address.
|
|
64
|
+
/// @param token Address of the recovered ERC20 token contract
|
|
65
|
+
/// @param recipient Address the recovered token should be sent to
|
|
66
|
+
/// @param amount Recovered amount
|
|
67
|
+
function recoverERC20(
|
|
68
|
+
IERC20 token,
|
|
69
|
+
address recipient,
|
|
70
|
+
uint256 amount
|
|
71
|
+
) external onlyGovernance {
|
|
72
|
+
tbtcToken.recoverERC20(token, recipient, amount);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/// @notice Allows the governance of the TBTCVault to recover any ERC721
|
|
76
|
+
/// token sent mistakenly to the TBTC token contract address.
|
|
77
|
+
/// @param token Address of the recovered ERC721 token contract
|
|
78
|
+
/// @param recipient Address the recovered token should be sent to
|
|
79
|
+
/// @param tokenId Identifier of the recovered token
|
|
80
|
+
/// @param data Additional data
|
|
81
|
+
function recoverERC721(
|
|
82
|
+
IERC721 token,
|
|
83
|
+
address recipient,
|
|
84
|
+
uint256 tokenId,
|
|
85
|
+
bytes calldata data
|
|
86
|
+
) external onlyGovernance {
|
|
87
|
+
tbtcToken.recoverERC721(token, recipient, tokenId, data);
|
|
56
88
|
}
|
|
57
89
|
|
|
58
90
|
/// @notice Transfers the given `amount` of the Bank balance from caller
|