@keep-network/tbtc-v2 0.1.1-dev.83 → 0.1.1-dev.86
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 +11 -11
- package/artifacts/Bridge.json +11 -11
- package/artifacts/Deposit.json +7 -7
- package/artifacts/DepositSweep.json +7 -7
- package/artifacts/EcdsaDkgValidator.json +1 -1
- package/artifacts/EcdsaInactivity.json +1 -1
- package/artifacts/EcdsaSortitionPool.json +2 -2
- package/artifacts/Fraud.json +7 -7
- 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 +9 -9
- package/artifacts/NuCypherStakingEscrow.json +1 -1
- package/artifacts/NuCypherToken.json +2 -2
- package/artifacts/RandomBeaconStub.json +1 -1
- package/artifacts/Redemption.json +7 -7
- package/artifacts/ReimbursementPool.json +2 -2
- package/artifacts/Relay.json +7 -7
- package/artifacts/T.json +2 -2
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/TBTCVault.json +173 -17
- 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 +5 -5
- package/artifacts/WalletRegistryGovernance.json +2 -2
- package/artifacts/Wallets.json +7 -7
- package/artifacts/solcInputs/{21fcfd91cc383ddf1b3799814408151d.json → 6371edede0c121e15ead18cf51551442.json} +9 -9
- package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.dbg.json +1 -1
- package/build/contracts/bank/Bank.sol/Bank.json +2 -2
- package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +1 -1
- package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +2 -2
- package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +1 -1
- package/build/contracts/bridge/Bridge.sol/Bridge.json +2 -2
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.json +2 -2
- 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/DepositSweep.sol/DepositSweep.dbg.json +1 -1
- package/build/contracts/bridge/DepositSweep.sol/DepositSweep.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/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/MovingFunds.sol/MovingFunds.json +2 -2
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/OutboundTx.json +2 -2
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +1 -1
- package/build/contracts/bridge/Redemption.sol/Redemption.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 -2
- 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/DonationVault.sol/DonationVault.json +2 -2
- 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 +112 -3
- package/contracts/bank/Bank.sol +1 -1
- package/contracts/bank/IReceiveBalanceApproval.sol +2 -2
- package/contracts/vault/TBTCVault.sol +105 -10
- package/deploy/11_initialize_wallet_owner.ts +18 -0
- package/export.json +110 -1
- package/package.json +1 -1
|
@@ -76,6 +76,51 @@
|
|
|
76
76
|
"name": "Unminted",
|
|
77
77
|
"type": "event"
|
|
78
78
|
},
|
|
79
|
+
{
|
|
80
|
+
"anonymous": false,
|
|
81
|
+
"inputs": [
|
|
82
|
+
{
|
|
83
|
+
"indexed": false,
|
|
84
|
+
"internalType": "address",
|
|
85
|
+
"name": "newVault",
|
|
86
|
+
"type": "address"
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
"name": "UpgradeFinalized",
|
|
90
|
+
"type": "event"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"anonymous": false,
|
|
94
|
+
"inputs": [
|
|
95
|
+
{
|
|
96
|
+
"indexed": false,
|
|
97
|
+
"internalType": "address",
|
|
98
|
+
"name": "newVault",
|
|
99
|
+
"type": "address"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"indexed": false,
|
|
103
|
+
"internalType": "uint256",
|
|
104
|
+
"name": "timestamp",
|
|
105
|
+
"type": "uint256"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"name": "UpgradeInitiated",
|
|
109
|
+
"type": "event"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"inputs": [],
|
|
113
|
+
"name": "UPGRADE_GOVERNANCE_DELAY",
|
|
114
|
+
"outputs": [
|
|
115
|
+
{
|
|
116
|
+
"internalType": "uint256",
|
|
117
|
+
"name": "",
|
|
118
|
+
"type": "uint256"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"stateMutability": "view",
|
|
122
|
+
"type": "function"
|
|
123
|
+
},
|
|
79
124
|
{
|
|
80
125
|
"inputs": [],
|
|
81
126
|
"name": "bank",
|
|
@@ -89,6 +134,13 @@
|
|
|
89
134
|
"stateMutability": "view",
|
|
90
135
|
"type": "function"
|
|
91
136
|
},
|
|
137
|
+
{
|
|
138
|
+
"inputs": [],
|
|
139
|
+
"name": "finalizeUpgrade",
|
|
140
|
+
"outputs": [],
|
|
141
|
+
"stateMutability": "nonpayable",
|
|
142
|
+
"type": "function"
|
|
143
|
+
},
|
|
92
144
|
{
|
|
93
145
|
"inputs": [],
|
|
94
146
|
"name": "governance",
|
|
@@ -102,6 +154,19 @@
|
|
|
102
154
|
"stateMutability": "view",
|
|
103
155
|
"type": "function"
|
|
104
156
|
},
|
|
157
|
+
{
|
|
158
|
+
"inputs": [
|
|
159
|
+
{
|
|
160
|
+
"internalType": "address",
|
|
161
|
+
"name": "_newVault",
|
|
162
|
+
"type": "address"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"name": "initiateUpgrade",
|
|
166
|
+
"outputs": [],
|
|
167
|
+
"stateMutability": "nonpayable",
|
|
168
|
+
"type": "function"
|
|
169
|
+
},
|
|
105
170
|
{
|
|
106
171
|
"inputs": [
|
|
107
172
|
{
|
|
@@ -115,6 +180,19 @@
|
|
|
115
180
|
"stateMutability": "nonpayable",
|
|
116
181
|
"type": "function"
|
|
117
182
|
},
|
|
183
|
+
{
|
|
184
|
+
"inputs": [],
|
|
185
|
+
"name": "newVault",
|
|
186
|
+
"outputs": [
|
|
187
|
+
{
|
|
188
|
+
"internalType": "address",
|
|
189
|
+
"name": "",
|
|
190
|
+
"type": "address"
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
"stateMutability": "view",
|
|
194
|
+
"type": "function"
|
|
195
|
+
},
|
|
118
196
|
{
|
|
119
197
|
"inputs": [
|
|
120
198
|
{
|
|
@@ -134,7 +212,7 @@
|
|
|
134
212
|
},
|
|
135
213
|
{
|
|
136
214
|
"internalType": "bytes",
|
|
137
|
-
"name": "",
|
|
215
|
+
"name": "extraData",
|
|
138
216
|
"type": "bytes"
|
|
139
217
|
}
|
|
140
218
|
],
|
|
@@ -273,10 +351,41 @@
|
|
|
273
351
|
"outputs": [],
|
|
274
352
|
"stateMutability": "nonpayable",
|
|
275
353
|
"type": "function"
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"inputs": [
|
|
357
|
+
{
|
|
358
|
+
"internalType": "uint256",
|
|
359
|
+
"name": "amount",
|
|
360
|
+
"type": "uint256"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"internalType": "bytes",
|
|
364
|
+
"name": "redemptionData",
|
|
365
|
+
"type": "bytes"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"name": "unmintAndRedeem",
|
|
369
|
+
"outputs": [],
|
|
370
|
+
"stateMutability": "nonpayable",
|
|
371
|
+
"type": "function"
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"inputs": [],
|
|
375
|
+
"name": "upgradeInitiatedTimestamp",
|
|
376
|
+
"outputs": [
|
|
377
|
+
{
|
|
378
|
+
"internalType": "uint256",
|
|
379
|
+
"name": "",
|
|
380
|
+
"type": "uint256"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"stateMutability": "view",
|
|
384
|
+
"type": "function"
|
|
276
385
|
}
|
|
277
386
|
],
|
|
278
|
-
"bytecode": "0x608060405234801561001057600080fd5b5060405161114638038061114683398101604081905261002f916101a8565b6001600160a01b03821661008a5760405162461bcd60e51b815260206004820181905260248201527f42616e6b2063616e206e6f7420626520746865207a65726f206164647265737360448201526064015b60405180910390fd5b6001600160a01b0381166100ef5760405162461bcd60e51b815260206004820152602660248201527f5442544320746f6b656e2063616e206e6f7420626520746865207a65726f206160448201526564647265737360d01b6064820152608401610081565b603280546001600160a01b038085166001600160a01b03199283161790925560338054928416929091169190911790556101283361012f565b50506101e2565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b03811681146101a557600080fd5b50565b600080604083850312156101bb57600080fd5b82516101c681610190565b60208401519092506101d781610190565b809150509250929050565b610f55806101f16000396000f3fe608060405234801561001057600080fd5b50600436106100c95760003560e01c806376cdb03b11610081578063d38bfff41161005b578063d38bfff414610184578063e5d3d71414610197578063fc4e51f6146101aa57600080fd5b806376cdb03b1461014b5780638f4ffcb11461015e578063a0712d681461017157600080fd5b8063475d0570116100b2578063475d0570146100f65780635aa6e6751461010957806364e779b11461013857600080fd5b80631171bda9146100ce578063461c6373146100e3575b600080fd5b6100e16100dc366004610b4f565b6101bd565b005b6100e16100f1366004610bdc565b6102a9565b6100e1610104366004610c5e565b6103bc565b60005461011c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100e1610146366004610d2b565b610535565b60325461011c906001600160a01b031681565b6100e161016c366004610d86565b610542565b6100e161017f366004610d2b565b610601565b6100e1610192366004610df9565b610755565b60335461011c906001600160a01b031681565b6100e16101b8366004610e1d565b610834565b6000546001600160a01b0316331461021c5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064015b60405180910390fd5b6033546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda9906064015b600060405180830381600087803b15801561028c57600080fd5b505af11580156102a0573d6000803e3d6000fd5b50505050505050565b6032546001600160a01b031633146103035760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b826103505760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f7273207370656369666965640000000000000000006044820152606401610213565b60005b838110156103b5576103a385858381811061037057610370610e73565b90506020020160208101906103859190610df9565b84848481811061039757610397610e73565b90506020020135610918565b806103ad81610e89565b915050610353565b5050505050565b6032546001600160a01b031633146104165760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b6032546040516370a0823160e01b81526001600160a01b038581166004830152849216906370a082319060240160206040518083038186803b15801561045b57600080fd5b505afa15801561046f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104939190610eb2565b10156104ec5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6104f68383610918565b603254604051631f1b6d2760e21b81526001600160a01b0385811660048301523060248301526044820185905290911690637c6db49c90606401610272565b61053f33826109ad565b50565b6033546001600160a01b0384811691161461059f5760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f7420544254430000000000000000000000000000006044820152606401610213565b336001600160a01b038416146105f75760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f77656400000000000000006044820152606401610213565b6103b585856109ad565b6032546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561064957600080fd5b505afa15801561065d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106819190610eb2565b10156106da5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6106e48183610918565b603254604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c906064015b600060405180830381600087803b15801561073957600080fd5b505af115801561074d573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146107af5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6001600160a01b03811661082b5760405162461bcd60e51b815260206004820152602260248201527f4e657720676f7665726e616e636520697320746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610213565b61053f81610ac1565b6000546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6033546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f6906108df9088908890889088908890600401610ecb565b600060405180830381600087803b1580156108f957600080fd5b505af115801561090d573d6000803e3d6000fd5b505050505050505050565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe8260405161095391815260200190565b60405180910390a26033546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f199060440161071f565b816001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b8826040516109e891815260200190565b60405180910390a26033546040517f79cc67900000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b158015610a5757600080fd5b505af1158015610a6b573d6000803e3d6000fd5b50506032546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef915060440161071f565b600080546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b038116811461053f57600080fd5b600080600060608486031215610b6457600080fd5b8335610b6f81610b3a565b92506020840135610b7f81610b3a565b929592945050506040919091013590565b60008083601f840112610ba257600080fd5b50813567ffffffffffffffff811115610bba57600080fd5b6020830191508360208260051b8501011115610bd557600080fd5b9250929050565b60008060008060408587031215610bf257600080fd5b843567ffffffffffffffff80821115610c0a57600080fd5b610c1688838901610b90565b90965094506020870135915080821115610c2f57600080fd5b50610c3c87828801610b90565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610c7357600080fd5b8335610c7e81610b3a565b925060208401359150604084013567ffffffffffffffff80821115610ca257600080fd5b818601915086601f830112610cb657600080fd5b813581811115610cc857610cc8610c48565b604051601f8201601f19908116603f01168101908382118183101715610cf057610cf0610c48565b81604052828152896020848701011115610d0957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215610d3d57600080fd5b5035919050565b60008083601f840112610d5657600080fd5b50813567ffffffffffffffff811115610d6e57600080fd5b602083019150836020828501011115610bd557600080fd5b600080600080600060808688031215610d9e57600080fd5b8535610da981610b3a565b9450602086013593506040860135610dc081610b3a565b9250606086013567ffffffffffffffff811115610ddc57600080fd5b610de888828901610d44565b969995985093965092949392505050565b600060208284031215610e0b57600080fd5b8135610e1681610b3a565b9392505050565b600080600080600060808688031215610e3557600080fd5b8535610e4081610b3a565b94506020860135610e5081610b3a565b935060408601359250606086013567ffffffffffffffff811115610ddc57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600019821415610eab57634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610ec457600080fd5b5051919050565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f8501168301019050969550505050505056fea26469706673582212209e4975796006d1db5a7262daa7434fa2dbff97aad3fb5e7c0afab1d02413c3fa64736f6c63430008090033",
|
|
279
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100c95760003560e01c806376cdb03b11610081578063d38bfff41161005b578063d38bfff414610184578063e5d3d71414610197578063fc4e51f6146101aa57600080fd5b806376cdb03b1461014b5780638f4ffcb11461015e578063a0712d681461017157600080fd5b8063475d0570116100b2578063475d0570146100f65780635aa6e6751461010957806364e779b11461013857600080fd5b80631171bda9146100ce578063461c6373146100e3575b600080fd5b6100e16100dc366004610b4f565b6101bd565b005b6100e16100f1366004610bdc565b6102a9565b6100e1610104366004610c5e565b6103bc565b60005461011c906001600160a01b031681565b6040516001600160a01b03909116815260200160405180910390f35b6100e1610146366004610d2b565b610535565b60325461011c906001600160a01b031681565b6100e161016c366004610d86565b610542565b6100e161017f366004610d2b565b610601565b6100e1610192366004610df9565b610755565b60335461011c906001600160a01b031681565b6100e16101b8366004610e1d565b610834565b6000546001600160a01b0316331461021c5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064015b60405180910390fd5b6033546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda9906064015b600060405180830381600087803b15801561028c57600080fd5b505af11580156102a0573d6000803e3d6000fd5b50505050505050565b6032546001600160a01b031633146103035760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b826103505760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f7273207370656369666965640000000000000000006044820152606401610213565b60005b838110156103b5576103a385858381811061037057610370610e73565b90506020020160208101906103859190610df9565b84848481811061039757610397610e73565b90506020020135610918565b806103ad81610e89565b915050610353565b5050505050565b6032546001600160a01b031633146104165760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b000000000000000000006044820152606401610213565b6032546040516370a0823160e01b81526001600160a01b038581166004830152849216906370a082319060240160206040518083038186803b15801561045b57600080fd5b505afa15801561046f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104939190610eb2565b10156104ec5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6104f68383610918565b603254604051631f1b6d2760e21b81526001600160a01b0385811660048301523060248301526044820185905290911690637c6db49c90606401610272565b61053f33826109ad565b50565b6033546001600160a01b0384811691161461059f5760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f7420544254430000000000000000000000000000006044820152606401610213565b336001600160a01b038416146105f75760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f77656400000000000000006044820152606401610213565b6103b585856109ad565b6032546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b15801561064957600080fd5b505afa15801561065d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106819190610eb2565b10156106da5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b6064820152608401610213565b6106e48183610918565b603254604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c906064015b600060405180830381600087803b15801561073957600080fd5b505af115801561074d573d6000803e3d6000fd5b505050505050565b6000546001600160a01b031633146107af5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6001600160a01b03811661082b5760405162461bcd60e51b815260206004820152602260248201527f4e657720676f7665726e616e636520697320746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610213565b61053f81610ac1565b6000546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e6365000000006044820152606401610213565b6033546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f6906108df9088908890889088908890600401610ecb565b600060405180830381600087803b1580156108f957600080fd5b505af115801561090d573d6000803e3d6000fd5b505050505050505050565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe8260405161095391815260200190565b60405180910390a26033546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f199060440161071f565b816001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b8826040516109e891815260200190565b60405180910390a26033546040517f79cc67900000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b158015610a5757600080fd5b505af1158015610a6b573d6000803e3d6000fd5b50506032546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef915060440161071f565b600080546001600160a01b038381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b038116811461053f57600080fd5b600080600060608486031215610b6457600080fd5b8335610b6f81610b3a565b92506020840135610b7f81610b3a565b929592945050506040919091013590565b60008083601f840112610ba257600080fd5b50813567ffffffffffffffff811115610bba57600080fd5b6020830191508360208260051b8501011115610bd557600080fd5b9250929050565b60008060008060408587031215610bf257600080fd5b843567ffffffffffffffff80821115610c0a57600080fd5b610c1688838901610b90565b90965094506020870135915080821115610c2f57600080fd5b50610c3c87828801610b90565b95989497509550505050565b634e487b7160e01b600052604160045260246000fd5b600080600060608486031215610c7357600080fd5b8335610c7e81610b3a565b925060208401359150604084013567ffffffffffffffff80821115610ca257600080fd5b818601915086601f830112610cb657600080fd5b813581811115610cc857610cc8610c48565b604051601f8201601f19908116603f01168101908382118183101715610cf057610cf0610c48565b81604052828152896020848701011115610d0957600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215610d3d57600080fd5b5035919050565b60008083601f840112610d5657600080fd5b50813567ffffffffffffffff811115610d6e57600080fd5b602083019150836020828501011115610bd557600080fd5b600080600080600060808688031215610d9e57600080fd5b8535610da981610b3a565b9450602086013593506040860135610dc081610b3a565b9250606086013567ffffffffffffffff811115610ddc57600080fd5b610de888828901610d44565b969995985093965092949392505050565b600060208284031215610e0b57600080fd5b8135610e1681610b3a565b9392505050565b600080600080600060808688031215610e3557600080fd5b8535610e4081610b3a565b94506020860135610e5081610b3a565b935060408601359250606086013567ffffffffffffffff811115610ddc57600080fd5b634e487b7160e01b600052603260045260246000fd5b6000600019821415610eab57634e487b7160e01b600052601160045260246000fd5b5060010190565b600060208284031215610ec457600080fd5b5051919050565b60006001600160a01b03808816835280871660208401525084604083015260806060830152826080830152828460a0840137600060a0848401015260a0601f19601f8501168301019050969550505050505056fea26469706673582212209e4975796006d1db5a7262daa7434fa2dbff97aad3fb5e7c0afab1d02413c3fa64736f6c63430008090033",
|
|
387
|
+
"bytecode": "0x60806040523480156200001157600080fd5b50604051620016ff380380620016ff8339810160408190526200003491620001b4565b6001600160a01b038216620000905760405162461bcd60e51b815260206004820181905260248201527f42616e6b2063616e206e6f7420626520746865207a65726f206164647265737360448201526064015b60405180910390fd5b6001600160a01b038116620000f75760405162461bcd60e51b815260206004820152602660248201527f5442544320746f6b656e2063616e206e6f7420626520746865207a65726f206160448201526564647265737360d01b606482015260840162000087565b603280546001600160a01b038085166001600160a01b031992831617909255603380549284169290911691909117905562000132336200013a565b5050620001f3565b600080546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b0381168114620001b157600080fd5b50565b60008060408385031215620001c857600080fd5b8251620001d5816200019b565b6020840151909250620001e8816200019b565b809150509250929050565b6114fc80620002036000396000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c806388aaf0c8116100b2578063a0712d6811610081578063d38bfff411610066578063d38bfff414610239578063e5d3d7141461024c578063fc4e51f61461025f57600080fd5b8063a0712d681461021c578063cfce08161461022f57600080fd5b806388aaf0c8146101d75780638f4ffcb1146101ea57806395131526146101fd5780639a508c8e1461021457600080fd5b806353dce4df116100ee57806353dce4df1461016e5780635aa6e6751461018157806364e779b1146101b157806376cdb03b146101c457600080fd5b80631171bda914610120578063461c637314610135578063475d057014610148578063479aa9271461015b575b600080fd5b61013361012e3660046110bb565b610272565b005b610133610143366004611148565b61035d565b6101336101563660046111f6565b610470565b610133610169366004611246565b61061d565b61013361017c36600461126a565b610741565b600054610194906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101336101bf3660046112b6565b610752565b603254610194906001600160a01b031681565b603454610194906001600160a01b031681565b6101336101f83660046112cf565b61075f565b61020660355481565b6040519081526020016101a8565b610133610834565b61013361022a3660046112b6565b61097b565b6102066201518081565b610133610247366004611246565b610acf565b603354610194906001600160a01b031681565b61013361026d366004611342565b610bae565b6000546001600160a01b031633146102d15760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064015b60405180910390fd5b6033546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda990606401600060405180830381600087803b15801561034057600080fd5b505af1158015610354573d6000803e3d6000fd5b50505050505050565b6032546001600160a01b031633146103b75760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b0000000000000000000060448201526064016102c8565b826104045760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f72732073706563696669656400000000000000000060448201526064016102c8565b60005b838110156104695761045785858381811061042457610424611398565b90506020020160208101906104399190611246565b84848481811061044b5761044b611398565b90506020020135610c92565b80610461816113c4565b915050610407565b5050505050565b6032546001600160a01b031633146104ca5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b0000000000000000000060448201526064016102c8565b6032546040516370a0823160e01b81526001600160a01b038681166004830152859216906370a082319060240160206040518083038186803b15801561050f57600080fd5b505afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054791906113df565b10156105a05760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b60648201526084016102c8565b6105aa8484610c92565b603254604051631f1b6d2760e21b81526001600160a01b0386811660048301523060248301526044820186905290911690637c6db49c906064015b600060405180830381600087803b1580156105ff57600080fd5b505af1158015610613573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146106775760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b6001600160a01b0381166106cd5760405162461bcd60e51b815260206004820181905260248201527f4e6577207661756c7420616464726573732063616e6e6f74206265207a65726f60448201526064016102c8565b604080516001600160a01b03831681524260208201527f5cc842cab066489e13292128663547c68705dbf476f0131e0107f155719c6124910160405180910390a1426035556034805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b61074d33848484610d27565b505050565b61075c3382610e90565b50565b6033546001600160a01b038481169116146107bc5760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f74205442544300000000000000000000000000000060448201526064016102c8565b336001600160a01b038416146108145760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f776564000000000000000060448201526064016102c8565b80610828576108238585610e90565b610469565b61046985858484610d27565b6000546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b61089d60355462015180610f8b565b6034546040516001600160a01b0390911681527f81a9bb8030ed4116b405800280e065110a37afb57b69948e714c97fab23475ec9060200160405180910390a16033546034546040517ff2fde38b0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291169063f2fde38b90602401600060405180830381600087803b15801561093f57600080fd5b505af1158015610953573d6000803e3d6000fd5b50506034805473ffffffffffffffffffffffffffffffffffffffff1916905550506000603555565b6032546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b1580156109c357600080fd5b505afa1580156109d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fb91906113df565b1015610a545760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b60648201526084016102c8565b610a5e8183610c92565b603254604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c906064015b600060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610b295760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b6001600160a01b038116610ba55760405162461bcd60e51b815260206004820152602260248201527f4e657720676f7665726e616e636520697320746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016102c8565b61075c81611038565b6000546001600160a01b03163314610c085760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b6033546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f690610c599088908890889088908890600401611421565b600060405180830381600087803b158015610c7357600080fd5b505af1158015610c87573d6000803e3d6000fd5b505050505050505050565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe82604051610ccd91815260200190565b60405180910390a26033546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f1990604401610a99565b836001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b884604051610d6291815260200190565b60405180910390a260335460405163079cc67960e41b81526001600160a01b03868116600483015260248201869052909116906379cc679090604401600060405180830381600087803b158015610db857600080fd5b505af1158015610dcc573d6000803e3d6000fd5b5050603254604080517fe78cea9200000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169350634a38757e9250839163e78cea9291600480820192602092909190829003018186803b158015610e3657600080fd5b505afa158015610e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6e919061145f565b8585856040518563ffffffff1660e01b81526004016105e5949392919061147c565b816001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b882604051610ecb91815260200190565b60405180910390a260335460405163079cc67960e41b81526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b158015610f2157600080fd5b505af1158015610f35573d6000803e3d6000fd5b50506032546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef9150604401610a99565b60008211610fdb5760405162461bcd60e51b815260206004820152601460248201527f4368616e6765206e6f7420696e6974696174656400000000000000000000000060448201526064016102c8565b80610fe683426114af565b10156110345760405162461bcd60e51b815260206004820181905260248201527f476f7665726e616e63652064656c617920686173206e6f7420656c617073656460448201526064016102c8565b5050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff1983168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b038116811461075c57600080fd5b6000806000606084860312156110d057600080fd5b83356110db816110a6565b925060208401356110eb816110a6565b929592945050506040919091013590565b60008083601f84011261110e57600080fd5b50813567ffffffffffffffff81111561112657600080fd5b6020830191508360208260051b850101111561114157600080fd5b9250929050565b6000806000806040858703121561115e57600080fd5b843567ffffffffffffffff8082111561117657600080fd5b611182888389016110fc565b9096509450602087013591508082111561119b57600080fd5b506111a8878288016110fc565b95989497509550505050565b60008083601f8401126111c657600080fd5b50813567ffffffffffffffff8111156111de57600080fd5b60208301915083602082850101111561114157600080fd5b6000806000806060858703121561120c57600080fd5b8435611217816110a6565b935060208501359250604085013567ffffffffffffffff81111561123a57600080fd5b6111a8878288016111b4565b60006020828403121561125857600080fd5b8135611263816110a6565b9392505050565b60008060006040848603121561127f57600080fd5b83359250602084013567ffffffffffffffff81111561129d57600080fd5b6112a9868287016111b4565b9497909650939450505050565b6000602082840312156112c857600080fd5b5035919050565b6000806000806000608086880312156112e757600080fd5b85356112f2816110a6565b9450602086013593506040860135611309816110a6565b9250606086013567ffffffffffffffff81111561132557600080fd5b611331888289016111b4565b969995985093965092949392505050565b60008060008060006080868803121561135a57600080fd5b8535611365816110a6565b94506020860135611375816110a6565b935060408601359250606086013567ffffffffffffffff81111561132557600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156113d8576113d86113ae565b5060010190565b6000602082840312156113f157600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160a01b038088168352808716602084015250846040830152608060608301526114546080830184866113f8565b979650505050505050565b60006020828403121561147157600080fd5b8151611263816110a6565b6001600160a01b03851681528360208201526060604082015260006114a56060830184866113f8565b9695505050505050565b6000828210156114c1576114c16113ae565b50039056fea26469706673582212200f8bfa37abf07fe0f0b7d0c4323b017b9f180f7d5bce06dac02be2e3b3db907264736f6c63430008090033",
|
|
388
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061011b5760003560e01c806388aaf0c8116100b2578063a0712d6811610081578063d38bfff411610066578063d38bfff414610239578063e5d3d7141461024c578063fc4e51f61461025f57600080fd5b8063a0712d681461021c578063cfce08161461022f57600080fd5b806388aaf0c8146101d75780638f4ffcb1146101ea57806395131526146101fd5780639a508c8e1461021457600080fd5b806353dce4df116100ee57806353dce4df1461016e5780635aa6e6751461018157806364e779b1146101b157806376cdb03b146101c457600080fd5b80631171bda914610120578063461c637314610135578063475d057014610148578063479aa9271461015b575b600080fd5b61013361012e3660046110bb565b610272565b005b610133610143366004611148565b61035d565b6101336101563660046111f6565b610470565b610133610169366004611246565b61061d565b61013361017c36600461126a565b610741565b600054610194906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101336101bf3660046112b6565b610752565b603254610194906001600160a01b031681565b603454610194906001600160a01b031681565b6101336101f83660046112cf565b61075f565b61020660355481565b6040519081526020016101a8565b610133610834565b61013361022a3660046112b6565b61097b565b6102066201518081565b610133610247366004611246565b610acf565b603354610194906001600160a01b031681565b61013361026d366004611342565b610bae565b6000546001600160a01b031633146102d15760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064015b60405180910390fd5b6033546040517f1171bda90000000000000000000000000000000000000000000000000000000081526001600160a01b03858116600483015284811660248301526044820184905290911690631171bda990606401600060405180830381600087803b15801561034057600080fd5b505af1158015610354573d6000803e3d6000fd5b50505050505050565b6032546001600160a01b031633146103b75760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b0000000000000000000060448201526064016102c8565b826104045760405162461bcd60e51b815260206004820152601760248201527f4e6f206465706f7369746f72732073706563696669656400000000000000000060448201526064016102c8565b60005b838110156104695761045785858381811061042457610424611398565b90506020020160208101906104399190611246565b84848481811061044b5761044b611398565b90506020020135610c92565b80610461816113c4565b915050610407565b5050505050565b6032546001600160a01b031633146104ca5760405162461bcd60e51b815260206004820152601660248201527f43616c6c6572206973206e6f74207468652042616e6b0000000000000000000060448201526064016102c8565b6032546040516370a0823160e01b81526001600160a01b038681166004830152859216906370a082319060240160206040518083038186803b15801561050f57600080fd5b505afa158015610523573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054791906113df565b10156105a05760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b60648201526084016102c8565b6105aa8484610c92565b603254604051631f1b6d2760e21b81526001600160a01b0386811660048301523060248301526044820186905290911690637c6db49c906064015b600060405180830381600087803b1580156105ff57600080fd5b505af1158015610613573d6000803e3d6000fd5b5050505050505050565b6000546001600160a01b031633146106775760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b6001600160a01b0381166106cd5760405162461bcd60e51b815260206004820181905260248201527f4e6577207661756c7420616464726573732063616e6e6f74206265207a65726f60448201526064016102c8565b604080516001600160a01b03831681524260208201527f5cc842cab066489e13292128663547c68705dbf476f0131e0107f155719c6124910160405180910390a1426035556034805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b61074d33848484610d27565b505050565b61075c3382610e90565b50565b6033546001600160a01b038481169116146107bc5760405162461bcd60e51b815260206004820152601160248201527f546f6b656e206973206e6f74205442544300000000000000000000000000000060448201526064016102c8565b336001600160a01b038416146108145760405162461bcd60e51b815260206004820152601860248201527f4f6e6c7920544254432063616c6c657220616c6c6f776564000000000000000060448201526064016102c8565b80610828576108238585610e90565b610469565b61046985858484610d27565b6000546001600160a01b0316331461088e5760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b61089d60355462015180610f8b565b6034546040516001600160a01b0390911681527f81a9bb8030ed4116b405800280e065110a37afb57b69948e714c97fab23475ec9060200160405180910390a16033546034546040517ff2fde38b0000000000000000000000000000000000000000000000000000000081526001600160a01b03918216600482015291169063f2fde38b90602401600060405180830381600087803b15801561093f57600080fd5b505af1158015610953573d6000803e3d6000fd5b50506034805473ffffffffffffffffffffffffffffffffffffffff1916905550506000603555565b6032546040516370a0823160e01b815233600482018190529183916001600160a01b03909116906370a082319060240160206040518083038186803b1580156109c357600080fd5b505afa1580156109d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fb91906113df565b1015610a545760405162461bcd60e51b815260206004820152602260248201527f416d6f756e7420657863656564732062616c616e636520696e207468652062616044820152616e6b60f01b60648201526084016102c8565b610a5e8183610c92565b603254604051631f1b6d2760e21b81526001600160a01b0383811660048301523060248301526044820185905290911690637c6db49c906064015b600060405180830381600087803b158015610ab357600080fd5b505af1158015610ac7573d6000803e3d6000fd5b505050505050565b6000546001600160a01b03163314610b295760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b6001600160a01b038116610ba55760405162461bcd60e51b815260206004820152602260248201527f4e657720676f7665726e616e636520697320746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016102c8565b61075c81611038565b6000546001600160a01b03163314610c085760405162461bcd60e51b815260206004820152601c60248201527f43616c6c6572206973206e6f742074686520676f7665726e616e63650000000060448201526064016102c8565b6033546040517ffc4e51f60000000000000000000000000000000000000000000000000000000081526001600160a01b039091169063fc4e51f690610c599088908890889088908890600401611421565b600060405180830381600087803b158015610c7357600080fd5b505af1158015610c87573d6000803e3d6000fd5b505050505050505050565b816001600160a01b03167f30385c845b448a36257a6a1716e6ad2e1bc2cbe333cde1e69fe849ad6511adfe82604051610ccd91815260200190565b60405180910390a26033546040517f40c10f190000000000000000000000000000000000000000000000000000000081526001600160a01b03848116600483015260248201849052909116906340c10f1990604401610a99565b836001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b884604051610d6291815260200190565b60405180910390a260335460405163079cc67960e41b81526001600160a01b03868116600483015260248201869052909116906379cc679090604401600060405180830381600087803b158015610db857600080fd5b505af1158015610dcc573d6000803e3d6000fd5b5050603254604080517fe78cea9200000000000000000000000000000000000000000000000000000000815290516001600160a01b039092169350634a38757e9250839163e78cea9291600480820192602092909190829003018186803b158015610e3657600080fd5b505afa158015610e4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6e919061145f565b8585856040518563ffffffff1660e01b81526004016105e5949392919061147c565b816001600160a01b03167f68751a4c3821398cb63d11609eca2440742ef19446f0c0261bfa8a13dd0748b882604051610ecb91815260200190565b60405180910390a260335460405163079cc67960e41b81526001600160a01b03848116600483015260248201849052909116906379cc679090604401600060405180830381600087803b158015610f2157600080fd5b505af1158015610f35573d6000803e3d6000fd5b50506032546040517f56a6d9ef0000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301526024820186905290911692506356a6d9ef9150604401610a99565b60008211610fdb5760405162461bcd60e51b815260206004820152601460248201527f4368616e6765206e6f7420696e6974696174656400000000000000000000000060448201526064016102c8565b80610fe683426114af565b10156110345760405162461bcd60e51b815260206004820181905260248201527f476f7665726e616e63652064656c617920686173206e6f7420656c617073656460448201526064016102c8565b5050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff1983168117909355604080519190921680825260208201939093527f5f56bee8cffbe9a78652a74a60705edede02af10b0bbb888ca44b79a0d42ce80910160405180910390a15050565b6001600160a01b038116811461075c57600080fd5b6000806000606084860312156110d057600080fd5b83356110db816110a6565b925060208401356110eb816110a6565b929592945050506040919091013590565b60008083601f84011261110e57600080fd5b50813567ffffffffffffffff81111561112657600080fd5b6020830191508360208260051b850101111561114157600080fd5b9250929050565b6000806000806040858703121561115e57600080fd5b843567ffffffffffffffff8082111561117657600080fd5b611182888389016110fc565b9096509450602087013591508082111561119b57600080fd5b506111a8878288016110fc565b95989497509550505050565b60008083601f8401126111c657600080fd5b50813567ffffffffffffffff8111156111de57600080fd5b60208301915083602082850101111561114157600080fd5b6000806000806060858703121561120c57600080fd5b8435611217816110a6565b935060208501359250604085013567ffffffffffffffff81111561123a57600080fd5b6111a8878288016111b4565b60006020828403121561125857600080fd5b8135611263816110a6565b9392505050565b60008060006040848603121561127f57600080fd5b83359250602084013567ffffffffffffffff81111561129d57600080fd5b6112a9868287016111b4565b9497909650939450505050565b6000602082840312156112c857600080fd5b5035919050565b6000806000806000608086880312156112e757600080fd5b85356112f2816110a6565b9450602086013593506040860135611309816110a6565b9250606086013567ffffffffffffffff81111561132557600080fd5b611331888289016111b4565b969995985093965092949392505050565b60008060008060006080868803121561135a57600080fd5b8535611365816110a6565b94506020860135611375816110a6565b935060408601359250606086013567ffffffffffffffff81111561132557600080fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156113d8576113d86113ae565b5060010190565b6000602082840312156113f157600080fd5b5051919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60006001600160a01b038088168352808716602084015250846040830152608060608301526114546080830184866113f8565b979650505050505050565b60006020828403121561147157600080fd5b8151611263816110a6565b6001600160a01b03851681528360208201526060604082015260006114a56060830184866113f8565b9695505050505050565b6000828210156114c1576114c16113ae565b50039056fea26469706673582212200f8bfa37abf07fe0f0b7d0c4323b017b9f180f7d5bce06dac02be2e3b3db907264736f6c63430008090033",
|
|
280
389
|
"linkReferences": {},
|
|
281
390
|
"deployedLinkReferences": {}
|
|
282
391
|
}
|
package/contracts/bank/Bank.sol
CHANGED
|
@@ -141,7 +141,7 @@ contract Bank is Ownable {
|
|
|
141
141
|
function approveBalanceAndCall(
|
|
142
142
|
address spender,
|
|
143
143
|
uint256 amount,
|
|
144
|
-
bytes
|
|
144
|
+
bytes calldata extraData
|
|
145
145
|
) external {
|
|
146
146
|
_approveBalance(msg.sender, spender, amount);
|
|
147
147
|
IReceiveBalanceApproval(spender).receiveBalanceApproval(
|
|
@@ -30,7 +30,7 @@ interface IReceiveBalanceApproval {
|
|
|
30
30
|
/// @param amount The amount of the Bank balance approved by the owner
|
|
31
31
|
/// to be used by the contract.
|
|
32
32
|
/// @param extraData The `extraData` passed to `Bank.approveBalanceAndCall`.
|
|
33
|
-
|
|
33
|
+
/// @dev The implementation must ensure this function can only be called
|
|
34
34
|
/// by the Bank. The Bank does _not_ guarantee that the `amount`
|
|
35
35
|
/// approved by the `owner` currently exists on their balance. That is,
|
|
36
36
|
/// the `owner` could approve more balance than they currently have.
|
|
@@ -40,6 +40,6 @@ interface IReceiveBalanceApproval {
|
|
|
40
40
|
function receiveBalanceApproval(
|
|
41
41
|
address owner,
|
|
42
42
|
uint256 amount,
|
|
43
|
-
bytes
|
|
43
|
+
bytes calldata extraData
|
|
44
44
|
) external;
|
|
45
45
|
}
|
|
@@ -20,6 +20,7 @@ import "@keep-network/random-beacon/contracts/Governable.sol";
|
|
|
20
20
|
import "./IVault.sol";
|
|
21
21
|
import "../bank/Bank.sol";
|
|
22
22
|
import "../token/TBTC.sol";
|
|
23
|
+
import "../GovernanceUtils.sol";
|
|
23
24
|
|
|
24
25
|
/// @title TBTC application vault
|
|
25
26
|
/// @notice TBTC is a fully Bitcoin-backed ERC-20 token pegged to the price of
|
|
@@ -30,18 +31,43 @@ import "../token/TBTC.sol";
|
|
|
30
31
|
/// @dev TBTC Vault is the owner of TBTC token contract and is the only contract
|
|
31
32
|
/// minting the token.
|
|
32
33
|
contract TBTCVault is IVault, Governable {
|
|
34
|
+
/// @notice The time delay that needs to pass between initializing and
|
|
35
|
+
/// finalizing upgrade to a new vault. The time delay forces the
|
|
36
|
+
/// upgrading party to reflect on the vault address it is upgrading
|
|
37
|
+
/// to and lets all TBTC holders notice the planned
|
|
38
|
+
/// upgrade.
|
|
39
|
+
uint256 public constant UPGRADE_GOVERNANCE_DELAY = 24 hours;
|
|
40
|
+
|
|
33
41
|
Bank public bank;
|
|
34
42
|
TBTC public tbtcToken;
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
/// @notice The address of a new TBTC vault. Set only when the upgrade
|
|
45
|
+
/// process is pending. Once the upgrade gets finalized, the new
|
|
46
|
+
/// TBTC vault will become an owner of TBTC token.
|
|
47
|
+
address public newVault;
|
|
48
|
+
/// @notice The timestamp at which an upgrade to a new TBTC vault was
|
|
49
|
+
/// initiated. Set only when the upgrade process is pending.
|
|
50
|
+
uint256 public upgradeInitiatedTimestamp;
|
|
37
51
|
|
|
52
|
+
event Minted(address indexed to, uint256 amount);
|
|
38
53
|
event Unminted(address indexed from, uint256 amount);
|
|
39
54
|
|
|
55
|
+
event UpgradeInitiated(address newVault, uint256 timestamp);
|
|
56
|
+
event UpgradeFinalized(address newVault);
|
|
57
|
+
|
|
40
58
|
modifier onlyBank() {
|
|
41
59
|
require(msg.sender == address(bank), "Caller is not the Bank");
|
|
42
60
|
_;
|
|
43
61
|
}
|
|
44
62
|
|
|
63
|
+
modifier onlyAfterUpgradeGovernanceDelay() {
|
|
64
|
+
GovernanceUtils.onlyAfterGovernanceDelay(
|
|
65
|
+
upgradeInitiatedTimestamp,
|
|
66
|
+
UPGRADE_GOVERNANCE_DELAY
|
|
67
|
+
);
|
|
68
|
+
_;
|
|
69
|
+
}
|
|
70
|
+
|
|
45
71
|
constructor(Bank _bank, TBTC _tbtcToken) {
|
|
46
72
|
require(
|
|
47
73
|
address(_bank) != address(0),
|
|
@@ -110,7 +136,7 @@ contract TBTCVault is IVault, Governable {
|
|
|
110
136
|
function receiveBalanceApproval(
|
|
111
137
|
address owner,
|
|
112
138
|
uint256 amount,
|
|
113
|
-
bytes
|
|
139
|
+
bytes calldata
|
|
114
140
|
) external override onlyBank {
|
|
115
141
|
require(
|
|
116
142
|
bank.balanceOf(owner) >= amount,
|
|
@@ -136,7 +162,7 @@ contract TBTCVault is IVault, Governable {
|
|
|
136
162
|
}
|
|
137
163
|
}
|
|
138
164
|
|
|
139
|
-
/// @notice Burns `amount` of TBTC from the caller's
|
|
165
|
+
/// @notice Burns `amount` of TBTC from the caller's balance and transfers
|
|
140
166
|
/// `amount` back to the caller's balance in the Bank.
|
|
141
167
|
/// @dev Caller must have at least `amount` of TBTC approved to
|
|
142
168
|
/// TBTC Vault.
|
|
@@ -145,23 +171,82 @@ contract TBTCVault is IVault, Governable {
|
|
|
145
171
|
_unmint(msg.sender, amount);
|
|
146
172
|
}
|
|
147
173
|
|
|
148
|
-
/// @notice Burns `amount` of TBTC from the caller's
|
|
149
|
-
/// `amount`
|
|
150
|
-
///
|
|
151
|
-
///
|
|
152
|
-
///
|
|
174
|
+
/// @notice Burns `amount` of TBTC from the caller's balance and transfers
|
|
175
|
+
/// `amount` of Bank balance to the Bridge requesting redemption
|
|
176
|
+
/// based on the provided `redemptionData`.
|
|
177
|
+
/// @dev Caller must have at least `amount` of TBTC approved to
|
|
178
|
+
/// TBTC Vault.
|
|
179
|
+
/// @param amount Amount of TBTC to unmint and request to redeem in Bridge.
|
|
180
|
+
/// @param redemptionData Redemption data in a format expected from
|
|
181
|
+
/// `redemptionData` parameter of Bridge's `receiveBalanceApproval`
|
|
182
|
+
/// function.
|
|
183
|
+
function unmintAndRedeem(uint256 amount, bytes calldata redemptionData)
|
|
184
|
+
external
|
|
185
|
+
{
|
|
186
|
+
_unmintAndRedeem(msg.sender, amount, redemptionData);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/// @notice Burns `amount` of TBTC from the caller's balance. If `extraData`
|
|
190
|
+
/// is empty, transfers `amount` back to the caller's balance in the
|
|
191
|
+
/// Bank. If `extraData` is not empty, requests redemption in the
|
|
192
|
+
/// Bridge using the `extraData` as a `redemptionData` parameter to
|
|
193
|
+
/// Bridge's `receiveBalanceApproval` function.
|
|
194
|
+
/// @dev This function is doing the same as `unmint` or `unmintAndRedeem`
|
|
195
|
+
/// (depending on `extraData` parameter) but it allows to execute
|
|
196
|
+
/// unminting without a separate approval transaction. The function can
|
|
197
|
+
/// be called only via `approveAndCall` of TBTC token.
|
|
153
198
|
/// @param from TBTC token holder executing unminting.
|
|
154
199
|
/// @param amount Amount of TBTC to unmint.
|
|
155
200
|
/// @param token TBTC token address.
|
|
201
|
+
/// @param extraData Redemption data in a format expected from
|
|
202
|
+
/// `redemptionData` parameter of Bridge's `receiveBalanceApproval`
|
|
203
|
+
/// function. If empty, `receiveApproval` is not requesting a
|
|
204
|
+
/// redemption of Bank balance but is instead performing just TBTC
|
|
205
|
+
/// unminting to a Bank balance.
|
|
156
206
|
function receiveApproval(
|
|
157
207
|
address from,
|
|
158
208
|
uint256 amount,
|
|
159
209
|
address token,
|
|
160
|
-
bytes calldata
|
|
210
|
+
bytes calldata extraData
|
|
161
211
|
) external {
|
|
162
212
|
require(token == address(tbtcToken), "Token is not TBTC");
|
|
163
213
|
require(msg.sender == token, "Only TBTC caller allowed");
|
|
164
|
-
|
|
214
|
+
if (extraData.length == 0) {
|
|
215
|
+
_unmint(from, amount);
|
|
216
|
+
} else {
|
|
217
|
+
_unmintAndRedeem(from, amount, extraData);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/// @notice Initiates vault upgrade process. The upgrade process needs to be
|
|
222
|
+
/// finalized with a call to `finalizeUpgrade` function after the
|
|
223
|
+
/// `UPGRADE_GOVERNANCE_DELAY` passes. Only the governance can
|
|
224
|
+
/// initiate the upgrade.
|
|
225
|
+
/// @param _newVault The new vault address.
|
|
226
|
+
function initiateUpgrade(address _newVault) external onlyGovernance {
|
|
227
|
+
require(_newVault != address(0), "New vault address cannot be zero");
|
|
228
|
+
/* solhint-disable-next-line not-rely-on-time */
|
|
229
|
+
emit UpgradeInitiated(_newVault, block.timestamp);
|
|
230
|
+
/* solhint-disable-next-line not-rely-on-time */
|
|
231
|
+
upgradeInitiatedTimestamp = block.timestamp;
|
|
232
|
+
newVault = _newVault;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/// @notice Allows the governance to finalize vault upgrade process. The
|
|
236
|
+
/// upgrade process needs to be first initiated with a call to
|
|
237
|
+
/// `initiateUpgrade` and the `UPGRADE_GOVERNANCE_DELAY` needs to
|
|
238
|
+
/// pass. Once the upgrade is finalized, the new vault will become
|
|
239
|
+
/// an owner of TBTC token.
|
|
240
|
+
function finalizeUpgrade()
|
|
241
|
+
external
|
|
242
|
+
onlyGovernance
|
|
243
|
+
onlyAfterUpgradeGovernanceDelay
|
|
244
|
+
{
|
|
245
|
+
emit UpgradeFinalized(newVault);
|
|
246
|
+
// slither-disable-next-line reentrancy-no-eth
|
|
247
|
+
tbtcToken.transferOwnership(newVault);
|
|
248
|
+
newVault = address(0);
|
|
249
|
+
upgradeInitiatedTimestamp = 0;
|
|
165
250
|
}
|
|
166
251
|
|
|
167
252
|
// slither-disable-next-line calls-loop
|
|
@@ -175,4 +260,14 @@ contract TBTCVault is IVault, Governable {
|
|
|
175
260
|
tbtcToken.burnFrom(unminter, amount);
|
|
176
261
|
bank.transferBalance(unminter, amount);
|
|
177
262
|
}
|
|
263
|
+
|
|
264
|
+
function _unmintAndRedeem(
|
|
265
|
+
address redeemer,
|
|
266
|
+
uint256 amount,
|
|
267
|
+
bytes calldata redemptionData
|
|
268
|
+
) internal {
|
|
269
|
+
emit Unminted(redeemer, amount);
|
|
270
|
+
tbtcToken.burnFrom(redeemer, amount);
|
|
271
|
+
bank.approveBalanceAndCall(bank.bridge(), amount, redemptionData);
|
|
272
|
+
}
|
|
178
273
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { HardhatRuntimeEnvironment } from "hardhat/types"
|
|
2
|
+
import type { DeployFunction } from "hardhat-deploy/types"
|
|
3
|
+
|
|
4
|
+
import initializeWalletOwner from "@keep-network/ecdsa/export/tasks/initialize-wallet-owner"
|
|
5
|
+
|
|
6
|
+
const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
|
|
7
|
+
const Bridge = await hre.deployments.get("Bridge")
|
|
8
|
+
|
|
9
|
+
await initializeWalletOwner(hre, Bridge.address)
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export default func
|
|
13
|
+
|
|
14
|
+
func.tags = ["InitializeWalletOwner"]
|
|
15
|
+
func.dependencies = ["Bridge"]
|
|
16
|
+
|
|
17
|
+
func.skip = async (hre: HardhatRuntimeEnvironment): Promise<boolean> =>
|
|
18
|
+
hre.network.name === "mainnet"
|
package/export.json
CHANGED
|
@@ -16883,6 +16883,51 @@
|
|
|
16883
16883
|
"name": "Unminted",
|
|
16884
16884
|
"type": "event"
|
|
16885
16885
|
},
|
|
16886
|
+
{
|
|
16887
|
+
"anonymous": false,
|
|
16888
|
+
"inputs": [
|
|
16889
|
+
{
|
|
16890
|
+
"indexed": false,
|
|
16891
|
+
"internalType": "address",
|
|
16892
|
+
"name": "newVault",
|
|
16893
|
+
"type": "address"
|
|
16894
|
+
}
|
|
16895
|
+
],
|
|
16896
|
+
"name": "UpgradeFinalized",
|
|
16897
|
+
"type": "event"
|
|
16898
|
+
},
|
|
16899
|
+
{
|
|
16900
|
+
"anonymous": false,
|
|
16901
|
+
"inputs": [
|
|
16902
|
+
{
|
|
16903
|
+
"indexed": false,
|
|
16904
|
+
"internalType": "address",
|
|
16905
|
+
"name": "newVault",
|
|
16906
|
+
"type": "address"
|
|
16907
|
+
},
|
|
16908
|
+
{
|
|
16909
|
+
"indexed": false,
|
|
16910
|
+
"internalType": "uint256",
|
|
16911
|
+
"name": "timestamp",
|
|
16912
|
+
"type": "uint256"
|
|
16913
|
+
}
|
|
16914
|
+
],
|
|
16915
|
+
"name": "UpgradeInitiated",
|
|
16916
|
+
"type": "event"
|
|
16917
|
+
},
|
|
16918
|
+
{
|
|
16919
|
+
"inputs": [],
|
|
16920
|
+
"name": "UPGRADE_GOVERNANCE_DELAY",
|
|
16921
|
+
"outputs": [
|
|
16922
|
+
{
|
|
16923
|
+
"internalType": "uint256",
|
|
16924
|
+
"name": "",
|
|
16925
|
+
"type": "uint256"
|
|
16926
|
+
}
|
|
16927
|
+
],
|
|
16928
|
+
"stateMutability": "view",
|
|
16929
|
+
"type": "function"
|
|
16930
|
+
},
|
|
16886
16931
|
{
|
|
16887
16932
|
"inputs": [],
|
|
16888
16933
|
"name": "bank",
|
|
@@ -16896,6 +16941,13 @@
|
|
|
16896
16941
|
"stateMutability": "view",
|
|
16897
16942
|
"type": "function"
|
|
16898
16943
|
},
|
|
16944
|
+
{
|
|
16945
|
+
"inputs": [],
|
|
16946
|
+
"name": "finalizeUpgrade",
|
|
16947
|
+
"outputs": [],
|
|
16948
|
+
"stateMutability": "nonpayable",
|
|
16949
|
+
"type": "function"
|
|
16950
|
+
},
|
|
16899
16951
|
{
|
|
16900
16952
|
"inputs": [],
|
|
16901
16953
|
"name": "governance",
|
|
@@ -16909,6 +16961,19 @@
|
|
|
16909
16961
|
"stateMutability": "view",
|
|
16910
16962
|
"type": "function"
|
|
16911
16963
|
},
|
|
16964
|
+
{
|
|
16965
|
+
"inputs": [
|
|
16966
|
+
{
|
|
16967
|
+
"internalType": "address",
|
|
16968
|
+
"name": "_newVault",
|
|
16969
|
+
"type": "address"
|
|
16970
|
+
}
|
|
16971
|
+
],
|
|
16972
|
+
"name": "initiateUpgrade",
|
|
16973
|
+
"outputs": [],
|
|
16974
|
+
"stateMutability": "nonpayable",
|
|
16975
|
+
"type": "function"
|
|
16976
|
+
},
|
|
16912
16977
|
{
|
|
16913
16978
|
"inputs": [
|
|
16914
16979
|
{
|
|
@@ -16922,6 +16987,19 @@
|
|
|
16922
16987
|
"stateMutability": "nonpayable",
|
|
16923
16988
|
"type": "function"
|
|
16924
16989
|
},
|
|
16990
|
+
{
|
|
16991
|
+
"inputs": [],
|
|
16992
|
+
"name": "newVault",
|
|
16993
|
+
"outputs": [
|
|
16994
|
+
{
|
|
16995
|
+
"internalType": "address",
|
|
16996
|
+
"name": "",
|
|
16997
|
+
"type": "address"
|
|
16998
|
+
}
|
|
16999
|
+
],
|
|
17000
|
+
"stateMutability": "view",
|
|
17001
|
+
"type": "function"
|
|
17002
|
+
},
|
|
16925
17003
|
{
|
|
16926
17004
|
"inputs": [
|
|
16927
17005
|
{
|
|
@@ -16941,7 +17019,7 @@
|
|
|
16941
17019
|
},
|
|
16942
17020
|
{
|
|
16943
17021
|
"internalType": "bytes",
|
|
16944
|
-
"name": "",
|
|
17022
|
+
"name": "extraData",
|
|
16945
17023
|
"type": "bytes"
|
|
16946
17024
|
}
|
|
16947
17025
|
],
|
|
@@ -17080,6 +17158,37 @@
|
|
|
17080
17158
|
"outputs": [],
|
|
17081
17159
|
"stateMutability": "nonpayable",
|
|
17082
17160
|
"type": "function"
|
|
17161
|
+
},
|
|
17162
|
+
{
|
|
17163
|
+
"inputs": [
|
|
17164
|
+
{
|
|
17165
|
+
"internalType": "uint256",
|
|
17166
|
+
"name": "amount",
|
|
17167
|
+
"type": "uint256"
|
|
17168
|
+
},
|
|
17169
|
+
{
|
|
17170
|
+
"internalType": "bytes",
|
|
17171
|
+
"name": "redemptionData",
|
|
17172
|
+
"type": "bytes"
|
|
17173
|
+
}
|
|
17174
|
+
],
|
|
17175
|
+
"name": "unmintAndRedeem",
|
|
17176
|
+
"outputs": [],
|
|
17177
|
+
"stateMutability": "nonpayable",
|
|
17178
|
+
"type": "function"
|
|
17179
|
+
},
|
|
17180
|
+
{
|
|
17181
|
+
"inputs": [],
|
|
17182
|
+
"name": "upgradeInitiatedTimestamp",
|
|
17183
|
+
"outputs": [
|
|
17184
|
+
{
|
|
17185
|
+
"internalType": "uint256",
|
|
17186
|
+
"name": "",
|
|
17187
|
+
"type": "uint256"
|
|
17188
|
+
}
|
|
17189
|
+
],
|
|
17190
|
+
"stateMutability": "view",
|
|
17191
|
+
"type": "function"
|
|
17083
17192
|
}
|
|
17084
17193
|
]
|
|
17085
17194
|
}
|