@skalenetwork/upgrade-tools 3.0.0-verification.0 → 4.0.0-update-verify.1
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/dist/hardhat.config.d.ts +3 -3
- package/dist/hardhat.config.js +6 -17
- package/dist/hardhat.config.js.map +1 -0
- package/dist/src/abi.d.ts +2 -2
- package/dist/src/abi.js +8 -4
- package/dist/src/abi.js.map +1 -0
- package/dist/src/contractFactory.d.ts +4 -0
- package/dist/src/contractFactory.js +84 -0
- package/dist/src/contractFactory.js.map +1 -0
- package/dist/src/contractVerifier.d.ts +14 -0
- package/dist/src/contractVerifier.js +67 -0
- package/dist/src/contractVerifier.js.map +1 -0
- package/dist/src/deploy.d.ts +5 -4
- package/dist/src/deploy.js +77 -58
- package/dist/src/deploy.js.map +1 -0
- package/dist/src/exitCodes.d.ts +8 -0
- package/dist/src/exitCodes.js +13 -0
- package/dist/src/exitCodes.js.map +1 -0
- package/dist/src/gnosis-safe.d.ts +2 -2
- package/dist/src/gnosis-safe.js +105 -96
- package/dist/src/gnosis-safe.js.map +1 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -0
- package/dist/src/nonceProvider.d.ts +10 -0
- package/dist/src/nonceProvider.js +34 -0
- package/dist/src/nonceProvider.js.map +1 -0
- package/dist/src/proxyAdmin.d.ts +4 -0
- package/dist/src/proxyAdmin.js +56 -0
- package/dist/src/proxyAdmin.js.map +1 -0
- package/dist/src/submitters/auto-submitter.d.ts +22 -5
- package/dist/src/submitters/auto-submitter.js +135 -120
- package/dist/src/submitters/auto-submitter.js.map +1 -0
- package/dist/src/submitters/eoa-submitter.d.ts +3 -2
- package/dist/src/submitters/eoa-submitter.js +23 -12
- package/dist/src/submitters/eoa-submitter.js.map +1 -0
- package/dist/src/submitters/index.js +1 -0
- package/dist/src/submitters/index.js.map +1 -0
- package/dist/src/submitters/safe-ima-legacy-marionette-submitter.d.ts +4 -3
- package/dist/src/submitters/safe-ima-legacy-marionette-submitter.js +14 -13
- package/dist/src/submitters/safe-ima-legacy-marionette-submitter.js.map +1 -0
- package/dist/src/submitters/safe-ima-marionette-submitter.d.ts +3 -3
- package/dist/src/submitters/safe-ima-marionette-submitter.js +13 -11
- package/dist/src/submitters/safe-ima-marionette-submitter.js.map +1 -0
- package/dist/src/submitters/safe-submitter.d.ts +4 -4
- package/dist/src/submitters/safe-submitter.js +4 -3
- package/dist/src/submitters/safe-submitter.js.map +1 -0
- package/dist/src/submitters/safe-to-ima-submitter.d.ts +11 -6
- package/dist/src/submitters/safe-to-ima-submitter.js +23 -15
- package/dist/src/submitters/safe-to-ima-submitter.js.map +1 -0
- package/dist/src/submitters/submitter.d.ts +3 -3
- package/dist/src/submitters/submitter.js +11 -7
- package/dist/src/submitters/submitter.js.map +1 -0
- package/dist/src/submitters/types/marionette.d.ts +6 -3
- package/dist/src/submitters/types/marionette.js +1 -0
- package/dist/src/submitters/types/marionette.js.map +1 -0
- package/dist/src/types/SkaleManifestData.js +1 -0
- package/dist/src/types/SkaleManifestData.js.map +1 -0
- package/dist/src/types/upgrader.d.ts +12 -0
- package/dist/{typechain-types/AccessControlUpgradeable.js → src/types/upgrader.js} +1 -0
- package/dist/src/types/upgrader.js.map +1 -0
- package/dist/src/upgrader.d.ts +27 -12
- package/dist/src/upgrader.js +145 -95
- package/dist/src/upgrader.js.map +1 -0
- package/dist/src/verification.d.ts +18 -2
- package/dist/src/verification.js +198 -29
- package/dist/src/verification.js.map +1 -0
- package/dist/src/version.js +24 -2
- package/dist/src/version.js.map +1 -0
- package/dist/typechain-types/AdminUpgradeabilityProxy.d.ts +59 -54
- package/dist/typechain-types/AdminUpgradeabilityProxy.js +1 -0
- package/dist/typechain-types/AdminUpgradeabilityProxy.js.map +1 -0
- package/dist/typechain-types/ProxyAdmin.d.ts +94 -137
- package/dist/typechain-types/ProxyAdmin.js +1 -0
- package/dist/typechain-types/ProxyAdmin.js.map +1 -0
- package/dist/typechain-types/common.d.ts +40 -11
- package/dist/typechain-types/common.js +1 -0
- package/dist/typechain-types/common.js.map +1 -0
- package/dist/typechain-types/factories/AdminUpgradeabilityProxy__factory.d.ts +71 -41
- package/dist/typechain-types/factories/AdminUpgradeabilityProxy__factory.js +8 -11
- package/dist/typechain-types/factories/AdminUpgradeabilityProxy__factory.js.map +1 -0
- package/dist/typechain-types/factories/ProxyAdmin__factory.d.ts +129 -41
- package/dist/typechain-types/factories/ProxyAdmin__factory.js +8 -11
- package/dist/typechain-types/factories/ProxyAdmin__factory.js.map +1 -0
- package/dist/typechain-types/factories/index.d.ts +2 -0
- package/dist/typechain-types/factories/index.js +11 -0
- package/dist/typechain-types/factories/index.js.map +1 -0
- package/dist/typechain-types/index.d.ts +1 -22
- package/dist/typechain-types/index.js +36 -23
- package/dist/typechain-types/index.js.map +1 -0
- package/package.json +23 -27
- package/dist/src/multiSend.d.ts +0 -2
- package/dist/src/multiSend.js +0 -46
- package/dist/typechain-types/AccessControlEnumerableUpgradeable.d.ts +0 -183
- package/dist/typechain-types/AccessControlEnumerableUpgradeable.js +0 -2
- package/dist/typechain-types/AccessControlUpgradeable.d.ts +0 -167
- package/dist/typechain-types/ContextUpgradeable.d.ts +0 -40
- package/dist/typechain-types/ContextUpgradeable.js +0 -2
- package/dist/typechain-types/ERC165Upgradeable.d.ts +0 -53
- package/dist/typechain-types/ERC165Upgradeable.js +0 -2
- package/dist/typechain-types/IAccessControlEnumerableUpgradeable.d.ts +0 -159
- package/dist/typechain-types/IAccessControlEnumerableUpgradeable.js +0 -2
- package/dist/typechain-types/IAccessControlUpgradeable.d.ts +0 -143
- package/dist/typechain-types/IAccessControlUpgradeable.js +0 -2
- package/dist/typechain-types/IERC165Upgradeable.d.ts +0 -43
- package/dist/typechain-types/IERC165Upgradeable.js +0 -2
- package/dist/typechain-types/ISafeMock.d.ts +0 -86
- package/dist/typechain-types/ISafeMock.js +0 -2
- package/dist/typechain-types/Initializable.d.ts +0 -40
- package/dist/typechain-types/Initializable.js +0 -2
- package/dist/typechain-types/OwnableUpgradeable.d.ts +0 -97
- package/dist/typechain-types/OwnableUpgradeable.js +0 -2
- package/dist/typechain-types/SafeMock.d.ts +0 -172
- package/dist/typechain-types/SafeMock.js +0 -2
- package/dist/typechain-types/factories/AccessControlEnumerableUpgradeable__factory.d.ts +0 -35
- package/dist/typechain-types/factories/AccessControlEnumerableUpgradeable__factory.js +0 -279
- package/dist/typechain-types/factories/AccessControlUpgradeable__factory.d.ts +0 -35
- package/dist/typechain-types/factories/AccessControlUpgradeable__factory.js +0 -236
- package/dist/typechain-types/factories/ContextUpgradeable__factory.d.ts +0 -18
- package/dist/typechain-types/factories/ContextUpgradeable__factory.js +0 -32
- package/dist/typechain-types/factories/ERC165Upgradeable__factory.d.ts +0 -35
- package/dist/typechain-types/factories/ERC165Upgradeable__factory.js +0 -51
- package/dist/typechain-types/factories/IAccessControlEnumerableUpgradeable__factory.d.ts +0 -35
- package/dist/typechain-types/factories/IAccessControlEnumerableUpgradeable__factory.js +0 -234
- package/dist/typechain-types/factories/IAccessControlUpgradeable__factory.d.ts +0 -35
- package/dist/typechain-types/factories/IAccessControlUpgradeable__factory.js +0 -191
- package/dist/typechain-types/factories/IERC165Upgradeable__factory.d.ts +0 -22
- package/dist/typechain-types/factories/IERC165Upgradeable__factory.js +0 -38
- package/dist/typechain-types/factories/ISafeMock__factory.d.ts +0 -22
- package/dist/typechain-types/factories/ISafeMock__factory.js +0 -114
- package/dist/typechain-types/factories/Initializable__factory.d.ts +0 -18
- package/dist/typechain-types/factories/Initializable__factory.js +0 -32
- package/dist/typechain-types/factories/OwnableUpgradeable__factory.d.ts +0 -42
- package/dist/typechain-types/factories/OwnableUpgradeable__factory.js +0 -84
- package/dist/typechain-types/factories/SafeMock__factory.d.ts +0 -56
- package/dist/typechain-types/factories/SafeMock__factory.js +0 -247
|
@@ -1,49 +1,137 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ContractFactory, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
|
|
3
|
+
import type { NonPayableOverrides } from "../common";
|
|
3
4
|
import type { ProxyAdmin, ProxyAdminInterface } from "../ProxyAdmin";
|
|
4
5
|
type ProxyAdminConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
|
|
5
6
|
export declare class ProxyAdmin__factory extends ContractFactory {
|
|
6
7
|
constructor(...args: ProxyAdminConstructorParams);
|
|
7
|
-
|
|
8
|
-
from?: string
|
|
9
|
-
}): Promise<
|
|
10
|
-
|
|
11
|
-
from?: string
|
|
12
|
-
}):
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
readonly contractName: "ProxyAdmin";
|
|
8
|
+
getDeployTransaction(overrides?: NonPayableOverrides & {
|
|
9
|
+
from?: string;
|
|
10
|
+
}): Promise<ContractDeployTransaction>;
|
|
11
|
+
deploy(overrides?: NonPayableOverrides & {
|
|
12
|
+
from?: string;
|
|
13
|
+
}): Promise<ProxyAdmin & {
|
|
14
|
+
deploymentTransaction(): ContractTransactionResponse;
|
|
15
|
+
}>;
|
|
16
|
+
connect(runner: ContractRunner | null): ProxyAdmin__factory;
|
|
17
17
|
static readonly bytecode = "0x608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61069a8061007e6000396000f3fe60806040526004361061007b5760003560e01c80639623609d1161004e5780639623609d1461011157806399a88ec414610124578063f2fde38b14610144578063f3b7dead1461016457600080fd5b8063204e1c7a14610080578063715018a6146100bc5780637eff275e146100d35780638da5cb5b146100f3575b600080fd5b34801561008c57600080fd5b506100a061009b366004610499565b610184565b6040516001600160a01b03909116815260200160405180910390f35b3480156100c857600080fd5b506100d1610215565b005b3480156100df57600080fd5b506100d16100ee3660046104bd565b610229565b3480156100ff57600080fd5b506000546001600160a01b03166100a0565b6100d161011f36600461050c565b610291565b34801561013057600080fd5b506100d161013f3660046104bd565b610300565b34801561015057600080fd5b506100d161015f366004610499565b610336565b34801561017057600080fd5b506100a061017f366004610499565b6103b4565b6000806000836001600160a01b03166040516101aa90635c60da1b60e01b815260040190565b600060405180830381855afa9150503d80600081146101e5576040519150601f19603f3d011682016040523d82523d6000602084013e6101ea565b606091505b5091509150816101f957600080fd5b8080602001905181019061020d91906105e2565b949350505050565b61021d6103da565b6102276000610434565b565b6102316103da565b6040516308f2839760e41b81526001600160a01b038281166004830152831690638f283970906024015b600060405180830381600087803b15801561027557600080fd5b505af1158015610289573d6000803e3d6000fd5b505050505050565b6102996103da565b60405163278f794360e11b81526001600160a01b03841690634f1ef2869034906102c990869086906004016105ff565b6000604051808303818588803b1580156102e257600080fd5b505af11580156102f6573d6000803e3d6000fd5b5050505050505050565b6103086103da565b604051631b2ce7f360e11b81526001600160a01b038281166004830152831690633659cfe69060240161025b565b61033e6103da565b6001600160a01b0381166103a85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6103b181610434565b50565b6000806000836001600160a01b03166040516101aa906303e1469160e61b815260040190565b6000546001600160a01b031633146102275760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146103b157600080fd5b6000602082840312156104ab57600080fd5b81356104b681610484565b9392505050565b600080604083850312156104d057600080fd5b82356104db81610484565b915060208301356104eb81610484565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060006060848603121561052157600080fd5b833561052c81610484565b9250602084013561053c81610484565b9150604084013567ffffffffffffffff8082111561055957600080fd5b818601915086601f83011261056d57600080fd5b81358181111561057f5761057f6104f6565b604051601f8201601f19908116603f011681019083821181831017156105a7576105a76104f6565b816040528281528960208487010111156105c057600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b6000602082840312156105f457600080fd5b81516104b681610484565b60018060a01b038316815260006020604081840152835180604085015260005b8181101561063b5785810183015185820160600152820161061f565b8181111561064d576000606083870101525b50601f01601f19169290920160600194935050505056fea26469706673582212207ad53e1008cce369999f6b5f2f77109510b404ff1de9b47b639981fd68e6239264736f6c63430008090033";
|
|
18
|
-
static readonly abi:
|
|
19
|
-
anonymous:
|
|
20
|
-
inputs: {
|
|
21
|
-
indexed:
|
|
22
|
-
internalType:
|
|
23
|
-
name:
|
|
24
|
-
type:
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
18
|
+
static readonly abi: readonly [{
|
|
19
|
+
readonly anonymous: false;
|
|
20
|
+
readonly inputs: readonly [{
|
|
21
|
+
readonly indexed: true;
|
|
22
|
+
readonly internalType: "address";
|
|
23
|
+
readonly name: "previousOwner";
|
|
24
|
+
readonly type: "address";
|
|
25
|
+
}, {
|
|
26
|
+
readonly indexed: true;
|
|
27
|
+
readonly internalType: "address";
|
|
28
|
+
readonly name: "newOwner";
|
|
29
|
+
readonly type: "address";
|
|
30
|
+
}];
|
|
31
|
+
readonly name: "OwnershipTransferred";
|
|
32
|
+
readonly type: "event";
|
|
33
|
+
}, {
|
|
34
|
+
readonly inputs: readonly [{
|
|
35
|
+
readonly internalType: "contract ITransparentUpgradeableProxy";
|
|
36
|
+
readonly name: "proxy";
|
|
37
|
+
readonly type: "address";
|
|
38
|
+
}, {
|
|
39
|
+
readonly internalType: "address";
|
|
40
|
+
readonly name: "newAdmin";
|
|
41
|
+
readonly type: "address";
|
|
42
|
+
}];
|
|
43
|
+
readonly name: "changeProxyAdmin";
|
|
44
|
+
readonly outputs: readonly [];
|
|
45
|
+
readonly stateMutability: "nonpayable";
|
|
46
|
+
readonly type: "function";
|
|
47
|
+
}, {
|
|
48
|
+
readonly inputs: readonly [{
|
|
49
|
+
readonly internalType: "contract ITransparentUpgradeableProxy";
|
|
50
|
+
readonly name: "proxy";
|
|
51
|
+
readonly type: "address";
|
|
52
|
+
}];
|
|
53
|
+
readonly name: "getProxyAdmin";
|
|
54
|
+
readonly outputs: readonly [{
|
|
55
|
+
readonly internalType: "address";
|
|
56
|
+
readonly name: "";
|
|
57
|
+
readonly type: "address";
|
|
58
|
+
}];
|
|
59
|
+
readonly stateMutability: "view";
|
|
60
|
+
readonly type: "function";
|
|
61
|
+
}, {
|
|
62
|
+
readonly inputs: readonly [{
|
|
63
|
+
readonly internalType: "contract ITransparentUpgradeableProxy";
|
|
64
|
+
readonly name: "proxy";
|
|
65
|
+
readonly type: "address";
|
|
66
|
+
}];
|
|
67
|
+
readonly name: "getProxyImplementation";
|
|
68
|
+
readonly outputs: readonly [{
|
|
69
|
+
readonly internalType: "address";
|
|
70
|
+
readonly name: "";
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
}];
|
|
73
|
+
readonly stateMutability: "view";
|
|
74
|
+
readonly type: "function";
|
|
75
|
+
}, {
|
|
76
|
+
readonly inputs: readonly [];
|
|
77
|
+
readonly name: "owner";
|
|
78
|
+
readonly outputs: readonly [{
|
|
79
|
+
readonly internalType: "address";
|
|
80
|
+
readonly name: "";
|
|
81
|
+
readonly type: "address";
|
|
82
|
+
}];
|
|
83
|
+
readonly stateMutability: "view";
|
|
84
|
+
readonly type: "function";
|
|
85
|
+
}, {
|
|
86
|
+
readonly inputs: readonly [];
|
|
87
|
+
readonly name: "renounceOwnership";
|
|
88
|
+
readonly outputs: readonly [];
|
|
89
|
+
readonly stateMutability: "nonpayable";
|
|
90
|
+
readonly type: "function";
|
|
91
|
+
}, {
|
|
92
|
+
readonly inputs: readonly [{
|
|
93
|
+
readonly internalType: "address";
|
|
94
|
+
readonly name: "newOwner";
|
|
95
|
+
readonly type: "address";
|
|
96
|
+
}];
|
|
97
|
+
readonly name: "transferOwnership";
|
|
98
|
+
readonly outputs: readonly [];
|
|
99
|
+
readonly stateMutability: "nonpayable";
|
|
100
|
+
readonly type: "function";
|
|
101
|
+
}, {
|
|
102
|
+
readonly inputs: readonly [{
|
|
103
|
+
readonly internalType: "contract ITransparentUpgradeableProxy";
|
|
104
|
+
readonly name: "proxy";
|
|
105
|
+
readonly type: "address";
|
|
106
|
+
}, {
|
|
107
|
+
readonly internalType: "address";
|
|
108
|
+
readonly name: "implementation";
|
|
109
|
+
readonly type: "address";
|
|
110
|
+
}];
|
|
111
|
+
readonly name: "upgrade";
|
|
112
|
+
readonly outputs: readonly [];
|
|
113
|
+
readonly stateMutability: "nonpayable";
|
|
114
|
+
readonly type: "function";
|
|
115
|
+
}, {
|
|
116
|
+
readonly inputs: readonly [{
|
|
117
|
+
readonly internalType: "contract ITransparentUpgradeableProxy";
|
|
118
|
+
readonly name: "proxy";
|
|
119
|
+
readonly type: "address";
|
|
120
|
+
}, {
|
|
121
|
+
readonly internalType: "address";
|
|
122
|
+
readonly name: "implementation";
|
|
123
|
+
readonly type: "address";
|
|
124
|
+
}, {
|
|
125
|
+
readonly internalType: "bytes";
|
|
126
|
+
readonly name: "data";
|
|
127
|
+
readonly type: "bytes";
|
|
128
|
+
}];
|
|
129
|
+
readonly name: "upgradeAndCall";
|
|
130
|
+
readonly outputs: readonly [];
|
|
131
|
+
readonly stateMutability: "payable";
|
|
132
|
+
readonly type: "function";
|
|
133
|
+
}];
|
|
46
134
|
static createInterface(): ProxyAdminInterface;
|
|
47
|
-
static connect(address: string,
|
|
135
|
+
static connect(address: string, runner?: ContractRunner | null): ProxyAdmin;
|
|
48
136
|
}
|
|
49
137
|
export {};
|
|
@@ -166,27 +166,24 @@ class ProxyAdmin__factory extends ethers_1.ContractFactory {
|
|
|
166
166
|
else {
|
|
167
167
|
super(_abi, _bytecode, args[0]);
|
|
168
168
|
}
|
|
169
|
-
this.contractName = "ProxyAdmin";
|
|
170
|
-
}
|
|
171
|
-
deploy(overrides) {
|
|
172
|
-
return super.deploy(overrides || {});
|
|
173
169
|
}
|
|
174
170
|
getDeployTransaction(overrides) {
|
|
175
171
|
return super.getDeployTransaction(overrides || {});
|
|
176
172
|
}
|
|
177
|
-
|
|
178
|
-
return super.
|
|
173
|
+
deploy(overrides) {
|
|
174
|
+
return super.deploy(overrides || {});
|
|
179
175
|
}
|
|
180
|
-
connect(
|
|
181
|
-
return super.connect(
|
|
176
|
+
connect(runner) {
|
|
177
|
+
return super.connect(runner);
|
|
182
178
|
}
|
|
183
179
|
static createInterface() {
|
|
184
|
-
return new ethers_1.
|
|
180
|
+
return new ethers_1.Interface(_abi);
|
|
185
181
|
}
|
|
186
|
-
static connect(address,
|
|
187
|
-
return new ethers_1.Contract(address, _abi,
|
|
182
|
+
static connect(address, runner) {
|
|
183
|
+
return new ethers_1.Contract(address, _abi, runner);
|
|
188
184
|
}
|
|
189
185
|
}
|
|
190
186
|
exports.ProxyAdmin__factory = ProxyAdmin__factory;
|
|
191
187
|
ProxyAdmin__factory.bytecode = _bytecode;
|
|
192
188
|
ProxyAdmin__factory.abi = _abi;
|
|
189
|
+
//# sourceMappingURL=ProxyAdmin__factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProxyAdmin__factory.js","sourceRoot":"","sources":["../../../typechain-types/factories/ProxyAdmin__factory.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProxyAdmin__factory = exports.AdminUpgradeabilityProxy__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
var AdminUpgradeabilityProxy__factory_1 = require("./AdminUpgradeabilityProxy__factory");
|
|
8
|
+
Object.defineProperty(exports, "AdminUpgradeabilityProxy__factory", { enumerable: true, get: function () { return AdminUpgradeabilityProxy__factory_1.AdminUpgradeabilityProxy__factory; } });
|
|
9
|
+
var ProxyAdmin__factory_1 = require("./ProxyAdmin__factory");
|
|
10
|
+
Object.defineProperty(exports, "ProxyAdmin__factory", { enumerable: true, get: function () { return ProxyAdmin__factory_1.ProxyAdmin__factory; } });
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../typechain-types/factories/index.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,oBAAoB;AACpB,oBAAoB;AACpB,yFAAwF;AAA/E,sJAAA,iCAAiC,OAAA;AAC1C,6DAA4D;AAAnD,0HAAA,mBAAmB,OAAA"}
|
|
@@ -1,26 +1,5 @@
|
|
|
1
|
-
export type { AccessControlEnumerableUpgradeable } from "./AccessControlEnumerableUpgradeable";
|
|
2
|
-
export type { AccessControlUpgradeable } from "./AccessControlUpgradeable";
|
|
3
|
-
export type { IAccessControlEnumerableUpgradeable } from "./IAccessControlEnumerableUpgradeable";
|
|
4
|
-
export type { IAccessControlUpgradeable } from "./IAccessControlUpgradeable";
|
|
5
|
-
export type { OwnableUpgradeable } from "./OwnableUpgradeable";
|
|
6
|
-
export type { Initializable } from "./Initializable";
|
|
7
|
-
export type { ContextUpgradeable } from "./ContextUpgradeable";
|
|
8
|
-
export type { ERC165Upgradeable } from "./ERC165Upgradeable";
|
|
9
|
-
export type { IERC165Upgradeable } from "./IERC165Upgradeable";
|
|
10
|
-
export type { ISafeMock } from "./ISafeMock";
|
|
11
|
-
export type { SafeMock } from "./SafeMock";
|
|
12
1
|
export type { AdminUpgradeabilityProxy } from "./AdminUpgradeabilityProxy";
|
|
13
2
|
export type { ProxyAdmin } from "./ProxyAdmin";
|
|
14
|
-
export
|
|
15
|
-
export { AccessControlUpgradeable__factory } from "./factories/AccessControlUpgradeable__factory";
|
|
16
|
-
export { IAccessControlEnumerableUpgradeable__factory } from "./factories/IAccessControlEnumerableUpgradeable__factory";
|
|
17
|
-
export { IAccessControlUpgradeable__factory } from "./factories/IAccessControlUpgradeable__factory";
|
|
18
|
-
export { OwnableUpgradeable__factory } from "./factories/OwnableUpgradeable__factory";
|
|
19
|
-
export { Initializable__factory } from "./factories/Initializable__factory";
|
|
20
|
-
export { ContextUpgradeable__factory } from "./factories/ContextUpgradeable__factory";
|
|
21
|
-
export { ERC165Upgradeable__factory } from "./factories/ERC165Upgradeable__factory";
|
|
22
|
-
export { IERC165Upgradeable__factory } from "./factories/IERC165Upgradeable__factory";
|
|
23
|
-
export { ISafeMock__factory } from "./factories/ISafeMock__factory";
|
|
24
|
-
export { SafeMock__factory } from "./factories/SafeMock__factory";
|
|
3
|
+
export * as factories from "./factories";
|
|
25
4
|
export { AdminUpgradeabilityProxy__factory } from "./factories/AdminUpgradeabilityProxy__factory";
|
|
26
5
|
export { ProxyAdmin__factory } from "./factories/ProxyAdmin__factory";
|
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProxyAdmin__factory = exports.AdminUpgradeabilityProxy__factory = exports.
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "AccessControlEnumerableUpgradeable__factory", { enumerable: true, get: function () { return AccessControlEnumerableUpgradeable__factory_1.AccessControlEnumerableUpgradeable__factory; } });
|
|
6
|
-
var AccessControlUpgradeable__factory_1 = require("./factories/AccessControlUpgradeable__factory");
|
|
7
|
-
Object.defineProperty(exports, "AccessControlUpgradeable__factory", { enumerable: true, get: function () { return AccessControlUpgradeable__factory_1.AccessControlUpgradeable__factory; } });
|
|
8
|
-
var IAccessControlEnumerableUpgradeable__factory_1 = require("./factories/IAccessControlEnumerableUpgradeable__factory");
|
|
9
|
-
Object.defineProperty(exports, "IAccessControlEnumerableUpgradeable__factory", { enumerable: true, get: function () { return IAccessControlEnumerableUpgradeable__factory_1.IAccessControlEnumerableUpgradeable__factory; } });
|
|
10
|
-
var IAccessControlUpgradeable__factory_1 = require("./factories/IAccessControlUpgradeable__factory");
|
|
11
|
-
Object.defineProperty(exports, "IAccessControlUpgradeable__factory", { enumerable: true, get: function () { return IAccessControlUpgradeable__factory_1.IAccessControlUpgradeable__factory; } });
|
|
12
|
-
var OwnableUpgradeable__factory_1 = require("./factories/OwnableUpgradeable__factory");
|
|
13
|
-
Object.defineProperty(exports, "OwnableUpgradeable__factory", { enumerable: true, get: function () { return OwnableUpgradeable__factory_1.OwnableUpgradeable__factory; } });
|
|
14
|
-
var Initializable__factory_1 = require("./factories/Initializable__factory");
|
|
15
|
-
Object.defineProperty(exports, "Initializable__factory", { enumerable: true, get: function () { return Initializable__factory_1.Initializable__factory; } });
|
|
16
|
-
var ContextUpgradeable__factory_1 = require("./factories/ContextUpgradeable__factory");
|
|
17
|
-
Object.defineProperty(exports, "ContextUpgradeable__factory", { enumerable: true, get: function () { return ContextUpgradeable__factory_1.ContextUpgradeable__factory; } });
|
|
18
|
-
var ERC165Upgradeable__factory_1 = require("./factories/ERC165Upgradeable__factory");
|
|
19
|
-
Object.defineProperty(exports, "ERC165Upgradeable__factory", { enumerable: true, get: function () { return ERC165Upgradeable__factory_1.ERC165Upgradeable__factory; } });
|
|
20
|
-
var IERC165Upgradeable__factory_1 = require("./factories/IERC165Upgradeable__factory");
|
|
21
|
-
Object.defineProperty(exports, "IERC165Upgradeable__factory", { enumerable: true, get: function () { return IERC165Upgradeable__factory_1.IERC165Upgradeable__factory; } });
|
|
22
|
-
var ISafeMock__factory_1 = require("./factories/ISafeMock__factory");
|
|
23
|
-
Object.defineProperty(exports, "ISafeMock__factory", { enumerable: true, get: function () { return ISafeMock__factory_1.ISafeMock__factory; } });
|
|
24
|
-
var SafeMock__factory_1 = require("./factories/SafeMock__factory");
|
|
25
|
-
Object.defineProperty(exports, "SafeMock__factory", { enumerable: true, get: function () { return SafeMock__factory_1.SafeMock__factory; } });
|
|
36
|
+
exports.ProxyAdmin__factory = exports.AdminUpgradeabilityProxy__factory = exports.factories = void 0;
|
|
37
|
+
exports.factories = __importStar(require("./factories"));
|
|
26
38
|
var AdminUpgradeabilityProxy__factory_1 = require("./factories/AdminUpgradeabilityProxy__factory");
|
|
27
39
|
Object.defineProperty(exports, "AdminUpgradeabilityProxy__factory", { enumerable: true, get: function () { return AdminUpgradeabilityProxy__factory_1.AdminUpgradeabilityProxy__factory; } });
|
|
28
40
|
var ProxyAdmin__factory_1 = require("./factories/ProxyAdmin__factory");
|
|
29
41
|
Object.defineProperty(exports, "ProxyAdmin__factory", { enumerable: true, get: function () { return ProxyAdmin__factory_1.ProxyAdmin__factory; } });
|
|
42
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../typechain-types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,yDAAyC;AACzC,mGAAkG;AAAzF,sJAAA,iCAAiC,OAAA;AAC1C,uEAAsE;AAA7D,0HAAA,mBAAmB,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skalenetwork/upgrade-tools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-update-verify.1",
|
|
4
4
|
"description": "Scripts to support upgrades of smart contracts",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**/*"
|
|
@@ -10,50 +10,46 @@
|
|
|
10
10
|
"repository": "git@github.com:skalenetwork/upgrade-tools.git",
|
|
11
11
|
"author": "Dmytro Stebaiev <dmytro@skalelabs.com>",
|
|
12
12
|
"license": "AGPL-3.0",
|
|
13
|
-
"
|
|
13
|
+
"packageManager": "yarn@3.5.1",
|
|
14
14
|
"scripts": {
|
|
15
|
-
"prepare": "yarn hooks",
|
|
15
|
+
"prepare": "yarn hooks && yarn install-peers",
|
|
16
16
|
"compile": "npx hardhat typechain && tsc",
|
|
17
17
|
"prepublishOnly": "yarn compile",
|
|
18
18
|
"install-peers": "install-peers -f",
|
|
19
19
|
"hooks": "git config core.hooksPath .githooks || true",
|
|
20
20
|
"no-hooks": "git config core.hooksPath .git/hooks",
|
|
21
|
-
"fullCheck": "yarn compile && yarn
|
|
22
|
-
"lint": "npx solhint \"contracts/**/*.sol\"",
|
|
23
|
-
"slither": "slither .",
|
|
21
|
+
"fullCheck": "yarn compile && yarn eslint && yarn cspell",
|
|
24
22
|
"eslint": "npx eslint .",
|
|
25
23
|
"cspell": "npx cspell \"**/*\""
|
|
26
24
|
},
|
|
27
25
|
"devDependencies": {
|
|
26
|
+
"@openzeppelin/contracts-upgradeable": "^4.4.2",
|
|
28
27
|
"@tsconfig/recommended": "^1.0.2",
|
|
29
|
-
"@typechain/ethers-
|
|
30
|
-
"@typechain/hardhat": "^
|
|
31
|
-
"@
|
|
28
|
+
"@typechain/ethers-v6": "^0.5.1",
|
|
29
|
+
"@typechain/hardhat": "^9.1.0",
|
|
30
|
+
"@types/node": "^22.5.0",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
|
32
32
|
"@typescript-eslint/parser": "^6.6.0",
|
|
33
|
-
"cspell": "^
|
|
33
|
+
"cspell": "^8.8.3",
|
|
34
34
|
"eslint": "^8.15.0",
|
|
35
35
|
"install-peers-cli": "^2.2.0",
|
|
36
|
-
"solhint": "^3.3.7",
|
|
37
36
|
"ts-node": "^10.5.0",
|
|
38
|
-
"typechain": "^8.2
|
|
37
|
+
"typechain": "^8.3.2",
|
|
39
38
|
"typescript": "^5.1.6"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@safe-global/safe-core-sdk-types": "^2.2.0",
|
|
46
|
-
"@skalenetwork/skale-contracts-ethers-v5": "0.1.0-develop.0",
|
|
47
|
-
"axios": "^1.4.0",
|
|
48
|
-
"ethereumjs-util": "^7.1.4"
|
|
49
|
-
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"@nomicfoundation/hardhat-verify": "^1.1.1",
|
|
52
|
-
"@nomiclabs/hardhat-ethers": "^2.0.4",
|
|
53
|
-
"@openzeppelin/hardhat-upgrades": "^1.14.0",
|
|
41
|
+
"@nomicfoundation/hardhat-ethers": "^3.0.0",
|
|
42
|
+
"@nomicfoundation/hardhat-verify": "2.0.14",
|
|
43
|
+
"@openzeppelin/hardhat-upgrades": "^3.1.1",
|
|
54
44
|
"@openzeppelin/upgrades-core": "^1.27.1",
|
|
45
|
+
"@safe-global/api-kit": "^2.4.1",
|
|
46
|
+
"@safe-global/protocol-kit": "^5.0.1",
|
|
47
|
+
"@safe-global/safe-core-sdk-types": "^5.0.1",
|
|
48
|
+
"@skalenetwork/skale-contracts-ethers-v6": "^2.0.0-develop.1",
|
|
55
49
|
"@types/mocha": "^9.1.0",
|
|
56
|
-
"
|
|
57
|
-
"
|
|
50
|
+
"axios": "^1.4.0",
|
|
51
|
+
"ethereumjs-util": "^7.1.4",
|
|
52
|
+
"hardhat": "^2.9.9",
|
|
53
|
+
"semaphore-async-await": "^1.5.1"
|
|
58
54
|
}
|
|
59
|
-
}
|
|
55
|
+
}
|
package/dist/src/multiSend.d.ts
DELETED
package/dist/src/multiSend.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.encodeTransaction = void 0;
|
|
4
|
-
const ethers_1 = require("ethers");
|
|
5
|
-
function padWithZeros(value, targetLength) {
|
|
6
|
-
return ("0".repeat(targetLength) + value).slice(-targetLength);
|
|
7
|
-
}
|
|
8
|
-
function encodeTransaction(operation, to, value, data) {
|
|
9
|
-
/// operation as a uint8 with 0 for a call or 1 for a delegatecall (=> 1 byte),
|
|
10
|
-
/// to as a address (=> 20 bytes),
|
|
11
|
-
/// value as a uint256 (=> 32 bytes),
|
|
12
|
-
/// data length as a uint256 (=> 32 bytes),
|
|
13
|
-
/// data as bytes.
|
|
14
|
-
let _operation;
|
|
15
|
-
if (operation === 0) {
|
|
16
|
-
_operation = "00";
|
|
17
|
-
}
|
|
18
|
-
else if (operation === 1) {
|
|
19
|
-
_operation = "01";
|
|
20
|
-
}
|
|
21
|
-
else {
|
|
22
|
-
throw Error(`Operation has an incorrect value`);
|
|
23
|
-
}
|
|
24
|
-
let _to = to;
|
|
25
|
-
if (to.startsWith("0x")) {
|
|
26
|
-
_to = _to.slice(2);
|
|
27
|
-
}
|
|
28
|
-
_to = padWithZeros(_to, 20 * 2);
|
|
29
|
-
const _value = padWithZeros(ethers_1.BigNumber.from(value).toHexString().slice(2), 32 * 2);
|
|
30
|
-
let _data = data;
|
|
31
|
-
if (data.startsWith("0x")) {
|
|
32
|
-
_data = _data.slice(2);
|
|
33
|
-
}
|
|
34
|
-
if (_data.length % 2 !== 0) {
|
|
35
|
-
_data = "0" + _data;
|
|
36
|
-
}
|
|
37
|
-
const _dataLength = padWithZeros((_data.length / 2).toString(16), 32 * 2);
|
|
38
|
-
return "0x" + [
|
|
39
|
-
_operation,
|
|
40
|
-
_to,
|
|
41
|
-
_value,
|
|
42
|
-
_dataLength,
|
|
43
|
-
_data,
|
|
44
|
-
].join("");
|
|
45
|
-
}
|
|
46
|
-
exports.encodeTransaction = encodeTransaction;
|