@skalenetwork/upgrade-tools 3.0.0-merge-stable.1 → 3.0.0-proxy-admin.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/dist/hardhat.config.d.ts +3 -3
- package/dist/hardhat.config.js +6 -4
- 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/deploy.d.ts +4 -4
- package/dist/src/deploy.js +59 -60
- package/dist/src/deploy.js.map +1 -0
- package/dist/src/exitCodes.d.ts +7 -0
- package/dist/src/exitCodes.js +12 -0
- package/dist/src/exitCodes.js.map +1 -0
- package/dist/src/gnosis-safe.d.ts +2 -2
- package/dist/src/gnosis-safe.js +125 -81
- 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/submitters/auto-submitter.d.ts +19 -5
- package/dist/src/submitters/auto-submitter.js +128 -118
- 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 +19 -13
- 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 +3 -2
- 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/src/types/upgrader.js +3 -0
- package/dist/src/types/upgrader.js.map +1 -0
- package/dist/src/upgrader.d.ts +26 -7
- package/dist/src/upgrader.js +175 -96
- package/dist/src/upgrader.js.map +1 -0
- package/dist/src/verification.d.ts +2 -2
- package/dist/src/verification.js +53 -28
- package/dist/src/verification.js.map +1 -0
- package/dist/src/version.js +11 -6
- 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 -0
- package/dist/typechain-types/index.js +26 -1
- package/dist/typechain-types/index.js.map +1 -0
- package/package.json +15 -14
- package/dist/src/multiSend.d.ts +0 -2
- package/dist/src/multiSend.js +0 -46
package/dist/src/verification.js
CHANGED
|
@@ -8,35 +8,60 @@ const hardhat_1 = require("hardhat");
|
|
|
8
8
|
const chain_config_1 = require("@nomicfoundation/hardhat-verify/internal/chain-config");
|
|
9
9
|
const chalk_1 = __importDefault(require("chalk"));
|
|
10
10
|
const upgrades_core_1 = require("@openzeppelin/upgrades-core");
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
if (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
});
|
|
20
|
-
break;
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
if (e instanceof Error) {
|
|
24
|
-
if (e.toString().includes("Contract source code already verified")) {
|
|
25
|
-
console.log(chalk_1.default.grey(`${contractName} is already verified`));
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
console.log(chalk_1.default.red(`Contract ${contractName} was not verified on etherscan`));
|
|
29
|
-
console.log(e.toString());
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
console.log("Unknown exception type:", e);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
11
|
+
const RETRIES_AMOUNT = 5;
|
|
12
|
+
const processError = (error, contractName) => {
|
|
13
|
+
if (error instanceof Error) {
|
|
14
|
+
const alreadyVerifiedErrorLine = "Contract source code already verified";
|
|
15
|
+
if (error.toString().includes(alreadyVerifiedErrorLine)) {
|
|
16
|
+
const infoMessage = `${contractName} is already verified`;
|
|
17
|
+
console.log(chalk_1.default.grey(infoMessage));
|
|
18
|
+
return;
|
|
35
19
|
}
|
|
20
|
+
const errorMessage = `Contract ${contractName} was not verified on etherscan`;
|
|
21
|
+
console.log(chalk_1.default.red(errorMessage));
|
|
22
|
+
console.log(error.toString());
|
|
36
23
|
}
|
|
37
|
-
|
|
24
|
+
else {
|
|
25
|
+
console.log("Unknown exception type:", error);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const verificationAttempt = async (contractName, contractAddress, constructorArguments) => {
|
|
29
|
+
try {
|
|
30
|
+
await (0, hardhat_1.run)("verify:verify", {
|
|
31
|
+
"address": contractAddress,
|
|
32
|
+
constructorArguments
|
|
33
|
+
});
|
|
34
|
+
return true;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
processError(error, contractName);
|
|
38
|
+
}
|
|
39
|
+
return false;
|
|
40
|
+
};
|
|
41
|
+
const verifyWithRetry = async (verificationTarget, attempts) => {
|
|
42
|
+
if (attempts) {
|
|
43
|
+
if (!await verificationAttempt(verificationTarget.contractName, verificationTarget.contractAddress, verificationTarget.constructorArguments)) {
|
|
44
|
+
const failedAttempts = 1;
|
|
45
|
+
await verifyWithRetry(verificationTarget, attempts - failedAttempts);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const verify = async (contractName, contractAddress, constructorArguments) => {
|
|
50
|
+
const { chainId } = await hardhat_1.ethers.provider.getNetwork();
|
|
51
|
+
if (!chain_config_1.builtinChains.map((chain) => chain.chainId).includes(Number(chainId))) {
|
|
52
|
+
const errorMessage = "Verification on this network is not supported";
|
|
53
|
+
console.log(chalk_1.default.grey(errorMessage));
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
await verifyWithRetry({
|
|
57
|
+
constructorArguments,
|
|
58
|
+
contractAddress,
|
|
59
|
+
contractName
|
|
60
|
+
}, RETRIES_AMOUNT);
|
|
61
|
+
};
|
|
38
62
|
exports.verify = verify;
|
|
39
|
-
async
|
|
40
|
-
await verify(contractName, await (0, upgrades_core_1.getImplementationAddress)(hardhat_1.network.provider, proxyAddress), constructorArguments);
|
|
41
|
-
}
|
|
63
|
+
const verifyProxy = async (contractName, proxyAddress, constructorArguments) => {
|
|
64
|
+
await (0, exports.verify)(contractName, await (0, upgrades_core_1.getImplementationAddress)(hardhat_1.network.provider, proxyAddress), constructorArguments);
|
|
65
|
+
};
|
|
42
66
|
exports.verifyProxy = verifyProxy;
|
|
67
|
+
//# sourceMappingURL=verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification.js","sourceRoot":"","sources":["../../src/verification.ts"],"names":[],"mappings":";;;;;;AAAA,qCAA6C;AAC7C,wFAE+D;AAC/D,kDAA0B;AAC1B,+DAAqE;AAErE,MAAM,cAAc,GAAG,CAAC,CAAC;AAEzB,MAAM,YAAY,GAAG,CAAC,KAAc,EAAE,YAAoB,EAAE,EAAE;IAC1D,IAAI,KAAK,YAAY,KAAK,EAAE;QACxB,MAAM,wBAAwB,GAC1B,uCAAuC,CAAC;QAC5C,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wBAAwB,CAAC,EAAE;YACrD,MAAM,WAAW,GAAG,GAAG,YAAY,sBAAsB,CAAC;YAC1D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACrC,OAAO;SACV;QACD,MAAM,YAAY,GACd,YAAY,YAAY,gCAAgC,CAAC;QAC7D,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;KACjC;SAAM;QACH,OAAO,CAAC,GAAG,CACP,yBAAyB,EACzB,KAAK,CACR,CAAC;KACL;AACL,CAAC,CAAC;AAEF,MAAM,mBAAmB,GAAG,KAAK,EAC7B,YAAoB,EACpB,eAAuB,EACvB,oBAA4B,EAC9B,EAAE;IACA,IAAI;QACA,MAAM,IAAA,aAAG,EACL,eAAe,EACf;YACI,SAAS,EAAE,eAAe;YAC1B,oBAAoB;SACvB,CACJ,CAAC;QACF,OAAO,IAAI,CAAC;KACf;IAAC,OAAO,KAAK,EAAE;QACZ,YAAY,CACR,KAAK,EACL,YAAY,CACf,CAAC;KACL;IACD,OAAO,KAAK,CAAC;AACjB,CAAC,CAAC;AAQF,MAAM,eAAe,GAAG,KAAK,EACzB,kBAAsC,EACtC,QAAgB,EAClB,EAAE;IACA,IAAI,QAAQ,EAAE;QACV,IAAI,CAAC,MAAM,mBAAmB,CAC1B,kBAAkB,CAAC,YAAY,EAC/B,kBAAkB,CAAC,eAAe,EAClC,kBAAkB,CAAC,oBAAoB,CAC1C,EAAE;YACC,MAAM,cAAc,GAAG,CAAC,CAAC;YACzB,MAAM,eAAe,CACjB,kBAAkB,EAClB,QAAQ,GAAG,cAAc,CAC5B,CAAC;SACL;KACJ;AACL,CAAC,CAAC;AAEK,MAAM,MAAM,GAAG,KAAK,EACvB,YAAoB,EACpB,eAAuB,EACvB,oBAA4B,EAC9B,EAAE;IACA,MAAM,EAAC,OAAO,EAAC,GAAG,MAAM,gBAAM,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACrD,IAAI,CAAC,4BAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE;QACxE,MAAM,YAAY,GAAG,+CAA+C,CAAC;QACrE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;QACtC,OAAO;KACV;IACD,MAAM,eAAe,CACjB;QACI,oBAAoB;QACpB,eAAe;QACf,YAAY;KACf,EACD,cAAc,CACjB,CAAC;AACN,CAAC,CAAC;AAnBW,QAAA,MAAM,UAmBjB;AAEK,MAAM,WAAW,GAAG,KAAK,EAC5B,YAAoB,EACpB,YAAoB,EACpB,oBAA4B,EAC9B,EAAE;IACA,MAAM,IAAA,cAAM,EACR,YAAY,EACZ,MAAM,IAAA,wCAAwB,EAC1B,iBAAO,CAAC,QAAQ,EAChB,YAAY,CACf,EACD,oBAAoB,CACvB,CAAC;AACN,CAAC,CAAC;AAbW,QAAA,WAAW,eAatB"}
|
package/dist/src/version.js
CHANGED
|
@@ -4,27 +4,31 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getVersion = void 0;
|
|
7
|
-
const child_process_1 = require("child_process");
|
|
8
7
|
const fs_1 = require("fs");
|
|
8
|
+
const child_process_1 = require("child_process");
|
|
9
9
|
const util_1 = __importDefault(require("util"));
|
|
10
10
|
const exec = util_1.default.promisify(child_process_1.exec);
|
|
11
11
|
class VersionNotFound extends Error {
|
|
12
12
|
}
|
|
13
|
-
async
|
|
14
|
-
if (folder === undefined) {
|
|
13
|
+
const getVersionFilename = async (folder) => {
|
|
14
|
+
if (typeof folder === "undefined") {
|
|
15
15
|
return getVersionFilename((await exec("git rev-parse --show-toplevel")).stdout.trim());
|
|
16
16
|
}
|
|
17
|
-
const VERSION_FILENAME =
|
|
17
|
+
const VERSION_FILENAME = "VERSION";
|
|
18
|
+
const path = `${folder}/${VERSION_FILENAME}`;
|
|
18
19
|
if ((0, fs_1.existsSync)(path)) {
|
|
19
20
|
return path;
|
|
20
21
|
}
|
|
21
|
-
for (const entry of await fs_1.promises.readdir(folder, {
|
|
22
|
+
for (const entry of await fs_1.promises.readdir(folder, {
|
|
23
|
+
"recursive": true,
|
|
24
|
+
"withFileTypes": true
|
|
25
|
+
})) {
|
|
22
26
|
if (entry.isFile() && entry.name === VERSION_FILENAME) {
|
|
23
27
|
return `${entry.path}/${entry.name}`;
|
|
24
28
|
}
|
|
25
29
|
}
|
|
26
30
|
throw new VersionNotFound("Can't find version file");
|
|
27
|
-
}
|
|
31
|
+
};
|
|
28
32
|
const getVersion = async () => {
|
|
29
33
|
if (process.env.VERSION) {
|
|
30
34
|
return process.env.VERSION;
|
|
@@ -38,3 +42,4 @@ const getVersion = async () => {
|
|
|
38
42
|
}
|
|
39
43
|
};
|
|
40
44
|
exports.getVersion = getVersion;
|
|
45
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":";;;;;;AAAA,2BAA8C;AAC9C,iDAAgD;AAChD,gDAAwB;AAGxB,MAAM,IAAI,GAAG,cAAI,CAAC,SAAS,CAAC,oBAAS,CAAC,CAAC;AAEvC,MAAM,eAAgB,SAAQ,KAAK;CAAG;AAEtC,MAAM,kBAAkB,GAAG,KAAK,EAAE,MAAe,EAAmB,EAAE;IAClE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAC/B,OAAO,kBAAkB,CAAC,CACtB,MAAM,IAAI,CAAC,+BAA+B,CAAC,CAC9C,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;KACpB;IACD,MAAM,gBAAgB,GAAG,SAAS,CAAC;IACnC,MAAM,IAAI,GAAG,GAAG,MAAM,IAAI,gBAAgB,EAAE,CAAC;IAC7C,IAAI,IAAA,eAAU,EAAC,IAAI,CAAC,EAAE;QAClB,OAAO,IAAI,CAAC;KACf;IACD,KAAK,MAAM,KAAK,IAAI,MAAM,aAAE,CAAC,OAAO,CAChC,MAAM,EACN;QACI,WAAW,EAAE,IAAI;QACjB,eAAe,EAAE,IAAI;KACxB,CACJ,EAAE;QACC,IAAI,KAAK,CAAC,MAAM,EAAE,IAAI,KAAK,CAAC,IAAI,KAAK,gBAAgB,EAAE;YACnD,OAAO,GAAG,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;SACxC;KACJ;IACD,MAAM,IAAI,eAAe,CAAC,yBAAyB,CAAC,CAAC;AACzD,CAAC,CAAC;AAEK,MAAM,UAAU,GAAG,KAAK,IAAI,EAAE;IACjC,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE;QACrB,OAAO,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC;KAC9B;IACD,IAAI;QACA,MAAM,GAAG,GAAG,CAAC,MAAM,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAC9D,OAAO,GAAG,CAAC;KACd;IAAC,MAAM;QACJ,OAAO,CAAC,MAAM,aAAE,CAAC,QAAQ,CACrB,MAAM,kBAAkB,EAAE,EAC1B,OAAO,CACV,CAAC,CAAC,IAAI,EAAE,CAAC;KACb;AACL,CAAC,CAAC;AAbW,QAAA,UAAU,cAarB"}
|
|
@@ -1,60 +1,65 @@
|
|
|
1
|
-
import { BaseContract,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import type { BaseContract, FunctionFragment, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener } from "./common";
|
|
3
|
+
export interface AdminUpgradeabilityProxyInterface extends Interface {
|
|
4
|
+
getEvent(nameOrSignatureOrTopic: "AdminChanged" | "BeaconUpgraded" | "Upgraded"): EventFragment;
|
|
5
|
+
}
|
|
6
|
+
export declare namespace AdminChangedEvent {
|
|
7
|
+
type InputTuple = [previousAdmin: AddressLike, newAdmin: AddressLike];
|
|
8
|
+
type OutputTuple = [previousAdmin: string, newAdmin: string];
|
|
9
|
+
interface OutputObject {
|
|
10
|
+
previousAdmin: string;
|
|
11
|
+
newAdmin: string;
|
|
12
|
+
}
|
|
13
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
14
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
15
|
+
type Log = TypedEventLog<Event>;
|
|
16
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace BeaconUpgradedEvent {
|
|
19
|
+
type InputTuple = [beacon: AddressLike];
|
|
20
|
+
type OutputTuple = [beacon: string];
|
|
21
|
+
interface OutputObject {
|
|
22
|
+
beacon: string;
|
|
23
|
+
}
|
|
24
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
25
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
26
|
+
type Log = TypedEventLog<Event>;
|
|
27
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
28
|
+
}
|
|
29
|
+
export declare namespace UpgradedEvent {
|
|
30
|
+
type InputTuple = [implementation: AddressLike];
|
|
31
|
+
type OutputTuple = [implementation: string];
|
|
32
|
+
interface OutputObject {
|
|
33
|
+
implementation: string;
|
|
34
|
+
}
|
|
35
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
36
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
37
|
+
type Log = TypedEventLog<Event>;
|
|
38
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
16
39
|
}
|
|
17
|
-
export type AdminChangedEvent = TypedEvent<[
|
|
18
|
-
string,
|
|
19
|
-
string
|
|
20
|
-
], {
|
|
21
|
-
previousAdmin: string;
|
|
22
|
-
newAdmin: string;
|
|
23
|
-
}>;
|
|
24
|
-
export type AdminChangedEventFilter = TypedEventFilter<AdminChangedEvent>;
|
|
25
|
-
export type BeaconUpgradedEvent = TypedEvent<[string], {
|
|
26
|
-
beacon: string;
|
|
27
|
-
}>;
|
|
28
|
-
export type BeaconUpgradedEventFilter = TypedEventFilter<BeaconUpgradedEvent>;
|
|
29
|
-
export type UpgradedEvent = TypedEvent<[string], {
|
|
30
|
-
implementation: string;
|
|
31
|
-
}>;
|
|
32
|
-
export type UpgradedEventFilter = TypedEventFilter<UpgradedEvent>;
|
|
33
40
|
export interface AdminUpgradeabilityProxy extends BaseContract {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
attach(addressOrName: string): this;
|
|
37
|
-
deployed(): Promise<this>;
|
|
41
|
+
connect(runner?: ContractRunner | null): AdminUpgradeabilityProxy;
|
|
42
|
+
waitForDeployment(): Promise<this>;
|
|
38
43
|
interface: AdminUpgradeabilityProxyInterface;
|
|
39
|
-
queryFilter<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
45
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
46
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
47
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
48
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
49
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
50
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
51
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
52
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
53
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
54
|
+
getEvent(key: "AdminChanged"): TypedContractEvent<AdminChangedEvent.InputTuple, AdminChangedEvent.OutputTuple, AdminChangedEvent.OutputObject>;
|
|
55
|
+
getEvent(key: "BeaconUpgraded"): TypedContractEvent<BeaconUpgradedEvent.InputTuple, BeaconUpgradedEvent.OutputTuple, BeaconUpgradedEvent.OutputObject>;
|
|
56
|
+
getEvent(key: "Upgraded"): TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
50
57
|
filters: {
|
|
51
|
-
"AdminChanged(address,address)"
|
|
52
|
-
AdminChanged
|
|
53
|
-
"BeaconUpgraded(address)"
|
|
54
|
-
BeaconUpgraded
|
|
55
|
-
"Upgraded(address)"
|
|
56
|
-
Upgraded
|
|
58
|
+
"AdminChanged(address,address)": TypedContractEvent<AdminChangedEvent.InputTuple, AdminChangedEvent.OutputTuple, AdminChangedEvent.OutputObject>;
|
|
59
|
+
AdminChanged: TypedContractEvent<AdminChangedEvent.InputTuple, AdminChangedEvent.OutputTuple, AdminChangedEvent.OutputObject>;
|
|
60
|
+
"BeaconUpgraded(address)": TypedContractEvent<BeaconUpgradedEvent.InputTuple, BeaconUpgradedEvent.OutputTuple, BeaconUpgradedEvent.OutputObject>;
|
|
61
|
+
BeaconUpgraded: TypedContractEvent<BeaconUpgradedEvent.InputTuple, BeaconUpgradedEvent.OutputTuple, BeaconUpgradedEvent.OutputObject>;
|
|
62
|
+
"Upgraded(address)": TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
63
|
+
Upgraded: TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
57
64
|
};
|
|
58
|
-
estimateGas: {};
|
|
59
|
-
populateTransaction: {};
|
|
60
65
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdminUpgradeabilityProxy.js","sourceRoot":"","sources":["../../typechain-types/AdminUpgradeabilityProxy.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import { BaseContract,
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"getProxyAdmin(address)": FunctionFragment;
|
|
10
|
-
"getProxyImplementation(address)": FunctionFragment;
|
|
11
|
-
"owner()": FunctionFragment;
|
|
12
|
-
"renounceOwnership()": FunctionFragment;
|
|
13
|
-
"transferOwnership(address)": FunctionFragment;
|
|
14
|
-
"upgrade(address,address)": FunctionFragment;
|
|
15
|
-
"upgradeAndCall(address,address,bytes)": FunctionFragment;
|
|
16
|
-
};
|
|
17
|
-
encodeFunctionData(functionFragment: "changeProxyAdmin", values: [string, string]): string;
|
|
18
|
-
encodeFunctionData(functionFragment: "getProxyAdmin", values: [string]): string;
|
|
19
|
-
encodeFunctionData(functionFragment: "getProxyImplementation", values: [string]): string;
|
|
1
|
+
import type { BaseContract, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from "ethers";
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from "./common";
|
|
3
|
+
export interface ProxyAdminInterface extends Interface {
|
|
4
|
+
getFunction(nameOrSignature: "changeProxyAdmin" | "getProxyAdmin" | "getProxyImplementation" | "owner" | "renounceOwnership" | "transferOwnership" | "upgrade" | "upgradeAndCall"): FunctionFragment;
|
|
5
|
+
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
|
|
6
|
+
encodeFunctionData(functionFragment: "changeProxyAdmin", values: [AddressLike, AddressLike]): string;
|
|
7
|
+
encodeFunctionData(functionFragment: "getProxyAdmin", values: [AddressLike]): string;
|
|
8
|
+
encodeFunctionData(functionFragment: "getProxyImplementation", values: [AddressLike]): string;
|
|
20
9
|
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
|
|
21
10
|
encodeFunctionData(functionFragment: "renounceOwnership", values?: undefined): string;
|
|
22
|
-
encodeFunctionData(functionFragment: "transferOwnership", values: [
|
|
23
|
-
encodeFunctionData(functionFragment: "upgrade", values: [
|
|
24
|
-
encodeFunctionData(functionFragment: "upgradeAndCall", values: [
|
|
11
|
+
encodeFunctionData(functionFragment: "transferOwnership", values: [AddressLike]): string;
|
|
12
|
+
encodeFunctionData(functionFragment: "upgrade", values: [AddressLike, AddressLike]): string;
|
|
13
|
+
encodeFunctionData(functionFragment: "upgradeAndCall", values: [AddressLike, AddressLike, BytesLike]): string;
|
|
25
14
|
decodeFunctionResult(functionFragment: "changeProxyAdmin", data: BytesLike): Result;
|
|
26
15
|
decodeFunctionResult(functionFragment: "getProxyAdmin", data: BytesLike): Result;
|
|
27
16
|
decodeFunctionResult(functionFragment: "getProxyImplementation", data: BytesLike): Result;
|
|
@@ -30,124 +19,92 @@ export interface ProxyAdminInterface extends utils.Interface {
|
|
|
30
19
|
decodeFunctionResult(functionFragment: "transferOwnership", data: BytesLike): Result;
|
|
31
20
|
decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result;
|
|
32
21
|
decodeFunctionResult(functionFragment: "upgradeAndCall", data: BytesLike): Result;
|
|
33
|
-
events: {
|
|
34
|
-
"OwnershipTransferred(address,address)": EventFragment;
|
|
35
|
-
};
|
|
36
|
-
getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment;
|
|
37
22
|
}
|
|
38
|
-
export
|
|
39
|
-
|
|
40
|
-
string
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
23
|
+
export declare namespace OwnershipTransferredEvent {
|
|
24
|
+
type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike];
|
|
25
|
+
type OutputTuple = [previousOwner: string, newOwner: string];
|
|
26
|
+
interface OutputObject {
|
|
27
|
+
previousOwner: string;
|
|
28
|
+
newOwner: string;
|
|
29
|
+
}
|
|
30
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
31
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
32
|
+
type Log = TypedEventLog<Event>;
|
|
33
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
34
|
+
}
|
|
46
35
|
export interface ProxyAdmin extends BaseContract {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
attach(addressOrName: string): this;
|
|
50
|
-
deployed(): Promise<this>;
|
|
36
|
+
connect(runner?: ContractRunner | null): ProxyAdmin;
|
|
37
|
+
waitForDeployment(): Promise<this>;
|
|
51
38
|
interface: ProxyAdminInterface;
|
|
52
|
-
queryFilter<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
39
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
40
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
41
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
42
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
43
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
44
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
45
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
46
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
47
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
48
|
+
changeProxyAdmin: TypedContractMethod<[
|
|
49
|
+
proxy: AddressLike,
|
|
50
|
+
newAdmin: AddressLike
|
|
51
|
+
], [
|
|
52
|
+
void
|
|
53
|
+
], "nonpayable">;
|
|
54
|
+
getProxyAdmin: TypedContractMethod<[proxy: AddressLike], [string], "view">;
|
|
55
|
+
getProxyImplementation: TypedContractMethod<[
|
|
56
|
+
proxy: AddressLike
|
|
57
|
+
], [
|
|
58
|
+
string
|
|
59
|
+
], "view">;
|
|
60
|
+
owner: TypedContractMethod<[], [string], "view">;
|
|
61
|
+
renounceOwnership: TypedContractMethod<[], [void], "nonpayable">;
|
|
62
|
+
transferOwnership: TypedContractMethod<[
|
|
63
|
+
newOwner: AddressLike
|
|
64
|
+
], [
|
|
65
|
+
void
|
|
66
|
+
], "nonpayable">;
|
|
67
|
+
upgrade: TypedContractMethod<[
|
|
68
|
+
proxy: AddressLike,
|
|
69
|
+
implementation: AddressLike
|
|
70
|
+
], [
|
|
71
|
+
void
|
|
72
|
+
], "nonpayable">;
|
|
73
|
+
upgradeAndCall: TypedContractMethod<[
|
|
74
|
+
proxy: AddressLike,
|
|
75
|
+
implementation: AddressLike,
|
|
76
|
+
data: BytesLike
|
|
77
|
+
], [
|
|
78
|
+
void
|
|
79
|
+
], "payable">;
|
|
80
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
81
|
+
getFunction(nameOrSignature: "changeProxyAdmin"): TypedContractMethod<[
|
|
82
|
+
proxy: AddressLike,
|
|
83
|
+
newAdmin: AddressLike
|
|
84
|
+
], [
|
|
85
|
+
void
|
|
86
|
+
], "nonpayable">;
|
|
87
|
+
getFunction(nameOrSignature: "getProxyAdmin"): TypedContractMethod<[proxy: AddressLike], [string], "view">;
|
|
88
|
+
getFunction(nameOrSignature: "getProxyImplementation"): TypedContractMethod<[proxy: AddressLike], [string], "view">;
|
|
89
|
+
getFunction(nameOrSignature: "owner"): TypedContractMethod<[], [string], "view">;
|
|
90
|
+
getFunction(nameOrSignature: "renounceOwnership"): TypedContractMethod<[], [void], "nonpayable">;
|
|
91
|
+
getFunction(nameOrSignature: "transferOwnership"): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">;
|
|
92
|
+
getFunction(nameOrSignature: "upgrade"): TypedContractMethod<[
|
|
93
|
+
proxy: AddressLike,
|
|
94
|
+
implementation: AddressLike
|
|
95
|
+
], [
|
|
96
|
+
void
|
|
97
|
+
], "nonpayable">;
|
|
98
|
+
getFunction(nameOrSignature: "upgradeAndCall"): TypedContractMethod<[
|
|
99
|
+
proxy: AddressLike,
|
|
100
|
+
implementation: AddressLike,
|
|
101
|
+
data: BytesLike
|
|
102
|
+
], [
|
|
103
|
+
void
|
|
104
|
+
], "payable">;
|
|
105
|
+
getEvent(key: "OwnershipTransferred"): TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
109
106
|
filters: {
|
|
110
|
-
"OwnershipTransferred(address,address)"
|
|
111
|
-
OwnershipTransferred
|
|
112
|
-
};
|
|
113
|
-
estimateGas: {
|
|
114
|
-
changeProxyAdmin(proxy: string, newAdmin: string, overrides?: Overrides & {
|
|
115
|
-
from?: string | Promise<string>;
|
|
116
|
-
}): Promise<BigNumber>;
|
|
117
|
-
getProxyAdmin(proxy: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
118
|
-
getProxyImplementation(proxy: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
119
|
-
owner(overrides?: CallOverrides): Promise<BigNumber>;
|
|
120
|
-
renounceOwnership(overrides?: Overrides & {
|
|
121
|
-
from?: string | Promise<string>;
|
|
122
|
-
}): Promise<BigNumber>;
|
|
123
|
-
transferOwnership(newOwner: string, overrides?: Overrides & {
|
|
124
|
-
from?: string | Promise<string>;
|
|
125
|
-
}): Promise<BigNumber>;
|
|
126
|
-
upgrade(proxy: string, implementation: string, overrides?: Overrides & {
|
|
127
|
-
from?: string | Promise<string>;
|
|
128
|
-
}): Promise<BigNumber>;
|
|
129
|
-
upgradeAndCall(proxy: string, implementation: string, data: BytesLike, overrides?: PayableOverrides & {
|
|
130
|
-
from?: string | Promise<string>;
|
|
131
|
-
}): Promise<BigNumber>;
|
|
132
|
-
};
|
|
133
|
-
populateTransaction: {
|
|
134
|
-
changeProxyAdmin(proxy: string, newAdmin: string, overrides?: Overrides & {
|
|
135
|
-
from?: string | Promise<string>;
|
|
136
|
-
}): Promise<PopulatedTransaction>;
|
|
137
|
-
getProxyAdmin(proxy: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
138
|
-
getProxyImplementation(proxy: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
139
|
-
owner(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
140
|
-
renounceOwnership(overrides?: Overrides & {
|
|
141
|
-
from?: string | Promise<string>;
|
|
142
|
-
}): Promise<PopulatedTransaction>;
|
|
143
|
-
transferOwnership(newOwner: string, overrides?: Overrides & {
|
|
144
|
-
from?: string | Promise<string>;
|
|
145
|
-
}): Promise<PopulatedTransaction>;
|
|
146
|
-
upgrade(proxy: string, implementation: string, overrides?: Overrides & {
|
|
147
|
-
from?: string | Promise<string>;
|
|
148
|
-
}): Promise<PopulatedTransaction>;
|
|
149
|
-
upgradeAndCall(proxy: string, implementation: string, data: BytesLike, overrides?: PayableOverrides & {
|
|
150
|
-
from?: string | Promise<string>;
|
|
151
|
-
}): Promise<PopulatedTransaction>;
|
|
107
|
+
"OwnershipTransferred(address,address)": TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
108
|
+
OwnershipTransferred: TypedContractEvent<OwnershipTransferredEvent.InputTuple, OwnershipTransferredEvent.OutputTuple, OwnershipTransferredEvent.OutputObject>;
|
|
152
109
|
};
|
|
153
110
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProxyAdmin.js","sourceRoot":"","sources":["../../typechain-types/ProxyAdmin.ts"],"names":[],"mappings":""}
|
|
@@ -1,21 +1,50 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
export interface TypedEvent<TArgsArray extends Array<any> = any, TArgsObject = any> extends Event {
|
|
4
|
-
args: TArgsArray & TArgsObject;
|
|
1
|
+
import type { FunctionFragment, Typed, EventFragment, ContractTransaction, ContractTransactionResponse, DeferredTopicFilter, EventLog, TransactionRequest, LogDescription } from "ethers";
|
|
2
|
+
export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> extends DeferredTopicFilter {
|
|
5
3
|
}
|
|
6
|
-
export interface
|
|
4
|
+
export interface TypedContractEvent<InputTuple extends Array<any> = any, OutputTuple extends Array<any> = any, OutputObject = any> {
|
|
5
|
+
(...args: Partial<InputTuple>): TypedDeferredTopicFilter<TypedContractEvent<InputTuple, OutputTuple, OutputObject>>;
|
|
6
|
+
name: string;
|
|
7
|
+
fragment: EventFragment;
|
|
8
|
+
getFragment(...args: Partial<InputTuple>): EventFragment;
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
type __TypechainAOutputTuple<T> = T extends TypedContractEvent<infer _U, infer W> ? W : never;
|
|
11
|
+
type __TypechainOutputObject<T> = T extends TypedContractEvent<infer _U, infer _W, infer V> ? V : never;
|
|
12
|
+
export interface TypedEventLog<TCEvent extends TypedContractEvent> extends Omit<EventLog, "args"> {
|
|
13
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
10
14
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>, listener: TypedListener<TEvent>): TRes;
|
|
14
|
-
(eventName: string, listener: Listener): TRes;
|
|
15
|
+
export interface TypedLogDescription<TCEvent extends TypedContractEvent> extends Omit<LogDescription, "args"> {
|
|
16
|
+
args: __TypechainAOutputTuple<TCEvent> & __TypechainOutputObject<TCEvent>;
|
|
15
17
|
}
|
|
18
|
+
export type TypedListener<TCEvent extends TypedContractEvent> = (...listenerArg: [
|
|
19
|
+
...__TypechainAOutputTuple<TCEvent>,
|
|
20
|
+
TypedEventLog<TCEvent>,
|
|
21
|
+
...undefined[]
|
|
22
|
+
]) => void;
|
|
16
23
|
export type MinEthersFactory<C, ARGS> = {
|
|
17
24
|
deploy(...a: ARGS[]): Promise<C>;
|
|
18
25
|
};
|
|
19
26
|
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
|
|
20
27
|
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
|
|
28
|
+
export type StateMutability = "nonpayable" | "payable" | "view";
|
|
29
|
+
export type BaseOverrides = Omit<TransactionRequest, "to" | "data">;
|
|
30
|
+
export type NonPayableOverrides = Omit<BaseOverrides, "value" | "blockTag" | "enableCcipRead">;
|
|
31
|
+
export type PayableOverrides = Omit<BaseOverrides, "blockTag" | "enableCcipRead">;
|
|
32
|
+
export type ViewOverrides = Omit<TransactionRequest, "to" | "data">;
|
|
33
|
+
export type Overrides<S extends StateMutability> = S extends "nonpayable" ? NonPayableOverrides : S extends "payable" ? PayableOverrides : ViewOverrides;
|
|
34
|
+
export type PostfixOverrides<A extends Array<any>, S extends StateMutability> = A | [...A, Overrides<S>];
|
|
35
|
+
export type ContractMethodArgs<A extends Array<any>, S extends StateMutability> = PostfixOverrides<{
|
|
36
|
+
[I in keyof A]-?: A[I] | Typed;
|
|
37
|
+
}, S>;
|
|
38
|
+
export type DefaultReturnType<R> = R extends Array<any> ? R[0] : R;
|
|
39
|
+
export interface TypedContractMethod<A extends Array<any> = Array<any>, R = any, S extends StateMutability = "payable"> {
|
|
40
|
+
(...args: ContractMethodArgs<A, S>): S extends "view" ? Promise<DefaultReturnType<R>> : Promise<ContractTransactionResponse>;
|
|
41
|
+
name: string;
|
|
42
|
+
fragment: FunctionFragment;
|
|
43
|
+
getFragment(...args: ContractMethodArgs<A, S>): FunctionFragment;
|
|
44
|
+
populateTransaction(...args: ContractMethodArgs<A, S>): Promise<ContractTransaction>;
|
|
45
|
+
staticCall(...args: ContractMethodArgs<A, "view">): Promise<DefaultReturnType<R>>;
|
|
46
|
+
send(...args: ContractMethodArgs<A, S>): Promise<ContractTransactionResponse>;
|
|
47
|
+
estimateGas(...args: ContractMethodArgs<A, S>): Promise<bigint>;
|
|
48
|
+
staticCallResult(...args: ContractMethodArgs<A, "view">): Promise<R>;
|
|
49
|
+
}
|
|
21
50
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../typechain-types/common.ts"],"names":[],"mappings":""}
|