@skalenetwork/upgrade-tools 2.0.0-refactor.8 → 3.0.0-skale-contracts.0
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/README.md +66 -11
- package/dist/hardhat.config.js +1 -0
- package/dist/src/deploy.js +44 -63
- package/dist/src/gnosis-safe.d.ts +2 -2
- package/dist/src/gnosis-safe.js +129 -103
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/submitters/auto-submitter.d.ts +7 -2
- package/dist/src/submitters/auto-submitter.js +145 -21
- package/dist/src/submitters/eoa-submitter.js +14 -25
- package/dist/src/submitters/index.d.ts +6 -0
- package/dist/src/submitters/index.js +22 -0
- package/dist/src/submitters/safe-ima-legacy-marionette-submitter.js +16 -28
- package/dist/src/submitters/safe-ima-marionette-submitter.d.ts +7 -0
- package/dist/src/submitters/safe-ima-marionette-submitter.js +66 -0
- package/dist/src/submitters/safe-submitter.js +16 -27
- package/dist/src/submitters/safe-to-ima-submitter.d.ts +6 -4
- package/dist/src/submitters/safe-to-ima-submitter.js +19 -27
- package/dist/src/submitters/types/marionette.d.ts +13 -0
- package/dist/src/submitters/types/marionette.js +4 -0
- package/dist/src/upgrader.d.ts +3 -4
- package/dist/src/upgrader.js +81 -101
- package/dist/src/verification.js +23 -36
- package/dist/src/version.js +11 -22
- package/dist/typechain-types/AccessControlEnumerableUpgradeable.d.ts +9 -9
- package/dist/typechain-types/AccessControlUpgradeable.d.ts +9 -9
- package/dist/typechain-types/AdminUpgradeabilityProxy.d.ts +14 -99
- package/dist/typechain-types/ContextUpgradeable.d.ts +3 -3
- package/dist/typechain-types/ERC165Upgradeable.d.ts +3 -3
- package/dist/typechain-types/IAccessControlEnumerableUpgradeable.d.ts +7 -7
- package/dist/typechain-types/IAccessControlUpgradeable.d.ts +7 -7
- package/dist/typechain-types/IERC165Upgradeable.d.ts +1 -1
- package/dist/typechain-types/ISafeMock.d.ts +1 -1
- package/dist/typechain-types/Initializable.d.ts +3 -3
- package/dist/typechain-types/OwnableUpgradeable.d.ts +5 -5
- package/dist/typechain-types/ProxyAdmin.d.ts +3 -3
- package/dist/typechain-types/SafeMock.d.ts +5 -5
- package/dist/typechain-types/common.d.ts +4 -4
- package/dist/typechain-types/factories/AdminUpgradeabilityProxy__factory.d.ts +2 -27
- package/dist/typechain-types/factories/AdminUpgradeabilityProxy__factory.js +1 -71
- package/dist/typechain-types/factories/ProxyAdmin__factory.d.ts +2 -2
- package/dist/typechain-types/factories/ProxyAdmin__factory.js +6 -6
- package/dist/typechain-types/factories/SafeMock__factory.d.ts +1 -1
- package/package.json +8 -7
- package/dist/src/types/SkaleABIFile.d.ts +0 -3
- package/dist/src/types/SkaleABIFile.js +0 -2
- package/dist/src/upgrade.d.ts +0 -8
- package/dist/src/upgrade.js +0 -234
package/dist/src/upgrader.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -21,120 +12,109 @@ const version_1 = require("./version");
|
|
|
21
12
|
const fs_1 = require("fs");
|
|
22
13
|
const deploy_1 = require("./deploy");
|
|
23
14
|
const upgrades_core_1 = require("@openzeppelin/upgrades-core");
|
|
24
|
-
const abi_1 = require("./abi");
|
|
25
15
|
const verification_1 = require("./verification");
|
|
26
16
|
const auto_submitter_1 = require("./submitters/auto-submitter");
|
|
27
17
|
class Upgrader {
|
|
28
|
-
constructor(projectName, targetVersion,
|
|
18
|
+
constructor(projectName, targetVersion, instance, contractNamesToUpgrade, submitter = new auto_submitter_1.AutoSubmitter()) {
|
|
29
19
|
// protected
|
|
30
20
|
this.deployNewContracts = () => { return Promise.resolve(); };
|
|
31
21
|
this.initialize = () => { return Promise.resolve(); };
|
|
32
22
|
this.targetVersion = targetVersion;
|
|
33
|
-
this.
|
|
23
|
+
this.instance = instance;
|
|
34
24
|
this.contractNamesToUpgrade = contractNamesToUpgrade;
|
|
35
25
|
this.projectName = projectName;
|
|
36
26
|
this.transactions = [];
|
|
37
27
|
this.submitter = submitter;
|
|
38
28
|
}
|
|
39
29
|
// public
|
|
40
|
-
upgrade() {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (deployedVersion) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
process.exit(1);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
console.log(chalk_1.default.yellow(`Can't check currently deployed version of ${this.projectName}`));
|
|
30
|
+
async upgrade() {
|
|
31
|
+
const proxyAdmin = await (0, admin_1.getManifestAdmin)(hardhat_1.default);
|
|
32
|
+
const deployedVersion = await this.getDeployedVersion();
|
|
33
|
+
const version = await (0, version_1.getVersion)();
|
|
34
|
+
if (deployedVersion) {
|
|
35
|
+
if (deployedVersion !== this.targetVersion) {
|
|
36
|
+
console.log(chalk_1.default.red(`This script can't upgrade version ${deployedVersion} to ${version}`));
|
|
37
|
+
process.exit(1);
|
|
53
38
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
console.log(chalk_1.default.yellow(`Can't check currently deployed version of ${this.projectName}`));
|
|
42
|
+
}
|
|
43
|
+
console.log(`Will mark updated version as ${version}`);
|
|
44
|
+
// Deploy new contracts
|
|
45
|
+
await this.deployNewContracts();
|
|
46
|
+
// Deploy new implementations
|
|
47
|
+
const contractsToUpgrade = [];
|
|
48
|
+
for (const contract of this.contractNamesToUpgrade) {
|
|
49
|
+
const contractFactory = await this._getContractFactoryAndUpdateManifest(contract);
|
|
50
|
+
const proxyAddress = (await this.instance.getContract(contract)).address;
|
|
51
|
+
console.log(`Prepare upgrade of ${contract}`);
|
|
52
|
+
const newImplementationAddress = await hardhat_2.upgrades.prepareUpgrade(proxyAddress, contractFactory, {
|
|
53
|
+
unsafeAllowLinkedLibraries: true,
|
|
54
|
+
unsafeAllowRenames: true
|
|
55
|
+
});
|
|
56
|
+
const currentImplementationAddress = await (0, upgrades_core_1.getImplementationAddress)(hardhat_2.network.provider, proxyAddress);
|
|
57
|
+
if (newImplementationAddress !== currentImplementationAddress) {
|
|
58
|
+
contractsToUpgrade.push({
|
|
59
|
+
proxyAddress,
|
|
60
|
+
implementationAddress: newImplementationAddress,
|
|
61
|
+
name: contract
|
|
66
62
|
});
|
|
67
|
-
|
|
68
|
-
if (newImplementationAddress !== currentImplementationAddress) {
|
|
69
|
-
contractsToUpgrade.push({
|
|
70
|
-
proxyAddress,
|
|
71
|
-
implementationAddress: newImplementationAddress,
|
|
72
|
-
name: contract,
|
|
73
|
-
abi: (0, abi_1.getAbi)(contractFactory.interface)
|
|
74
|
-
});
|
|
75
|
-
yield (0, verification_1.verify)(contract, newImplementationAddress, []);
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
console.log(chalk_1.default.gray(`Contract ${contract} is up to date`));
|
|
79
|
-
}
|
|
63
|
+
await (0, verification_1.verify)(contract, newImplementationAddress, []);
|
|
80
64
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
console.log(chalk_1.default.yellowBright(`Prepare transaction to upgrade ${contract.name} at ${contract.proxyAddress} to ${contract.implementationAddress}`));
|
|
84
|
-
this.transactions.push({
|
|
85
|
-
to: proxyAdmin.address,
|
|
86
|
-
data: proxyAdmin.interface.encodeFunctionData("upgrade", [contract.proxyAddress, contract.implementationAddress])
|
|
87
|
-
});
|
|
88
|
-
this.abi[this._getContractKeyInAbiFile(contract.name) + "_abi"] = contract.abi;
|
|
65
|
+
else {
|
|
66
|
+
console.log(chalk_1.default.gray(`Contract ${contract} is up to date`));
|
|
89
67
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
68
|
+
}
|
|
69
|
+
// Switch proxies to new implementations
|
|
70
|
+
for (const contract of contractsToUpgrade) {
|
|
71
|
+
console.log(chalk_1.default.yellowBright(`Prepare transaction to upgrade ${contract.name} at ${contract.proxyAddress} to ${contract.implementationAddress}`));
|
|
72
|
+
this.transactions.push({
|
|
73
|
+
to: proxyAdmin.address,
|
|
74
|
+
data: proxyAdmin.interface.encodeFunctionData("upgrade", [contract.proxyAddress, contract.implementationAddress])
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
await this.initialize();
|
|
78
|
+
// write version
|
|
79
|
+
await this.setVersion(version);
|
|
80
|
+
await fs_1.promises.writeFile(`data/transactions-${version}-${hardhat_2.network.name}.json`, JSON.stringify(this.transactions, null, 4));
|
|
81
|
+
await this.submitter.submit(this.transactions);
|
|
82
|
+
console.log("Done");
|
|
98
83
|
}
|
|
99
84
|
// private
|
|
100
|
-
_getContractFactoryAndUpdateManifest(contract) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
85
|
+
async _getContractFactoryAndUpdateManifest(contract) {
|
|
86
|
+
const manifest = JSON.parse(await fs_1.promises.readFile(await (0, deploy_1.getManifestFile)(), "utf-8"));
|
|
87
|
+
const { linkReferences } = await hardhat_2.artifacts.readArtifact(contract);
|
|
88
|
+
if (!Object.keys(linkReferences).length)
|
|
89
|
+
return await hardhat_2.ethers.getContractFactory(contract);
|
|
90
|
+
const librariesToUpgrade = [];
|
|
91
|
+
const oldLibraries = {};
|
|
92
|
+
if (manifest.libraries === undefined) {
|
|
93
|
+
Object.assign(manifest, { libraries: {} });
|
|
94
|
+
}
|
|
95
|
+
for (const key of Object.keys(linkReferences)) {
|
|
96
|
+
const libraryName = Object.keys(linkReferences[key])[0];
|
|
97
|
+
const { bytecode } = await hardhat_2.artifacts.readArtifact(libraryName);
|
|
98
|
+
if (manifest.libraries[libraryName] === undefined) {
|
|
99
|
+
librariesToUpgrade.push(libraryName);
|
|
100
|
+
continue;
|
|
110
101
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
if (manifest.libraries[libraryName] === undefined) {
|
|
115
|
-
librariesToUpgrade.push(libraryName);
|
|
116
|
-
continue;
|
|
117
|
-
}
|
|
118
|
-
const libraryBytecodeHash = manifest.libraries[libraryName].bytecodeHash;
|
|
119
|
-
if ((0, upgrades_core_1.hashBytecode)(bytecode) !== libraryBytecodeHash) {
|
|
120
|
-
librariesToUpgrade.push(libraryName);
|
|
121
|
-
}
|
|
122
|
-
else {
|
|
123
|
-
oldLibraries[libraryName] = manifest.libraries[libraryName].address;
|
|
124
|
-
}
|
|
102
|
+
const libraryBytecodeHash = manifest.libraries[libraryName].bytecodeHash;
|
|
103
|
+
if ((0, upgrades_core_1.hashBytecode)(bytecode) !== libraryBytecodeHash) {
|
|
104
|
+
librariesToUpgrade.push(libraryName);
|
|
125
105
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const { bytecode } = yield hardhat_2.artifacts.readArtifact(libraryName);
|
|
129
|
-
manifest.libraries[libraryName] = { "address": libraryAddress, "bytecodeHash": (0, upgrades_core_1.hashBytecode)(bytecode) };
|
|
106
|
+
else {
|
|
107
|
+
oldLibraries[libraryName] = manifest.libraries[libraryName].address;
|
|
130
108
|
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
109
|
+
}
|
|
110
|
+
const libraries = await (0, deploy_1.deployLibraries)(librariesToUpgrade);
|
|
111
|
+
for (const [libraryName, libraryAddress] of libraries.entries()) {
|
|
112
|
+
const { bytecode } = await hardhat_2.artifacts.readArtifact(libraryName);
|
|
113
|
+
manifest.libraries[libraryName] = { "address": libraryAddress, "bytecodeHash": (0, upgrades_core_1.hashBytecode)(bytecode) };
|
|
114
|
+
}
|
|
115
|
+
Object.assign(libraries, oldLibraries);
|
|
116
|
+
await fs_1.promises.writeFile(await (0, deploy_1.getManifestFile)(), JSON.stringify(manifest, null, 4));
|
|
117
|
+
return await (0, deploy_1.getLinkedContractFactory)(contract, libraries);
|
|
138
118
|
}
|
|
139
119
|
}
|
|
140
120
|
exports.Upgrader = Upgrader;
|
package/dist/src/verification.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -16,38 +7,34 @@ exports.verifyProxy = exports.verify = void 0;
|
|
|
16
7
|
const hardhat_1 = require("hardhat");
|
|
17
8
|
const chalk_1 = __importDefault(require("chalk"));
|
|
18
9
|
const upgrades_core_1 = require("@openzeppelin/upgrades-core");
|
|
19
|
-
function verify(contractName, contractAddress, constructorArguments) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (e
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
console.log(chalk_1.default.red(`Contract ${contractName} was not verified on etherscan`));
|
|
37
|
-
console.log(e.toString());
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
console.log("Unknown exception type:", e);
|
|
10
|
+
async function verify(contractName, contractAddress, constructorArguments) {
|
|
11
|
+
if (![1337, 31337].includes((await hardhat_1.ethers.provider.getNetwork()).chainId)) {
|
|
12
|
+
for (let retry = 0; retry <= 5; ++retry) {
|
|
13
|
+
try {
|
|
14
|
+
await (0, hardhat_1.run)("verify:verify", {
|
|
15
|
+
address: contractAddress,
|
|
16
|
+
constructorArguments
|
|
17
|
+
});
|
|
18
|
+
break;
|
|
19
|
+
}
|
|
20
|
+
catch (e) {
|
|
21
|
+
if (e instanceof Error) {
|
|
22
|
+
if (e.toString().includes("Contract source code already verified")) {
|
|
23
|
+
console.log(chalk_1.default.grey(`${contractName} is already verified`));
|
|
24
|
+
return;
|
|
41
25
|
}
|
|
26
|
+
console.log(chalk_1.default.red(`Contract ${contractName} was not verified on etherscan`));
|
|
27
|
+
console.log(e.toString());
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
console.log("Unknown exception type:", e);
|
|
42
31
|
}
|
|
43
32
|
}
|
|
44
33
|
}
|
|
45
|
-
}
|
|
34
|
+
}
|
|
46
35
|
}
|
|
47
36
|
exports.verify = verify;
|
|
48
|
-
function verifyProxy(contractName, proxyAddress, constructorArguments) {
|
|
49
|
-
|
|
50
|
-
yield verify(contractName, yield (0, upgrades_core_1.getImplementationAddress)(hardhat_1.network.provider, proxyAddress), constructorArguments);
|
|
51
|
-
});
|
|
37
|
+
async function verifyProxy(contractName, proxyAddress, constructorArguments) {
|
|
38
|
+
await verify(contractName, await (0, upgrades_core_1.getImplementationAddress)(hardhat_1.network.provider, proxyAddress), constructorArguments);
|
|
52
39
|
}
|
|
53
40
|
exports.verifyProxy = verifyProxy;
|
package/dist/src/version.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
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
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
4
|
};
|
|
@@ -17,18 +8,16 @@ const fs_1 = require("fs");
|
|
|
17
8
|
const child_process_1 = require("child_process");
|
|
18
9
|
const util_1 = __importDefault(require("util"));
|
|
19
10
|
const exec = util_1.default.promisify(child_process_1.exec);
|
|
20
|
-
function getVersion() {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
});
|
|
11
|
+
async function getVersion() {
|
|
12
|
+
if (process.env.VERSION) {
|
|
13
|
+
return process.env.VERSION;
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const tag = (await exec("git describe --tags")).stdout.trim();
|
|
17
|
+
return tag;
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return (await fs_1.promises.readFile("VERSION", "utf-8")).trim();
|
|
21
|
+
}
|
|
33
22
|
}
|
|
34
23
|
exports.getVersion = getVersion;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
2
|
import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
5
5
|
export interface AccessControlEnumerableUpgradeableInterface extends utils.Interface {
|
|
6
6
|
contractName: "AccessControlEnumerableUpgradeable";
|
|
7
7
|
functions: {
|
|
@@ -44,11 +44,11 @@ export interface AccessControlEnumerableUpgradeableInterface extends utils.Inter
|
|
|
44
44
|
getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment;
|
|
45
45
|
getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type InitializedEvent = TypedEvent<[number], {
|
|
48
48
|
version: number;
|
|
49
49
|
}>;
|
|
50
|
-
export
|
|
51
|
-
export
|
|
50
|
+
export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
|
|
51
|
+
export type RoleAdminChangedEvent = TypedEvent<[
|
|
52
52
|
string,
|
|
53
53
|
string,
|
|
54
54
|
string
|
|
@@ -57,8 +57,8 @@ export declare type RoleAdminChangedEvent = TypedEvent<[
|
|
|
57
57
|
previousAdminRole: string;
|
|
58
58
|
newAdminRole: string;
|
|
59
59
|
}>;
|
|
60
|
-
export
|
|
61
|
-
export
|
|
60
|
+
export type RoleAdminChangedEventFilter = TypedEventFilter<RoleAdminChangedEvent>;
|
|
61
|
+
export type RoleGrantedEvent = TypedEvent<[
|
|
62
62
|
string,
|
|
63
63
|
string,
|
|
64
64
|
string
|
|
@@ -67,8 +67,8 @@ export declare type RoleGrantedEvent = TypedEvent<[
|
|
|
67
67
|
account: string;
|
|
68
68
|
sender: string;
|
|
69
69
|
}>;
|
|
70
|
-
export
|
|
71
|
-
export
|
|
70
|
+
export type RoleGrantedEventFilter = TypedEventFilter<RoleGrantedEvent>;
|
|
71
|
+
export type RoleRevokedEvent = TypedEvent<[
|
|
72
72
|
string,
|
|
73
73
|
string,
|
|
74
74
|
string
|
|
@@ -77,7 +77,7 @@ export declare type RoleRevokedEvent = TypedEvent<[
|
|
|
77
77
|
account: string;
|
|
78
78
|
sender: string;
|
|
79
79
|
}>;
|
|
80
|
-
export
|
|
80
|
+
export type RoleRevokedEventFilter = TypedEventFilter<RoleRevokedEvent>;
|
|
81
81
|
export interface AccessControlEnumerableUpgradeable extends BaseContract {
|
|
82
82
|
contractName: "AccessControlEnumerableUpgradeable";
|
|
83
83
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
2
|
import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
5
5
|
export interface AccessControlUpgradeableInterface extends utils.Interface {
|
|
6
6
|
contractName: "AccessControlUpgradeable";
|
|
7
7
|
functions: {
|
|
@@ -38,11 +38,11 @@ export interface AccessControlUpgradeableInterface extends utils.Interface {
|
|
|
38
38
|
getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment;
|
|
39
39
|
getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment;
|
|
40
40
|
}
|
|
41
|
-
export
|
|
41
|
+
export type InitializedEvent = TypedEvent<[number], {
|
|
42
42
|
version: number;
|
|
43
43
|
}>;
|
|
44
|
-
export
|
|
45
|
-
export
|
|
44
|
+
export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
|
|
45
|
+
export type RoleAdminChangedEvent = TypedEvent<[
|
|
46
46
|
string,
|
|
47
47
|
string,
|
|
48
48
|
string
|
|
@@ -51,8 +51,8 @@ export declare type RoleAdminChangedEvent = TypedEvent<[
|
|
|
51
51
|
previousAdminRole: string;
|
|
52
52
|
newAdminRole: string;
|
|
53
53
|
}>;
|
|
54
|
-
export
|
|
55
|
-
export
|
|
54
|
+
export type RoleAdminChangedEventFilter = TypedEventFilter<RoleAdminChangedEvent>;
|
|
55
|
+
export type RoleGrantedEvent = TypedEvent<[
|
|
56
56
|
string,
|
|
57
57
|
string,
|
|
58
58
|
string
|
|
@@ -61,8 +61,8 @@ export declare type RoleGrantedEvent = TypedEvent<[
|
|
|
61
61
|
account: string;
|
|
62
62
|
sender: string;
|
|
63
63
|
}>;
|
|
64
|
-
export
|
|
65
|
-
export
|
|
64
|
+
export type RoleGrantedEventFilter = TypedEventFilter<RoleGrantedEvent>;
|
|
65
|
+
export type RoleRevokedEvent = TypedEvent<[
|
|
66
66
|
string,
|
|
67
67
|
string,
|
|
68
68
|
string
|
|
@@ -71,7 +71,7 @@ export declare type RoleRevokedEvent = TypedEvent<[
|
|
|
71
71
|
account: string;
|
|
72
72
|
sender: string;
|
|
73
73
|
}>;
|
|
74
|
-
export
|
|
74
|
+
export type RoleRevokedEventFilter = TypedEventFilter<RoleRevokedEvent>;
|
|
75
75
|
export interface AccessControlUpgradeable extends BaseContract {
|
|
76
76
|
contractName: "AccessControlUpgradeable";
|
|
77
77
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
import { BaseContract,
|
|
2
|
-
import {
|
|
1
|
+
import { BaseContract, Signer, utils } from "ethers";
|
|
2
|
+
import { EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
5
5
|
export interface AdminUpgradeabilityProxyInterface extends utils.Interface {
|
|
6
6
|
contractName: "AdminUpgradeabilityProxy";
|
|
7
|
-
functions: {
|
|
8
|
-
"admin()": FunctionFragment;
|
|
9
|
-
"changeAdmin(address)": FunctionFragment;
|
|
10
|
-
"implementation()": FunctionFragment;
|
|
11
|
-
"upgradeTo(address)": FunctionFragment;
|
|
12
|
-
"upgradeToAndCall(address,bytes)": FunctionFragment;
|
|
13
|
-
};
|
|
14
|
-
encodeFunctionData(functionFragment: "admin", values?: undefined): string;
|
|
15
|
-
encodeFunctionData(functionFragment: "changeAdmin", values: [string]): string;
|
|
16
|
-
encodeFunctionData(functionFragment: "implementation", values?: undefined): string;
|
|
17
|
-
encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string;
|
|
18
|
-
encodeFunctionData(functionFragment: "upgradeToAndCall", values: [string, BytesLike]): string;
|
|
19
|
-
decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result;
|
|
20
|
-
decodeFunctionResult(functionFragment: "changeAdmin", data: BytesLike): Result;
|
|
21
|
-
decodeFunctionResult(functionFragment: "implementation", data: BytesLike): Result;
|
|
22
|
-
decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result;
|
|
23
|
-
decodeFunctionResult(functionFragment: "upgradeToAndCall", data: BytesLike): Result;
|
|
7
|
+
functions: {};
|
|
24
8
|
events: {
|
|
25
9
|
"AdminChanged(address,address)": EventFragment;
|
|
26
10
|
"BeaconUpgraded(address)": EventFragment;
|
|
@@ -30,22 +14,22 @@ export interface AdminUpgradeabilityProxyInterface extends utils.Interface {
|
|
|
30
14
|
getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment;
|
|
31
15
|
getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment;
|
|
32
16
|
}
|
|
33
|
-
export
|
|
17
|
+
export type AdminChangedEvent = TypedEvent<[
|
|
34
18
|
string,
|
|
35
19
|
string
|
|
36
20
|
], {
|
|
37
21
|
previousAdmin: string;
|
|
38
22
|
newAdmin: string;
|
|
39
23
|
}>;
|
|
40
|
-
export
|
|
41
|
-
export
|
|
24
|
+
export type AdminChangedEventFilter = TypedEventFilter<AdminChangedEvent>;
|
|
25
|
+
export type BeaconUpgradedEvent = TypedEvent<[string], {
|
|
42
26
|
beacon: string;
|
|
43
27
|
}>;
|
|
44
|
-
export
|
|
45
|
-
export
|
|
28
|
+
export type BeaconUpgradedEventFilter = TypedEventFilter<BeaconUpgradedEvent>;
|
|
29
|
+
export type UpgradedEvent = TypedEvent<[string], {
|
|
46
30
|
implementation: string;
|
|
47
31
|
}>;
|
|
48
|
-
export
|
|
32
|
+
export type UpgradedEventFilter = TypedEventFilter<UpgradedEvent>;
|
|
49
33
|
export interface AdminUpgradeabilityProxy extends BaseContract {
|
|
50
34
|
contractName: "AdminUpgradeabilityProxy";
|
|
51
35
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
@@ -61,45 +45,8 @@ export interface AdminUpgradeabilityProxy extends BaseContract {
|
|
|
61
45
|
on: OnEvent<this>;
|
|
62
46
|
once: OnEvent<this>;
|
|
63
47
|
removeListener: OnEvent<this>;
|
|
64
|
-
functions: {
|
|
65
|
-
|
|
66
|
-
from?: string | Promise<string>;
|
|
67
|
-
}): Promise<ContractTransaction>;
|
|
68
|
-
changeAdmin(newAdmin: string, overrides?: Overrides & {
|
|
69
|
-
from?: string | Promise<string>;
|
|
70
|
-
}): Promise<ContractTransaction>;
|
|
71
|
-
implementation(overrides?: Overrides & {
|
|
72
|
-
from?: string | Promise<string>;
|
|
73
|
-
}): Promise<ContractTransaction>;
|
|
74
|
-
upgradeTo(newImplementation: string, overrides?: Overrides & {
|
|
75
|
-
from?: string | Promise<string>;
|
|
76
|
-
}): Promise<ContractTransaction>;
|
|
77
|
-
upgradeToAndCall(newImplementation: string, data: BytesLike, overrides?: PayableOverrides & {
|
|
78
|
-
from?: string | Promise<string>;
|
|
79
|
-
}): Promise<ContractTransaction>;
|
|
80
|
-
};
|
|
81
|
-
admin(overrides?: Overrides & {
|
|
82
|
-
from?: string | Promise<string>;
|
|
83
|
-
}): Promise<ContractTransaction>;
|
|
84
|
-
changeAdmin(newAdmin: string, overrides?: Overrides & {
|
|
85
|
-
from?: string | Promise<string>;
|
|
86
|
-
}): Promise<ContractTransaction>;
|
|
87
|
-
implementation(overrides?: Overrides & {
|
|
88
|
-
from?: string | Promise<string>;
|
|
89
|
-
}): Promise<ContractTransaction>;
|
|
90
|
-
upgradeTo(newImplementation: string, overrides?: Overrides & {
|
|
91
|
-
from?: string | Promise<string>;
|
|
92
|
-
}): Promise<ContractTransaction>;
|
|
93
|
-
upgradeToAndCall(newImplementation: string, data: BytesLike, overrides?: PayableOverrides & {
|
|
94
|
-
from?: string | Promise<string>;
|
|
95
|
-
}): Promise<ContractTransaction>;
|
|
96
|
-
callStatic: {
|
|
97
|
-
admin(overrides?: CallOverrides): Promise<string>;
|
|
98
|
-
changeAdmin(newAdmin: string, overrides?: CallOverrides): Promise<void>;
|
|
99
|
-
implementation(overrides?: CallOverrides): Promise<string>;
|
|
100
|
-
upgradeTo(newImplementation: string, overrides?: CallOverrides): Promise<void>;
|
|
101
|
-
upgradeToAndCall(newImplementation: string, data: BytesLike, overrides?: CallOverrides): Promise<void>;
|
|
102
|
-
};
|
|
48
|
+
functions: {};
|
|
49
|
+
callStatic: {};
|
|
103
50
|
filters: {
|
|
104
51
|
"AdminChanged(address,address)"(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter;
|
|
105
52
|
AdminChanged(previousAdmin?: null, newAdmin?: null): AdminChangedEventFilter;
|
|
@@ -108,38 +55,6 @@ export interface AdminUpgradeabilityProxy extends BaseContract {
|
|
|
108
55
|
"Upgraded(address)"(implementation?: string | null): UpgradedEventFilter;
|
|
109
56
|
Upgraded(implementation?: string | null): UpgradedEventFilter;
|
|
110
57
|
};
|
|
111
|
-
estimateGas: {
|
|
112
|
-
|
|
113
|
-
from?: string | Promise<string>;
|
|
114
|
-
}): Promise<BigNumber>;
|
|
115
|
-
changeAdmin(newAdmin: string, overrides?: Overrides & {
|
|
116
|
-
from?: string | Promise<string>;
|
|
117
|
-
}): Promise<BigNumber>;
|
|
118
|
-
implementation(overrides?: Overrides & {
|
|
119
|
-
from?: string | Promise<string>;
|
|
120
|
-
}): Promise<BigNumber>;
|
|
121
|
-
upgradeTo(newImplementation: string, overrides?: Overrides & {
|
|
122
|
-
from?: string | Promise<string>;
|
|
123
|
-
}): Promise<BigNumber>;
|
|
124
|
-
upgradeToAndCall(newImplementation: string, data: BytesLike, overrides?: PayableOverrides & {
|
|
125
|
-
from?: string | Promise<string>;
|
|
126
|
-
}): Promise<BigNumber>;
|
|
127
|
-
};
|
|
128
|
-
populateTransaction: {
|
|
129
|
-
admin(overrides?: Overrides & {
|
|
130
|
-
from?: string | Promise<string>;
|
|
131
|
-
}): Promise<PopulatedTransaction>;
|
|
132
|
-
changeAdmin(newAdmin: string, overrides?: Overrides & {
|
|
133
|
-
from?: string | Promise<string>;
|
|
134
|
-
}): Promise<PopulatedTransaction>;
|
|
135
|
-
implementation(overrides?: Overrides & {
|
|
136
|
-
from?: string | Promise<string>;
|
|
137
|
-
}): Promise<PopulatedTransaction>;
|
|
138
|
-
upgradeTo(newImplementation: string, overrides?: Overrides & {
|
|
139
|
-
from?: string | Promise<string>;
|
|
140
|
-
}): Promise<PopulatedTransaction>;
|
|
141
|
-
upgradeToAndCall(newImplementation: string, data: BytesLike, overrides?: PayableOverrides & {
|
|
142
|
-
from?: string | Promise<string>;
|
|
143
|
-
}): Promise<PopulatedTransaction>;
|
|
144
|
-
};
|
|
58
|
+
estimateGas: {};
|
|
59
|
+
populateTransaction: {};
|
|
145
60
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseContract, Signer, utils } from "ethers";
|
|
2
2
|
import { EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
5
5
|
export interface ContextUpgradeableInterface extends utils.Interface {
|
|
6
6
|
contractName: "ContextUpgradeable";
|
|
7
7
|
functions: {};
|
|
@@ -10,10 +10,10 @@ export interface ContextUpgradeableInterface extends utils.Interface {
|
|
|
10
10
|
};
|
|
11
11
|
getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export type InitializedEvent = TypedEvent<[number], {
|
|
14
14
|
version: number;
|
|
15
15
|
}>;
|
|
16
|
-
export
|
|
16
|
+
export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
|
|
17
17
|
export interface ContextUpgradeable extends BaseContract {
|
|
18
18
|
contractName: "ContextUpgradeable";
|
|
19
19
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
2
|
import { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
3
|
import { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
-
import { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common";
|
|
5
5
|
export interface ERC165UpgradeableInterface extends utils.Interface {
|
|
6
6
|
contractName: "ERC165Upgradeable";
|
|
7
7
|
functions: {
|
|
@@ -14,10 +14,10 @@ export interface ERC165UpgradeableInterface extends utils.Interface {
|
|
|
14
14
|
};
|
|
15
15
|
getEvent(nameOrSignatureOrTopic: "Initialized"): EventFragment;
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export type InitializedEvent = TypedEvent<[number], {
|
|
18
18
|
version: number;
|
|
19
19
|
}>;
|
|
20
|
-
export
|
|
20
|
+
export type InitializedEventFilter = TypedEventFilter<InitializedEvent>;
|
|
21
21
|
export interface ERC165Upgradeable extends BaseContract {
|
|
22
22
|
contractName: "ERC165Upgradeable";
|
|
23
23
|
connect(signerOrProvider: Signer | Provider | string): this;
|