@skalenetwork/upgrade-tools 2.0.0-refactor.12 → 2.0.0-refactor.13
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.
|
@@ -20,6 +20,6 @@ interface SafeMultisigTransaction {
|
|
|
20
20
|
}
|
|
21
21
|
export declare function getSafeTransactionUrl(chainId: number): string;
|
|
22
22
|
export declare function getSafeRelayUrl(chainId: number): string;
|
|
23
|
-
export declare function createMultiSendTransaction(ethers: Ethers, safeAddress: string, privateKey: string, transactions: string[], nonce?: number): Promise<SafeMultisigTransaction>;
|
|
23
|
+
export declare function createMultiSendTransaction(ethers: Ethers, safeAddress: string, privateKey: string, transactions: string[], chainId: number, nonce?: number): Promise<SafeMultisigTransaction>;
|
|
24
24
|
export declare function sendSafeTransaction(safe: string, chainId: number, safeTx: SafeMultisigTransaction): Promise<void>;
|
|
25
25
|
export {};
|
package/dist/src/gnosis-safe.js
CHANGED
|
@@ -87,9 +87,8 @@ function getSafeRelayUrl(chainId) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
exports.getSafeRelayUrl = getSafeRelayUrl;
|
|
90
|
-
function createMultiSendTransaction(ethers, safeAddress, privateKey, transactions, nonce) {
|
|
90
|
+
function createMultiSendTransaction(ethers, safeAddress, privateKey, transactions, chainId, nonce) {
|
|
91
91
|
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
const chainId = (yield ethers.provider.getNetwork()).chainId;
|
|
93
92
|
const multiSendAddress = getMultiSendAddress(chainId);
|
|
94
93
|
const multiSendAbi = [{ "constant": false, "inputs": [{ "internalType": "bytes", "name": "transactions", "type": "bytes" }], "name": "multiSend", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }];
|
|
95
94
|
const multiSend = new ethers.Contract(multiSendAddress, new ethers.utils.Interface(multiSendAbi), ethers.provider);
|
|
@@ -33,10 +33,10 @@ class SafeSubmitter extends submitter_1.Submitter {
|
|
|
33
33
|
// Use random one because we most probable run tests
|
|
34
34
|
privateKey = hardhat_1.ethers.Wallet.createRandom().privateKey;
|
|
35
35
|
}
|
|
36
|
-
const safeTx = yield (0, gnosis_safe_1.createMultiSendTransaction)(hardhat_1.ethers, this.safeAddress, privateKey, safeTransactions);
|
|
37
36
|
if (!this.chainId) {
|
|
38
37
|
this.chainId = (yield hardhat_1.ethers.provider.getNetwork()).chainId;
|
|
39
38
|
}
|
|
39
|
+
const safeTx = yield (0, gnosis_safe_1.createMultiSendTransaction)(hardhat_1.ethers, this.safeAddress, privateKey, safeTransactions, this.chainId);
|
|
40
40
|
yield (0, gnosis_safe_1.sendSafeTransaction)(this.safeAddress, this.chainId, safeTx);
|
|
41
41
|
});
|
|
42
42
|
}
|
package/dist/src/upgrade.js
CHANGED
|
@@ -174,7 +174,7 @@ function upgrade(projectName, targetVersion, getDeployedVersion, setVersion, saf
|
|
|
174
174
|
// Use random one because we most probable run tests
|
|
175
175
|
privateKey = hardhat_1.ethers.Wallet.createRandom().privateKey;
|
|
176
176
|
}
|
|
177
|
-
const safeTx = yield (0, gnosis_safe_1.createMultiSendTransaction)(hardhat_1.ethers, safe, privateKey, safeTransactions, safeMock !== undefined ? 0 : undefined);
|
|
177
|
+
const safeTx = yield (0, gnosis_safe_1.createMultiSendTransaction)(hardhat_1.ethers, safe, privateKey, safeTransactions, (yield hardhat_1.ethers.provider.getNetwork()).chainId, safeMock !== undefined ? 0 : undefined);
|
|
178
178
|
let transactionsBatches;
|
|
179
179
|
if (afterUpgrade !== undefined) {
|
|
180
180
|
transactionsBatches = yield afterUpgrade(abi, contractManager);
|