@keep-network/tbtc-v2 0.1.1-dev.42 → 0.1.1-dev.45
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 +742 -0
- package/artifacts/Bridge.json +2914 -0
- package/artifacts/Deposit.json +117 -0
- package/artifacts/EcdsaDkgValidator.json +532 -0
- package/artifacts/EcdsaInactivity.json +156 -0
- package/artifacts/Fraud.json +153 -0
- package/artifacts/KeepRegistry.json +99 -0
- package/artifacts/KeepStake.json +286 -0
- package/artifacts/KeepToken.json +711 -0
- package/artifacts/KeepTokenStaking.json +483 -0
- package/artifacts/MovingFunds.json +137 -0
- package/artifacts/NuCypherStakingEscrow.json +256 -0
- package/artifacts/NuCypherToken.json +711 -0
- package/artifacts/RandomBeaconStub.json +141 -0
- package/artifacts/Redemption.json +161 -0
- package/artifacts/ReimbursementPool.json +509 -0
- package/artifacts/Relay.json +123 -0
- package/artifacts/SortitionPool.json +944 -0
- package/artifacts/Sweep.json +76 -0
- package/artifacts/T.json +1148 -0
- package/artifacts/TBTC.json +21 -21
- package/artifacts/TBTCToken.json +21 -21
- package/artifacts/TokenStaking.json +2288 -0
- package/artifacts/TokenholderGovernor.json +1795 -0
- package/artifacts/TokenholderTimelock.json +1058 -0
- package/artifacts/VendingMachine.json +24 -24
- package/artifacts/VendingMachineKeep.json +400 -0
- package/artifacts/VendingMachineNuCypher.json +400 -0
- package/artifacts/WalletRegistry.json +2709 -0
- package/artifacts/WalletRegistryGovernance.json +2364 -0
- package/artifacts/Wallets.json +186 -0
- package/artifacts/solcInputs/{002940e9cc8128f6629e90620c66cba5.json → 58ca6018672440f1c9c800806e096f9c.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/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 +489 -173
- package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +1 -1
- package/build/contracts/bridge/BridgeState.sol/BridgeState.json +114 -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/EcdsaLib.sol/EcdsaLib.dbg.json +1 -1
- package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.json +2 -2
- package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +1 -1
- package/build/contracts/bridge/Fraud.sol/Fraud.json +5 -57
- 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 +40 -2
- package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +4 -0
- package/build/contracts/bridge/{Redeem.sol → Redemption.sol}/OutboundTx.json +3 -3
- package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +4 -0
- package/build/contracts/bridge/Redemption.sol/Redemption.json +92 -0
- 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 +21 -2
- 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/BitcoinTx.sol +19 -26
- package/contracts/bridge/Bridge.sol +736 -489
- package/contracts/bridge/BridgeState.sol +271 -24
- package/contracts/bridge/Deposit.sol +24 -2
- package/contracts/bridge/EcdsaLib.sol +15 -0
- package/contracts/bridge/Fraud.sol +64 -31
- package/contracts/bridge/MovingFunds.sol +194 -6
- package/contracts/bridge/{Redeem.sol → Redemption.sol} +20 -18
- package/contracts/bridge/Sweep.sol +13 -8
- package/contracts/bridge/Wallets.sol +53 -35
- package/deploy/00_resolve_relay.ts +28 -0
- package/deploy/04_deploy_bank.ts +25 -0
- package/deploy/05_deploy_bridge.ts +60 -0
- package/deploy/06_bank_update_bridge.ts +19 -0
- package/deploy/07_transfer_ownership.ts +17 -0
- package/export.json +14797 -459
- package/package.json +2 -2
- package/build/contracts/bridge/Redeem.sol/OutboundTx.dbg.json +0 -4
- package/build/contracts/bridge/Redeem.sol/Redeem.dbg.json +0 -4
- package/build/contracts/bridge/Redeem.sol/Redeem.json +0 -92
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types"
|
|
2
|
+
import { DeployFunction } from "hardhat-deploy/types"
|
|
3
|
+
|
|
4
|
+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
5
|
+
const { deployments, getNamedAccounts } = hre
|
|
6
|
+
const { deploy } = deployments
|
|
7
|
+
const { deployer, treasury } = await getNamedAccounts()
|
|
8
|
+
|
|
9
|
+
const Bank = await deployments.get("Bank")
|
|
10
|
+
const Relay = await deployments.get("Relay")
|
|
11
|
+
|
|
12
|
+
// TODO: Test for mainnet deployment that when `WalletRegistry` is provided
|
|
13
|
+
// in `external/mainnet/` directory it gets resolved correctly, and the deployment
|
|
14
|
+
// script from `@keep-network/ecdsa` is not invoked once again.
|
|
15
|
+
const WalletRegistry = await deployments.get("WalletRegistry")
|
|
16
|
+
|
|
17
|
+
const txProofDifficultyFactor = 6
|
|
18
|
+
|
|
19
|
+
const Deposit = await deploy("Deposit", { from: deployer, log: true })
|
|
20
|
+
const Sweep = await deploy("Sweep", { from: deployer, log: true })
|
|
21
|
+
const Redemption = await deploy("Redemption", { from: deployer, log: true })
|
|
22
|
+
const Wallets = await deploy("Wallets", { from: deployer, log: true })
|
|
23
|
+
const Fraud = await deploy("Fraud", { from: deployer, log: true })
|
|
24
|
+
const MovingFunds = await deploy("MovingFunds", {
|
|
25
|
+
from: deployer,
|
|
26
|
+
log: true,
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
const Bridge = await deploy("Bridge", {
|
|
30
|
+
from: deployer,
|
|
31
|
+
args: [
|
|
32
|
+
Bank.address,
|
|
33
|
+
Relay.address,
|
|
34
|
+
treasury,
|
|
35
|
+
WalletRegistry.address,
|
|
36
|
+
txProofDifficultyFactor,
|
|
37
|
+
],
|
|
38
|
+
libraries: {
|
|
39
|
+
Deposit: Deposit.address,
|
|
40
|
+
Sweep: Sweep.address,
|
|
41
|
+
Redemption: Redemption.address,
|
|
42
|
+
Wallets: Wallets.address,
|
|
43
|
+
Fraud: Fraud.address,
|
|
44
|
+
MovingFunds: MovingFunds.address,
|
|
45
|
+
},
|
|
46
|
+
log: true,
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
if (hre.network.tags.tenderly) {
|
|
50
|
+
await hre.tenderly.verify({
|
|
51
|
+
name: "Bridge",
|
|
52
|
+
address: Bridge.address,
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default func
|
|
58
|
+
|
|
59
|
+
func.tags = ["Bridge"]
|
|
60
|
+
func.dependencies = ["Bank", "Relay", "Treasury", "WalletRegistry"]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types"
|
|
2
|
+
import { DeployFunction } from "hardhat-deploy/types"
|
|
3
|
+
|
|
4
|
+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
5
|
+
const { getNamedAccounts, deployments } = hre
|
|
6
|
+
const { execute, log } = deployments
|
|
7
|
+
const { deployer } = await getNamedAccounts()
|
|
8
|
+
|
|
9
|
+
const Bridge = await deployments.get("Bridge")
|
|
10
|
+
|
|
11
|
+
log("updating Bridge in Bank")
|
|
12
|
+
|
|
13
|
+
await execute("Bank", { from: deployer }, "updateBridge", Bridge.address)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export default func
|
|
17
|
+
|
|
18
|
+
func.tags = ["BankUpdateBridge"]
|
|
19
|
+
func.dependencies = ["Bank", "Bridge"]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HardhatRuntimeEnvironment } from "hardhat/types"
|
|
2
|
+
import { DeployFunction } from "hardhat-deploy/types"
|
|
3
|
+
|
|
4
|
+
const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
|
5
|
+
const { getNamedAccounts, helpers } = hre
|
|
6
|
+
const { deployer, governance } = await getNamedAccounts()
|
|
7
|
+
|
|
8
|
+
await helpers.ownable.transferOwnership("Bank", governance, deployer)
|
|
9
|
+
|
|
10
|
+
await helpers.ownable.transferOwnership("Bridge", governance, deployer)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default func
|
|
14
|
+
|
|
15
|
+
func.tags = ["TransferOwnership"]
|
|
16
|
+
func.dependencies = ["Bank", "Bridge"]
|
|
17
|
+
func.runAtTheEnd = true
|