@keep-network/tbtc-v2 1.0.3-dev.1 → 1.0.3-dev.2
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/BLS.json +1 -1
- package/artifacts/Bank.json +3 -3
- package/artifacts/BeaconAuthorization.json +1 -1
- package/artifacts/BeaconDkg.json +1 -1
- package/artifacts/BeaconDkgValidator.json +1 -1
- package/artifacts/BeaconInactivity.json +1 -1
- package/artifacts/BeaconSortitionPool.json +3 -3
- package/artifacts/Bridge.json +5 -5
- package/artifacts/BridgeGovernance.json +2 -2
- package/artifacts/BridgeGovernanceParameters.json +2 -2
- package/artifacts/Deposit.json +2 -2
- package/artifacts/DepositSweep.json +2 -2
- package/artifacts/DonationVault.json +3 -3
- package/artifacts/EcdsaDkgValidator.json +1 -1
- package/artifacts/EcdsaInactivity.json +1 -1
- package/artifacts/EcdsaSortitionPool.json +3 -3
- 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/LightRelay.json +18 -18
- package/artifacts/MaintainerProxy.json +19 -19
- package/artifacts/MovingFunds.json +2 -2
- package/artifacts/NuCypherStakingEscrow.json +1 -1
- package/artifacts/NuCypherToken.json +2 -2
- package/artifacts/RandomBeacon.json +2 -2
- package/artifacts/RandomBeaconChaosnet.json +2 -2
- package/artifacts/RandomBeaconGovernance.json +2 -2
- package/artifacts/Redemption.json +2 -2
- package/artifacts/ReimbursementPool.json +2 -2
- package/artifacts/T.json +2 -2
- package/artifacts/TBTC.json +3 -3
- package/artifacts/TBTCToken.json +3 -3
- package/artifacts/TBTCVault.json +23 -23
- 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/VendingMachineV2.json +360 -0
- package/artifacts/VendingMachineV3.json +405 -0
- package/artifacts/WalletRegistry.json +5 -5
- package/artifacts/WalletRegistryGovernance.json +2 -2
- package/artifacts/Wallets.json +2 -2
- package/artifacts/solcInputs/{5835b0a74f2a5433fcfb8074d31a6e8a.json → b0025f1f7efe4824592ac0c9793776c3.json} +6 -0
- 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/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.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/BridgeGovernanceParameters.sol/BridgeGovernanceParameters.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/VendingMachineV2.sol/VendingMachineV2.dbg.json +4 -0
- package/build/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +245 -0
- package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.dbg.json +4 -0
- package/build/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +282 -0
- package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +1 -1
- package/build/contracts/l2/L2TBTC.sol/L2TBTC.dbg.json +1 -1
- package/build/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/ILightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/LightRelay.dbg.json +1 -1
- package/build/contracts/relay/LightRelay.sol/RelayUtils.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/TBTCOptimisticMinting.sol/TBTCOptimisticMinting.dbg.json +1 -1
- package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +1 -1
- package/contracts/bridge/VendingMachineV2.sol +114 -0
- package/contracts/bridge/VendingMachineV3.sol +134 -0
- package/deploy/24_transfer_tbtc_ownership.ts +7 -14
- package/deploy/30_deploy_vending_machine_v2.ts +34 -0
- package/deploy/31_deploy_vending_machine_v3.ts +34 -0
- package/deploy/32_transfer_vending_machine_v2_ownership.ts +19 -0
- package/deploy/33_transfer_vending_machine_v3_ownership.ts +19 -0
- package/export/artifacts/@keep-network/bitcoin-spv-sol/contracts/BTCUtils.sol/BTCUtils.json +20 -20
- package/export/artifacts/@keep-network/ecdsa/contracts/EcdsaDkgValidator.sol/EcdsaDkgValidator.json +1986 -1986
- package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaDkg.sol/EcdsaDkg.json +20 -20
- package/export/artifacts/@keep-network/ecdsa/contracts/libraries/EcdsaInactivity.sol/EcdsaInactivity.json +1836 -1836
- package/export/artifacts/@keep-network/random-beacon/contracts/ReimbursementPool.sol/ReimbursementPool.json +545 -545
- package/export/artifacts/@keep-network/sortition-pools/contracts/Chaosnet.sol/Chaosnet.json +506 -506
- package/export/artifacts/@keep-network/sortition-pools/contracts/Rewards.sol/Rewards.json +23 -23
- package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionPool.sol/SortitionPool.json +2456 -2456
- package/export/artifacts/@keep-network/sortition-pools/contracts/SortitionTree.sol/SortitionTree.json +465 -465
- package/export/artifacts/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol/ERC1967Proxy.json +568 -568
- package/export/artifacts/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol/ProxyAdmin.json +603 -603
- package/export/artifacts/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.json +1001 -1001
- package/export/artifacts/@openzeppelin/contracts/token/ERC721/ERC721.sol/ERC721.json +1877 -1877
- package/export/artifacts/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol/ERC20Upgradeable.json +654 -654
- package/export/artifacts/@thesis/solidity-contracts/contracts/token/ERC20WithPermit.sol/ERC20WithPermit.json +2534 -2534
- package/export/artifacts/@thesis/solidity-contracts/contracts/token/MisfundRecovery.sol/MisfundRecovery.json +736 -736
- package/export/artifacts/contracts/bank/Bank.sol/Bank.json +1872 -1872
- package/export/artifacts/contracts/bridge/Bridge.sol/Bridge.json +7083 -7083
- package/export/artifacts/contracts/bridge/VendingMachine.sol/VendingMachine.json +1257 -1257
- package/export/artifacts/contracts/bridge/VendingMachineV2.sol/VendingMachineV2.json +6199 -0
- package/export/artifacts/contracts/bridge/VendingMachineV3.sol/VendingMachineV3.json +7151 -0
- package/export/artifacts/contracts/l2/L2TBTC.sol/L2TBTC.json +3002 -3002
- package/export/artifacts/contracts/maintainer/MaintainerProxy.sol/MaintainerProxy.json +2393 -2393
- package/export/artifacts/contracts/relay/LightRelay.sol/LightRelay.json +1922 -1922
- package/export/artifacts/contracts/test/BankStub.sol/BankStub.json +1874 -1874
- package/export/artifacts/contracts/test/BridgeStub.sol/BridgeStub.json +8122 -8122
- package/export/artifacts/contracts/test/GoerliLightRelay.sol/GoerliLightRelay.json +1922 -1922
- package/export/artifacts/contracts/test/HeartbeatStub.sol/HeartbeatStub.json +130 -130
- package/export/artifacts/contracts/test/LightRelayStub.sol/LightRelayStub.json +2047 -2047
- package/export/artifacts/contracts/test/ReceiveApprovalStub.sol/ReceiveApprovalStub.json +354 -354
- package/export/artifacts/contracts/test/SystemTestRelay.sol/SystemTestRelay.json +568 -568
- package/export/artifacts/contracts/test/TestERC20.sol/TestERC20.json +2291 -2291
- package/export/artifacts/contracts/test/TestERC721.sol/TestERC721.json +1698 -1698
- package/export/artifacts/contracts/test/TestEcdsaLib.sol/TestEcdsaLib.json +189 -189
- package/export/artifacts/contracts/token/TBTC.sol/TBTC.json +2847 -2847
- package/export/artifacts/contracts/vault/DonationVault.sol/DonationVault.json +858 -858
- package/export/artifacts/contracts/vault/TBTCVault.sol/TBTCVault.json +3476 -3476
- package/export/deploy/24_transfer_tbtc_ownership.js +14 -14
- package/export/deploy/30_deploy_vending_machine_v2.js +86 -0
- package/export/deploy/31_deploy_vending_machine_v3.js +86 -0
- package/export/deploy/32_transfer_vending_machine_v2_ownership.js +60 -0
- package/export/deploy/33_transfer_vending_machine_v3_ownership.js +60 -0
- package/export/hardhat.config.js +5 -0
- package/export/typechain/VendingMachineV2.js +2 -0
- package/export/typechain/VendingMachineV3.js +2 -0
- package/export/typechain/factories/VendingMachineV2__factory.js +324 -0
- package/export/typechain/factories/VendingMachineV3__factory.js +361 -0
- package/export/typechain/index.js +5 -1
- package/package.json +1 -1
|
@@ -38,30 +38,30 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
var func = function (hre) {
|
|
40
40
|
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
-
var getNamedAccounts, deployments, helpers, deployer,
|
|
41
|
+
var getNamedAccounts, deployments, helpers, deployer, TBTCVault;
|
|
42
42
|
return __generator(this, function (_a) {
|
|
43
43
|
switch (_a.label) {
|
|
44
44
|
case 0:
|
|
45
45
|
getNamedAccounts = hre.getNamedAccounts, deployments = hre.deployments, helpers = hre.helpers;
|
|
46
|
-
return [4 /*yield*/, getNamedAccounts()
|
|
46
|
+
return [4 /*yield*/, getNamedAccounts()
|
|
47
|
+
// In unit tests we cover VendingMachine, VendingMachineV2, and TBTCVault
|
|
48
|
+
// contracts. All those tests require minting TBTC. To make the test setup
|
|
49
|
+
// easier, we leave the responsibility of transferring the TBTC ownership
|
|
50
|
+
// to the test. In system tests and on Goerli, TBTCVault is the owner of TBTC
|
|
51
|
+
// token, just like on v1.0 mainnet, after transferring the ownership from the
|
|
52
|
+
// VendingMachine.
|
|
53
|
+
];
|
|
47
54
|
case 1:
|
|
48
55
|
deployer = (_a.sent()).deployer;
|
|
49
|
-
if (!(hre.network.name
|
|
50
|
-
return [4 /*yield*/, deployments.get("
|
|
56
|
+
if (!(hre.network.name !== "hardhat")) return [3 /*break*/, 4];
|
|
57
|
+
return [4 /*yield*/, deployments.get("TBTCVault")];
|
|
51
58
|
case 2:
|
|
52
|
-
VendingMachine = _a.sent();
|
|
53
|
-
return [4 /*yield*/, helpers.ownable.transferOwnership("TBTC", VendingMachine.address, deployer)];
|
|
54
|
-
case 3:
|
|
55
|
-
_a.sent();
|
|
56
|
-
return [3 /*break*/, 7];
|
|
57
|
-
case 4: return [4 /*yield*/, deployments.get("TBTCVault")];
|
|
58
|
-
case 5:
|
|
59
59
|
TBTCVault = _a.sent();
|
|
60
60
|
return [4 /*yield*/, helpers.ownable.transferOwnership("TBTC", TBTCVault.address, deployer)];
|
|
61
|
-
case
|
|
61
|
+
case 3:
|
|
62
62
|
_a.sent();
|
|
63
|
-
_a.label =
|
|
64
|
-
case
|
|
63
|
+
_a.label = 4;
|
|
64
|
+
case 4: return [2 /*return*/];
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var func = function (hre) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
+
var deployments, helpers, getNamedAccounts, deploy, deployer, TBTCToken, TBTC, vendingMachineV2;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
deployments = hre.deployments, helpers = hre.helpers, getNamedAccounts = hre.getNamedAccounts;
|
|
46
|
+
deploy = deployments.deploy;
|
|
47
|
+
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
+
case 1:
|
|
49
|
+
deployer = (_a.sent()).deployer;
|
|
50
|
+
return [4 /*yield*/, deployments.get("TBTCToken")];
|
|
51
|
+
case 2:
|
|
52
|
+
TBTCToken = _a.sent();
|
|
53
|
+
return [4 /*yield*/, deployments.get("TBTC")]; // tBTC v2
|
|
54
|
+
case 3:
|
|
55
|
+
TBTC = _a.sent() // tBTC v2
|
|
56
|
+
;
|
|
57
|
+
return [4 /*yield*/, deploy("VendingMachineV2", {
|
|
58
|
+
from: deployer,
|
|
59
|
+
args: [TBTCToken.address, TBTC.address],
|
|
60
|
+
log: true,
|
|
61
|
+
waitConfirmations: 1,
|
|
62
|
+
})];
|
|
63
|
+
case 4:
|
|
64
|
+
vendingMachineV2 = _a.sent();
|
|
65
|
+
if (!hre.network.tags.etherscan) return [3 /*break*/, 6];
|
|
66
|
+
return [4 /*yield*/, helpers.etherscan.verify(vendingMachineV2)];
|
|
67
|
+
case 5:
|
|
68
|
+
_a.sent();
|
|
69
|
+
_a.label = 6;
|
|
70
|
+
case 6:
|
|
71
|
+
if (!hre.network.tags.tenderly) return [3 /*break*/, 8];
|
|
72
|
+
return [4 /*yield*/, hre.tenderly.verify({
|
|
73
|
+
name: "VendingMachineV2",
|
|
74
|
+
address: vendingMachineV2.address,
|
|
75
|
+
})];
|
|
76
|
+
case 7:
|
|
77
|
+
_a.sent();
|
|
78
|
+
_a.label = 8;
|
|
79
|
+
case 8: return [2 /*return*/];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
exports.default = func;
|
|
85
|
+
func.tags = ["VendingMachineV2"];
|
|
86
|
+
func.dependencies = ["TBTCToken", "TBTC"];
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var func = function (hre) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
+
var deployments, helpers, getNamedAccounts, deploy, deployer, TBTCToken, TBTC, vendingMachineV3;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
switch (_a.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
deployments = hre.deployments, helpers = hre.helpers, getNamedAccounts = hre.getNamedAccounts;
|
|
46
|
+
deploy = deployments.deploy;
|
|
47
|
+
return [4 /*yield*/, getNamedAccounts()];
|
|
48
|
+
case 1:
|
|
49
|
+
deployer = (_a.sent()).deployer;
|
|
50
|
+
return [4 /*yield*/, deployments.get("TBTCToken")];
|
|
51
|
+
case 2:
|
|
52
|
+
TBTCToken = _a.sent();
|
|
53
|
+
return [4 /*yield*/, deployments.get("TBTC")]; // tBTC v2
|
|
54
|
+
case 3:
|
|
55
|
+
TBTC = _a.sent() // tBTC v2
|
|
56
|
+
;
|
|
57
|
+
return [4 /*yield*/, deploy("VendingMachineV3", {
|
|
58
|
+
from: deployer,
|
|
59
|
+
args: [TBTCToken.address, TBTC.address],
|
|
60
|
+
log: true,
|
|
61
|
+
waitConfirmations: 1,
|
|
62
|
+
})];
|
|
63
|
+
case 4:
|
|
64
|
+
vendingMachineV3 = _a.sent();
|
|
65
|
+
if (!hre.network.tags.etherscan) return [3 /*break*/, 6];
|
|
66
|
+
return [4 /*yield*/, helpers.etherscan.verify(vendingMachineV3)];
|
|
67
|
+
case 5:
|
|
68
|
+
_a.sent();
|
|
69
|
+
_a.label = 6;
|
|
70
|
+
case 6:
|
|
71
|
+
if (!hre.network.tags.tenderly) return [3 /*break*/, 8];
|
|
72
|
+
return [4 /*yield*/, hre.tenderly.verify({
|
|
73
|
+
name: "VendingMachineV",
|
|
74
|
+
address: vendingMachineV3.address,
|
|
75
|
+
})];
|
|
76
|
+
case 7:
|
|
77
|
+
_a.sent();
|
|
78
|
+
_a.label = 8;
|
|
79
|
+
case 8: return [2 /*return*/];
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
exports.default = func;
|
|
85
|
+
func.tags = ["VendingMachineV3"];
|
|
86
|
+
func.dependencies = ["TBTCToken", "TBTC"];
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var func = function (hre) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
+
var getNamedAccounts, helpers, _a, deployer, v1Redeemer;
|
|
42
|
+
return __generator(this, function (_b) {
|
|
43
|
+
switch (_b.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
getNamedAccounts = hre.getNamedAccounts, helpers = hre.helpers;
|
|
46
|
+
return [4 /*yield*/, getNamedAccounts()];
|
|
47
|
+
case 1:
|
|
48
|
+
_a = _b.sent(), deployer = _a.deployer, v1Redeemer = _a.v1Redeemer;
|
|
49
|
+
return [4 /*yield*/, helpers.ownable.transferOwnership("VendingMachineV2", v1Redeemer, deployer)];
|
|
50
|
+
case 2:
|
|
51
|
+
_b.sent();
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
exports.default = func;
|
|
58
|
+
func.tags = ["TransferVendingMachineV2Ownership"];
|
|
59
|
+
func.dependencies = ["VendingMachineV2"];
|
|
60
|
+
func.runAtTheEnd = true;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (_) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
var func = function (hre) {
|
|
40
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
41
|
+
var getNamedAccounts, helpers, _a, deployer, governance;
|
|
42
|
+
return __generator(this, function (_b) {
|
|
43
|
+
switch (_b.label) {
|
|
44
|
+
case 0:
|
|
45
|
+
getNamedAccounts = hre.getNamedAccounts, helpers = hre.helpers;
|
|
46
|
+
return [4 /*yield*/, getNamedAccounts()];
|
|
47
|
+
case 1:
|
|
48
|
+
_a = _b.sent(), deployer = _a.deployer, governance = _a.governance;
|
|
49
|
+
return [4 /*yield*/, helpers.ownable.transferOwnership("VendingMachineV3", governance, deployer)];
|
|
50
|
+
case 2:
|
|
51
|
+
_b.sent();
|
|
52
|
+
return [2 /*return*/];
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
exports.default = func;
|
|
58
|
+
func.tags = ["TransferVendingMachineV3Ownership"];
|
|
59
|
+
func.dependencies = ["VendingMachineV3"];
|
|
60
|
+
func.runAtTheEnd = true;
|
package/export/hardhat.config.js
CHANGED
|
@@ -199,6 +199,11 @@ var config = {
|
|
|
199
199
|
goerli: 0,
|
|
200
200
|
// We are not setting SPV maintainer for mainnet in deployment scripts.
|
|
201
201
|
},
|
|
202
|
+
v1Redeemer: {
|
|
203
|
+
default: 9,
|
|
204
|
+
goerli: 0,
|
|
205
|
+
mainnet: "0x8Bac178fA95Cb56D11A94d4f1b2B1F5Fc48A30eA",
|
|
206
|
+
},
|
|
202
207
|
},
|
|
203
208
|
dependencyCompiler: {
|
|
204
209
|
paths: [
|