@wormhole-foundation/sdk-evm-core 0.5.0-beta.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/cjs/core.d.ts +22 -0
- package/dist/cjs/core.d.ts.map +1 -0
- package/dist/cjs/core.js +78 -0
- package/dist/cjs/core.js.map +1 -0
- package/dist/cjs/ethers-contracts/Implementation.d.ts +551 -0
- package/dist/cjs/ethers-contracts/Implementation.d.ts.map +1 -0
- package/dist/cjs/ethers-contracts/Implementation.js +3 -0
- package/dist/cjs/ethers-contracts/Implementation.js.map +1 -0
- package/dist/cjs/ethers-contracts/common.d.ts +51 -0
- package/dist/cjs/ethers-contracts/common.d.ts.map +1 -0
- package/dist/cjs/ethers-contracts/common.js +3 -0
- package/dist/cjs/ethers-contracts/common.js.map +1 -0
- package/dist/cjs/ethers-contracts/factories/Implementation__factory.d.ts +820 -0
- package/dist/cjs/ethers-contracts/factories/Implementation__factory.d.ts.map +1 -0
- package/dist/cjs/ethers-contracts/factories/Implementation__factory.js +1078 -0
- package/dist/cjs/ethers-contracts/factories/Implementation__factory.js.map +1 -0
- package/dist/cjs/ethers-contracts/factories/index.d.ts +2 -0
- package/dist/cjs/ethers-contracts/factories/index.d.ts.map +1 -0
- package/dist/cjs/ethers-contracts/factories/index.js +18 -0
- package/dist/cjs/ethers-contracts/factories/index.js.map +1 -0
- package/dist/cjs/ethers-contracts/index.d.ts +3 -0
- package/dist/cjs/ethers-contracts/index.d.ts.map +1 -0
- package/dist/cjs/ethers-contracts/index.js +19 -0
- package/dist/cjs/ethers-contracts/index.js.map +1 -0
- package/dist/cjs/index.d.ts +3 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +36 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/wormholeCore.d.ts +22 -0
- package/dist/cjs/wormholeCore.d.ts.map +1 -0
- package/dist/cjs/wormholeCore.js +75 -0
- package/dist/cjs/wormholeCore.js.map +1 -0
- package/dist/esm/core.d.ts +22 -0
- package/dist/esm/core.d.ts.map +1 -0
- package/dist/esm/core.js +74 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/ethers-contracts/Implementation.d.ts +551 -0
- package/dist/esm/ethers-contracts/Implementation.d.ts.map +1 -0
- package/dist/esm/ethers-contracts/Implementation.js +2 -0
- package/dist/esm/ethers-contracts/Implementation.js.map +1 -0
- package/dist/esm/ethers-contracts/common.d.ts +51 -0
- package/dist/esm/ethers-contracts/common.d.ts.map +1 -0
- package/dist/esm/ethers-contracts/common.js +2 -0
- package/dist/esm/ethers-contracts/common.js.map +1 -0
- package/dist/esm/ethers-contracts/factories/Implementation__factory.d.ts +820 -0
- package/dist/esm/ethers-contracts/factories/Implementation__factory.d.ts.map +1 -0
- package/dist/esm/ethers-contracts/factories/Implementation__factory.js +1074 -0
- package/dist/esm/ethers-contracts/factories/Implementation__factory.js.map +1 -0
- package/dist/esm/ethers-contracts/factories/index.d.ts +2 -0
- package/dist/esm/ethers-contracts/factories/index.d.ts.map +1 -0
- package/dist/esm/ethers-contracts/factories/index.js +2 -0
- package/dist/esm/ethers-contracts/factories/index.js.map +1 -0
- package/dist/esm/ethers-contracts/index.d.ts +3 -0
- package/dist/esm/ethers-contracts/index.d.ts.map +1 -0
- package/dist/esm/ethers-contracts/index.js +3 -0
- package/dist/esm/ethers-contracts/index.js.map +1 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/wormholeCore.d.ts +22 -0
- package/dist/esm/wormholeCore.d.ts.map +1 -0
- package/dist/esm/wormholeCore.js +71 -0
- package/dist/esm/wormholeCore.js.map +1 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/tsconfig.esm.tsbuildinfo +1 -0
- package/package.json +58 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChainsConfig, Contracts, Network, TxHash, VAA, WormholeCore, WormholeMessageId } from '@wormhole-foundation/sdk-connect';
|
|
2
|
+
import { Provider } from 'ethers';
|
|
3
|
+
import { Implementation, ImplementationInterface } from './ethers-contracts';
|
|
4
|
+
import { AnyEvmAddress, EvmChains, EvmPlatformType, EvmUnsignedTransaction } from '@wormhole-foundation/sdk-evm';
|
|
5
|
+
export declare class EvmWormholeCore<N extends Network, C extends EvmChains> implements WormholeCore<N, C> {
|
|
6
|
+
readonly network: N;
|
|
7
|
+
readonly chain: C;
|
|
8
|
+
readonly provider: Provider;
|
|
9
|
+
readonly contracts: Contracts;
|
|
10
|
+
readonly chainId: bigint;
|
|
11
|
+
readonly coreAddress: string;
|
|
12
|
+
readonly core: Implementation;
|
|
13
|
+
readonly coreIface: ImplementationInterface;
|
|
14
|
+
private constructor();
|
|
15
|
+
getMessageFee(): Promise<bigint>;
|
|
16
|
+
static fromRpc<N extends Network>(provider: Provider, config: ChainsConfig<N, EvmPlatformType>): Promise<EvmWormholeCore<N, EvmChains>>;
|
|
17
|
+
publishMessage(sender: AnyEvmAddress, message: Uint8Array, nonce: number, consistencyLevel: number): AsyncGenerator<EvmUnsignedTransaction<N, C>, void, unknown>;
|
|
18
|
+
verifyMessage(sender: AnyEvmAddress, vaa: VAA): AsyncGenerator<never, void, unknown>;
|
|
19
|
+
parseTransaction(txid: TxHash): Promise<WormholeMessageId[]>;
|
|
20
|
+
private createUnsignedTx;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,YAAY,EACZ,iBAAiB,EAElB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAsB,MAAM,QAAQ,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,u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 0;
|
|
4
|
+
const sdk_connect_1 = require("@wormhole-foundation/sdk-connect");
|
|
5
|
+
const _1 = require(".");
|
|
6
|
+
const sdk_evm_1 = require("@wormhole-foundation/sdk-evm");
|
|
7
|
+
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
|
|
8
|
+
class EvmWormholeCore {
|
|
9
|
+
network;
|
|
10
|
+
chain;
|
|
11
|
+
provider;
|
|
12
|
+
contracts;
|
|
13
|
+
chainId;
|
|
14
|
+
coreAddress;
|
|
15
|
+
core;
|
|
16
|
+
coreIface;
|
|
17
|
+
constructor(network, chain, provider, contracts) {
|
|
18
|
+
this.network = network;
|
|
19
|
+
this.chain = chain;
|
|
20
|
+
this.provider = provider;
|
|
21
|
+
this.contracts = contracts;
|
|
22
|
+
this.chainId = sdk_base_1.nativeChainIds.networkChainToNativeChainId.get(network, chain);
|
|
23
|
+
this.coreIface = _1.ethers_contracts.Implementation__factory.createInterface();
|
|
24
|
+
const address = this.contracts.coreBridge;
|
|
25
|
+
if (!address)
|
|
26
|
+
throw new Error('Core bridge address not found');
|
|
27
|
+
this.coreAddress = address;
|
|
28
|
+
this.core = _1.ethers_contracts.Implementation__factory.connect(address, provider);
|
|
29
|
+
}
|
|
30
|
+
async getMessageFee() {
|
|
31
|
+
return await this.core.messageFee.staticCall();
|
|
32
|
+
}
|
|
33
|
+
static async fromRpc(provider, config) {
|
|
34
|
+
const [network, chain] = await sdk_evm_1.EvmPlatform.chainFromRpc(provider);
|
|
35
|
+
const conf = config[chain];
|
|
36
|
+
if (conf.network !== network)
|
|
37
|
+
throw new Error(`Network mismatch: ${conf.network} != ${network}`);
|
|
38
|
+
return new EvmWormholeCore(network, chain, provider, conf.contracts);
|
|
39
|
+
}
|
|
40
|
+
async *publishMessage(sender, message, nonce, consistencyLevel) {
|
|
41
|
+
const senderAddr = new sdk_evm_1.EvmAddress(sender).toString();
|
|
42
|
+
const txReq = await this.core.publishMessage.populateTransaction(nonce, message, consistencyLevel);
|
|
43
|
+
yield this.createUnsignedTx((0, sdk_evm_1.addFrom)(txReq, senderAddr), 'WormholeCore.publishMessage');
|
|
44
|
+
}
|
|
45
|
+
async *verifyMessage(sender, vaa) {
|
|
46
|
+
throw new Error('Not implemented.');
|
|
47
|
+
}
|
|
48
|
+
async parseTransaction(txid) {
|
|
49
|
+
const receipt = await this.provider.getTransactionReceipt(txid);
|
|
50
|
+
if (receipt === null)
|
|
51
|
+
return [];
|
|
52
|
+
return receipt.logs
|
|
53
|
+
.filter((l) => {
|
|
54
|
+
return l.address === this.coreAddress;
|
|
55
|
+
})
|
|
56
|
+
.map((log) => {
|
|
57
|
+
const { topics, data } = log;
|
|
58
|
+
const parsed = this.coreIface.parseLog({
|
|
59
|
+
topics: topics.slice(),
|
|
60
|
+
data,
|
|
61
|
+
});
|
|
62
|
+
if (parsed === null)
|
|
63
|
+
return undefined;
|
|
64
|
+
const emitterAddress = new sdk_evm_1.EvmAddress(parsed.args['sender']);
|
|
65
|
+
return {
|
|
66
|
+
chain: this.chain,
|
|
67
|
+
emitter: emitterAddress.toUniversalAddress(),
|
|
68
|
+
sequence: parsed.args['sequence'],
|
|
69
|
+
};
|
|
70
|
+
})
|
|
71
|
+
.filter(sdk_connect_1.isWormholeMessageId);
|
|
72
|
+
}
|
|
73
|
+
createUnsignedTx(txReq, description, parallelizable = false) {
|
|
74
|
+
return new sdk_evm_1.EvmUnsignedTransaction((0, sdk_evm_1.addChainId)(txReq, this.chainId), this.network, this.chain, description, parallelizable);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
exports.EvmWormholeCore = EvmWormholeCore;
|
|
78
|
+
//# sourceMappingURL=core.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":";;;AAAA,kEAS0C;AAE1C,wBAAqC;AAGrC,0DASsC;AACtC,4DAA+D;AAE/D,MAAa,eAAe;IAWf;IACA;IACA;IACA;IAXF,OAAO,CAAS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,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAC7D,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,OAAO,EAAE,cAAc,CAAC,kBAAkB,EAAE;gBAC5C,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;aACb,CAAC;QACzB,CAAC,CAAC;aACD,MAAM,CAAC,iCAAmB,CAAC,CAAC;IACjC,CAAC;IAEO,gBAAgB,CACtB,KAAyB,EACzB,WAAmB,EACnB,iBAA0B,KAAK;QAE/B,OAAO,IAAI,gCAAsB,CAC/B,IAAA,oBAAU,EAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAC/B,IAAI,CAAC,OAAO,EACZ,IAAI,CAAC,KAAK,EACV,WAAW,EACX,cAAc,CACf,CAAC;IACJ,CAAC;CACF;AAtHD,0CAsHC"}
|
|
@@ -0,0 +1,551 @@
|
|
|
1
|
+
import type { BaseContract, BigNumberish, BytesLike, FunctionFragment, Result, Interface, EventFragment, AddressLike, ContractRunner, ContractMethod, Listener } from 'ethers';
|
|
2
|
+
import type { TypedContractEvent, TypedDeferredTopicFilter, TypedEventLog, TypedLogDescription, TypedListener, TypedContractMethod } from './common';
|
|
3
|
+
export declare namespace Structs {
|
|
4
|
+
type GuardianSetStruct = {
|
|
5
|
+
keys: AddressLike[];
|
|
6
|
+
expirationTime: BigNumberish;
|
|
7
|
+
};
|
|
8
|
+
type GuardianSetStructOutput = [
|
|
9
|
+
keys: string[],
|
|
10
|
+
expirationTime: bigint
|
|
11
|
+
] & {
|
|
12
|
+
keys: string[];
|
|
13
|
+
expirationTime: bigint;
|
|
14
|
+
};
|
|
15
|
+
type SignatureStruct = {
|
|
16
|
+
r: BytesLike;
|
|
17
|
+
s: BytesLike;
|
|
18
|
+
v: BigNumberish;
|
|
19
|
+
guardianIndex: BigNumberish;
|
|
20
|
+
};
|
|
21
|
+
type SignatureStructOutput = [
|
|
22
|
+
r: string,
|
|
23
|
+
s: string,
|
|
24
|
+
v: bigint,
|
|
25
|
+
guardianIndex: bigint
|
|
26
|
+
] & {
|
|
27
|
+
r: string;
|
|
28
|
+
s: string;
|
|
29
|
+
v: bigint;
|
|
30
|
+
guardianIndex: bigint;
|
|
31
|
+
};
|
|
32
|
+
type VMStruct = {
|
|
33
|
+
version: BigNumberish;
|
|
34
|
+
timestamp: BigNumberish;
|
|
35
|
+
nonce: BigNumberish;
|
|
36
|
+
emitterChainId: BigNumberish;
|
|
37
|
+
emitterAddress: BytesLike;
|
|
38
|
+
sequence: BigNumberish;
|
|
39
|
+
consistencyLevel: BigNumberish;
|
|
40
|
+
payload: BytesLike;
|
|
41
|
+
guardianSetIndex: BigNumberish;
|
|
42
|
+
signatures: Structs.SignatureStruct[];
|
|
43
|
+
hash: BytesLike;
|
|
44
|
+
};
|
|
45
|
+
type VMStructOutput = [
|
|
46
|
+
version: bigint,
|
|
47
|
+
timestamp: bigint,
|
|
48
|
+
nonce: bigint,
|
|
49
|
+
emitterChainId: bigint,
|
|
50
|
+
emitterAddress: string,
|
|
51
|
+
sequence: bigint,
|
|
52
|
+
consistencyLevel: bigint,
|
|
53
|
+
payload: string,
|
|
54
|
+
guardianSetIndex: bigint,
|
|
55
|
+
signatures: Structs.SignatureStructOutput[],
|
|
56
|
+
hash: string
|
|
57
|
+
] & {
|
|
58
|
+
version: bigint;
|
|
59
|
+
timestamp: bigint;
|
|
60
|
+
nonce: bigint;
|
|
61
|
+
emitterChainId: bigint;
|
|
62
|
+
emitterAddress: string;
|
|
63
|
+
sequence: bigint;
|
|
64
|
+
consistencyLevel: bigint;
|
|
65
|
+
payload: string;
|
|
66
|
+
guardianSetIndex: bigint;
|
|
67
|
+
signatures: Structs.SignatureStructOutput[];
|
|
68
|
+
hash: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export declare namespace GovernanceStructs {
|
|
72
|
+
type ContractUpgradeStruct = {
|
|
73
|
+
module: BytesLike;
|
|
74
|
+
action: BigNumberish;
|
|
75
|
+
chain: BigNumberish;
|
|
76
|
+
newContract: AddressLike;
|
|
77
|
+
};
|
|
78
|
+
type ContractUpgradeStructOutput = [
|
|
79
|
+
module: string,
|
|
80
|
+
action: bigint,
|
|
81
|
+
chain: bigint,
|
|
82
|
+
newContract: string
|
|
83
|
+
] & {
|
|
84
|
+
module: string;
|
|
85
|
+
action: bigint;
|
|
86
|
+
chain: bigint;
|
|
87
|
+
newContract: string;
|
|
88
|
+
};
|
|
89
|
+
type GuardianSetUpgradeStruct = {
|
|
90
|
+
module: BytesLike;
|
|
91
|
+
action: BigNumberish;
|
|
92
|
+
chain: BigNumberish;
|
|
93
|
+
newGuardianSet: Structs.GuardianSetStruct;
|
|
94
|
+
newGuardianSetIndex: BigNumberish;
|
|
95
|
+
};
|
|
96
|
+
type GuardianSetUpgradeStructOutput = [
|
|
97
|
+
module: string,
|
|
98
|
+
action: bigint,
|
|
99
|
+
chain: bigint,
|
|
100
|
+
newGuardianSet: Structs.GuardianSetStructOutput,
|
|
101
|
+
newGuardianSetIndex: bigint
|
|
102
|
+
] & {
|
|
103
|
+
module: string;
|
|
104
|
+
action: bigint;
|
|
105
|
+
chain: bigint;
|
|
106
|
+
newGuardianSet: Structs.GuardianSetStructOutput;
|
|
107
|
+
newGuardianSetIndex: bigint;
|
|
108
|
+
};
|
|
109
|
+
type RecoverChainIdStruct = {
|
|
110
|
+
module: BytesLike;
|
|
111
|
+
action: BigNumberish;
|
|
112
|
+
evmChainId: BigNumberish;
|
|
113
|
+
newChainId: BigNumberish;
|
|
114
|
+
};
|
|
115
|
+
type RecoverChainIdStructOutput = [
|
|
116
|
+
module: string,
|
|
117
|
+
action: bigint,
|
|
118
|
+
evmChainId: bigint,
|
|
119
|
+
newChainId: bigint
|
|
120
|
+
] & {
|
|
121
|
+
module: string;
|
|
122
|
+
action: bigint;
|
|
123
|
+
evmChainId: bigint;
|
|
124
|
+
newChainId: bigint;
|
|
125
|
+
};
|
|
126
|
+
type SetMessageFeeStruct = {
|
|
127
|
+
module: BytesLike;
|
|
128
|
+
action: BigNumberish;
|
|
129
|
+
chain: BigNumberish;
|
|
130
|
+
messageFee: BigNumberish;
|
|
131
|
+
};
|
|
132
|
+
type SetMessageFeeStructOutput = [
|
|
133
|
+
module: string,
|
|
134
|
+
action: bigint,
|
|
135
|
+
chain: bigint,
|
|
136
|
+
messageFee: bigint
|
|
137
|
+
] & {
|
|
138
|
+
module: string;
|
|
139
|
+
action: bigint;
|
|
140
|
+
chain: bigint;
|
|
141
|
+
messageFee: bigint;
|
|
142
|
+
};
|
|
143
|
+
type TransferFeesStruct = {
|
|
144
|
+
module: BytesLike;
|
|
145
|
+
action: BigNumberish;
|
|
146
|
+
chain: BigNumberish;
|
|
147
|
+
amount: BigNumberish;
|
|
148
|
+
recipient: BytesLike;
|
|
149
|
+
};
|
|
150
|
+
type TransferFeesStructOutput = [
|
|
151
|
+
module: string,
|
|
152
|
+
action: bigint,
|
|
153
|
+
chain: bigint,
|
|
154
|
+
amount: bigint,
|
|
155
|
+
recipient: string
|
|
156
|
+
] & {
|
|
157
|
+
module: string;
|
|
158
|
+
action: bigint;
|
|
159
|
+
chain: bigint;
|
|
160
|
+
amount: bigint;
|
|
161
|
+
recipient: string;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
export interface ImplementationInterface extends Interface {
|
|
165
|
+
getFunction(nameOrSignature: 'chainId' | 'evmChainId' | 'getCurrentGuardianSetIndex' | 'getGuardianSet' | 'getGuardianSetExpiry' | 'governanceActionIsConsumed' | 'governanceChainId' | 'governanceContract' | 'initialize' | 'isFork' | 'isInitialized' | 'messageFee' | 'nextSequence' | 'parseAndVerifyVM' | 'parseContractUpgrade' | 'parseGuardianSetUpgrade' | 'parseRecoverChainId' | 'parseSetMessageFee' | 'parseTransferFees' | 'parseVM' | 'publishMessage' | 'quorum' | 'submitContractUpgrade' | 'submitNewGuardianSet' | 'submitRecoverChainId' | 'submitSetMessageFee' | 'submitTransferFees' | 'verifySignatures' | 'verifyVM'): FunctionFragment;
|
|
166
|
+
getEvent(nameOrSignatureOrTopic: 'AdminChanged' | 'BeaconUpgraded' | 'ContractUpgraded' | 'GuardianSetAdded' | 'LogMessagePublished' | 'Upgraded'): EventFragment;
|
|
167
|
+
encodeFunctionData(functionFragment: 'chainId', values?: undefined): string;
|
|
168
|
+
encodeFunctionData(functionFragment: 'evmChainId', values?: undefined): string;
|
|
169
|
+
encodeFunctionData(functionFragment: 'getCurrentGuardianSetIndex', values?: undefined): string;
|
|
170
|
+
encodeFunctionData(functionFragment: 'getGuardianSet', values: [BigNumberish]): string;
|
|
171
|
+
encodeFunctionData(functionFragment: 'getGuardianSetExpiry', values?: undefined): string;
|
|
172
|
+
encodeFunctionData(functionFragment: 'governanceActionIsConsumed', values: [BytesLike]): string;
|
|
173
|
+
encodeFunctionData(functionFragment: 'governanceChainId', values?: undefined): string;
|
|
174
|
+
encodeFunctionData(functionFragment: 'governanceContract', values?: undefined): string;
|
|
175
|
+
encodeFunctionData(functionFragment: 'initialize', values?: undefined): string;
|
|
176
|
+
encodeFunctionData(functionFragment: 'isFork', values?: undefined): string;
|
|
177
|
+
encodeFunctionData(functionFragment: 'isInitialized', values: [AddressLike]): string;
|
|
178
|
+
encodeFunctionData(functionFragment: 'messageFee', values?: undefined): string;
|
|
179
|
+
encodeFunctionData(functionFragment: 'nextSequence', values: [AddressLike]): string;
|
|
180
|
+
encodeFunctionData(functionFragment: 'parseAndVerifyVM', values: [BytesLike]): string;
|
|
181
|
+
encodeFunctionData(functionFragment: 'parseContractUpgrade', values: [BytesLike]): string;
|
|
182
|
+
encodeFunctionData(functionFragment: 'parseGuardianSetUpgrade', values: [BytesLike]): string;
|
|
183
|
+
encodeFunctionData(functionFragment: 'parseRecoverChainId', values: [BytesLike]): string;
|
|
184
|
+
encodeFunctionData(functionFragment: 'parseSetMessageFee', values: [BytesLike]): string;
|
|
185
|
+
encodeFunctionData(functionFragment: 'parseTransferFees', values: [BytesLike]): string;
|
|
186
|
+
encodeFunctionData(functionFragment: 'parseVM', values: [BytesLike]): string;
|
|
187
|
+
encodeFunctionData(functionFragment: 'publishMessage', values: [BigNumberish, BytesLike, BigNumberish]): string;
|
|
188
|
+
encodeFunctionData(functionFragment: 'quorum', values: [BigNumberish]): string;
|
|
189
|
+
encodeFunctionData(functionFragment: 'submitContractUpgrade', values: [BytesLike]): string;
|
|
190
|
+
encodeFunctionData(functionFragment: 'submitNewGuardianSet', values: [BytesLike]): string;
|
|
191
|
+
encodeFunctionData(functionFragment: 'submitRecoverChainId', values: [BytesLike]): string;
|
|
192
|
+
encodeFunctionData(functionFragment: 'submitSetMessageFee', values: [BytesLike]): string;
|
|
193
|
+
encodeFunctionData(functionFragment: 'submitTransferFees', values: [BytesLike]): string;
|
|
194
|
+
encodeFunctionData(functionFragment: 'verifySignatures', values: [BytesLike, Structs.SignatureStruct[], Structs.GuardianSetStruct]): string;
|
|
195
|
+
encodeFunctionData(functionFragment: 'verifyVM', values: [Structs.VMStruct]): string;
|
|
196
|
+
decodeFunctionResult(functionFragment: 'chainId', data: BytesLike): Result;
|
|
197
|
+
decodeFunctionResult(functionFragment: 'evmChainId', data: BytesLike): Result;
|
|
198
|
+
decodeFunctionResult(functionFragment: 'getCurrentGuardianSetIndex', data: BytesLike): Result;
|
|
199
|
+
decodeFunctionResult(functionFragment: 'getGuardianSet', data: BytesLike): Result;
|
|
200
|
+
decodeFunctionResult(functionFragment: 'getGuardianSetExpiry', data: BytesLike): Result;
|
|
201
|
+
decodeFunctionResult(functionFragment: 'governanceActionIsConsumed', data: BytesLike): Result;
|
|
202
|
+
decodeFunctionResult(functionFragment: 'governanceChainId', data: BytesLike): Result;
|
|
203
|
+
decodeFunctionResult(functionFragment: 'governanceContract', data: BytesLike): Result;
|
|
204
|
+
decodeFunctionResult(functionFragment: 'initialize', data: BytesLike): Result;
|
|
205
|
+
decodeFunctionResult(functionFragment: 'isFork', data: BytesLike): Result;
|
|
206
|
+
decodeFunctionResult(functionFragment: 'isInitialized', data: BytesLike): Result;
|
|
207
|
+
decodeFunctionResult(functionFragment: 'messageFee', data: BytesLike): Result;
|
|
208
|
+
decodeFunctionResult(functionFragment: 'nextSequence', data: BytesLike): Result;
|
|
209
|
+
decodeFunctionResult(functionFragment: 'parseAndVerifyVM', data: BytesLike): Result;
|
|
210
|
+
decodeFunctionResult(functionFragment: 'parseContractUpgrade', data: BytesLike): Result;
|
|
211
|
+
decodeFunctionResult(functionFragment: 'parseGuardianSetUpgrade', data: BytesLike): Result;
|
|
212
|
+
decodeFunctionResult(functionFragment: 'parseRecoverChainId', data: BytesLike): Result;
|
|
213
|
+
decodeFunctionResult(functionFragment: 'parseSetMessageFee', data: BytesLike): Result;
|
|
214
|
+
decodeFunctionResult(functionFragment: 'parseTransferFees', data: BytesLike): Result;
|
|
215
|
+
decodeFunctionResult(functionFragment: 'parseVM', data: BytesLike): Result;
|
|
216
|
+
decodeFunctionResult(functionFragment: 'publishMessage', data: BytesLike): Result;
|
|
217
|
+
decodeFunctionResult(functionFragment: 'quorum', data: BytesLike): Result;
|
|
218
|
+
decodeFunctionResult(functionFragment: 'submitContractUpgrade', data: BytesLike): Result;
|
|
219
|
+
decodeFunctionResult(functionFragment: 'submitNewGuardianSet', data: BytesLike): Result;
|
|
220
|
+
decodeFunctionResult(functionFragment: 'submitRecoverChainId', data: BytesLike): Result;
|
|
221
|
+
decodeFunctionResult(functionFragment: 'submitSetMessageFee', data: BytesLike): Result;
|
|
222
|
+
decodeFunctionResult(functionFragment: 'submitTransferFees', data: BytesLike): Result;
|
|
223
|
+
decodeFunctionResult(functionFragment: 'verifySignatures', data: BytesLike): Result;
|
|
224
|
+
decodeFunctionResult(functionFragment: 'verifyVM', data: BytesLike): Result;
|
|
225
|
+
}
|
|
226
|
+
export declare namespace AdminChangedEvent {
|
|
227
|
+
type InputTuple = [previousAdmin: AddressLike, newAdmin: AddressLike];
|
|
228
|
+
type OutputTuple = [previousAdmin: string, newAdmin: string];
|
|
229
|
+
interface OutputObject {
|
|
230
|
+
previousAdmin: string;
|
|
231
|
+
newAdmin: string;
|
|
232
|
+
}
|
|
233
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
234
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
235
|
+
type Log = TypedEventLog<Event>;
|
|
236
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
237
|
+
}
|
|
238
|
+
export declare namespace BeaconUpgradedEvent {
|
|
239
|
+
type InputTuple = [beacon: AddressLike];
|
|
240
|
+
type OutputTuple = [beacon: string];
|
|
241
|
+
interface OutputObject {
|
|
242
|
+
beacon: string;
|
|
243
|
+
}
|
|
244
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
245
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
246
|
+
type Log = TypedEventLog<Event>;
|
|
247
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
248
|
+
}
|
|
249
|
+
export declare namespace ContractUpgradedEvent {
|
|
250
|
+
type InputTuple = [oldContract: AddressLike, newContract: AddressLike];
|
|
251
|
+
type OutputTuple = [oldContract: string, newContract: string];
|
|
252
|
+
interface OutputObject {
|
|
253
|
+
oldContract: string;
|
|
254
|
+
newContract: string;
|
|
255
|
+
}
|
|
256
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
257
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
258
|
+
type Log = TypedEventLog<Event>;
|
|
259
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
260
|
+
}
|
|
261
|
+
export declare namespace GuardianSetAddedEvent {
|
|
262
|
+
type InputTuple = [index: BigNumberish];
|
|
263
|
+
type OutputTuple = [index: bigint];
|
|
264
|
+
interface OutputObject {
|
|
265
|
+
index: bigint;
|
|
266
|
+
}
|
|
267
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
268
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
269
|
+
type Log = TypedEventLog<Event>;
|
|
270
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
271
|
+
}
|
|
272
|
+
export declare namespace LogMessagePublishedEvent {
|
|
273
|
+
type InputTuple = [
|
|
274
|
+
sender: AddressLike,
|
|
275
|
+
sequence: BigNumberish,
|
|
276
|
+
nonce: BigNumberish,
|
|
277
|
+
payload: BytesLike,
|
|
278
|
+
consistencyLevel: BigNumberish
|
|
279
|
+
];
|
|
280
|
+
type OutputTuple = [
|
|
281
|
+
sender: string,
|
|
282
|
+
sequence: bigint,
|
|
283
|
+
nonce: bigint,
|
|
284
|
+
payload: string,
|
|
285
|
+
consistencyLevel: bigint
|
|
286
|
+
];
|
|
287
|
+
interface OutputObject {
|
|
288
|
+
sender: string;
|
|
289
|
+
sequence: bigint;
|
|
290
|
+
nonce: bigint;
|
|
291
|
+
payload: string;
|
|
292
|
+
consistencyLevel: bigint;
|
|
293
|
+
}
|
|
294
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
295
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
296
|
+
type Log = TypedEventLog<Event>;
|
|
297
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
298
|
+
}
|
|
299
|
+
export declare namespace UpgradedEvent {
|
|
300
|
+
type InputTuple = [implementation: AddressLike];
|
|
301
|
+
type OutputTuple = [implementation: string];
|
|
302
|
+
interface OutputObject {
|
|
303
|
+
implementation: string;
|
|
304
|
+
}
|
|
305
|
+
type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
|
|
306
|
+
type Filter = TypedDeferredTopicFilter<Event>;
|
|
307
|
+
type Log = TypedEventLog<Event>;
|
|
308
|
+
type LogDescription = TypedLogDescription<Event>;
|
|
309
|
+
}
|
|
310
|
+
export interface Implementation extends BaseContract {
|
|
311
|
+
connect(runner?: ContractRunner | null): Implementation;
|
|
312
|
+
waitForDeployment(): Promise<this>;
|
|
313
|
+
interface: ImplementationInterface;
|
|
314
|
+
queryFilter<TCEvent extends TypedContractEvent>(event: TCEvent, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
315
|
+
queryFilter<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TypedEventLog<TCEvent>>>;
|
|
316
|
+
on<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
317
|
+
on<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
318
|
+
once<TCEvent extends TypedContractEvent>(event: TCEvent, listener: TypedListener<TCEvent>): Promise<this>;
|
|
319
|
+
once<TCEvent extends TypedContractEvent>(filter: TypedDeferredTopicFilter<TCEvent>, listener: TypedListener<TCEvent>): Promise<this>;
|
|
320
|
+
listeners<TCEvent extends TypedContractEvent>(event: TCEvent): Promise<Array<TypedListener<TCEvent>>>;
|
|
321
|
+
listeners(eventName?: string): Promise<Array<Listener>>;
|
|
322
|
+
removeAllListeners<TCEvent extends TypedContractEvent>(event?: TCEvent): Promise<this>;
|
|
323
|
+
chainId: TypedContractMethod<[], [bigint], 'view'>;
|
|
324
|
+
evmChainId: TypedContractMethod<[], [bigint], 'view'>;
|
|
325
|
+
getCurrentGuardianSetIndex: TypedContractMethod<[], [bigint], 'view'>;
|
|
326
|
+
getGuardianSet: TypedContractMethod<[
|
|
327
|
+
index: BigNumberish
|
|
328
|
+
], [
|
|
329
|
+
Structs.GuardianSetStructOutput
|
|
330
|
+
], 'view'>;
|
|
331
|
+
getGuardianSetExpiry: TypedContractMethod<[], [bigint], 'view'>;
|
|
332
|
+
governanceActionIsConsumed: TypedContractMethod<[
|
|
333
|
+
hash: BytesLike
|
|
334
|
+
], [
|
|
335
|
+
boolean
|
|
336
|
+
], 'view'>;
|
|
337
|
+
governanceChainId: TypedContractMethod<[], [bigint], 'view'>;
|
|
338
|
+
governanceContract: TypedContractMethod<[], [string], 'view'>;
|
|
339
|
+
initialize: TypedContractMethod<[], [void], 'nonpayable'>;
|
|
340
|
+
isFork: TypedContractMethod<[], [boolean], 'view'>;
|
|
341
|
+
isInitialized: TypedContractMethod<[impl: AddressLike], [boolean], 'view'>;
|
|
342
|
+
messageFee: TypedContractMethod<[], [bigint], 'view'>;
|
|
343
|
+
nextSequence: TypedContractMethod<[emitter: AddressLike], [bigint], 'view'>;
|
|
344
|
+
parseAndVerifyVM: TypedContractMethod<[
|
|
345
|
+
encodedVM: BytesLike
|
|
346
|
+
], [
|
|
347
|
+
[
|
|
348
|
+
Structs.VMStructOutput,
|
|
349
|
+
boolean,
|
|
350
|
+
string
|
|
351
|
+
] & {
|
|
352
|
+
vm: Structs.VMStructOutput;
|
|
353
|
+
valid: boolean;
|
|
354
|
+
reason: string;
|
|
355
|
+
}
|
|
356
|
+
], 'view'>;
|
|
357
|
+
parseContractUpgrade: TypedContractMethod<[
|
|
358
|
+
encodedUpgrade: BytesLike
|
|
359
|
+
], [
|
|
360
|
+
GovernanceStructs.ContractUpgradeStructOutput
|
|
361
|
+
], 'view'>;
|
|
362
|
+
parseGuardianSetUpgrade: TypedContractMethod<[
|
|
363
|
+
encodedUpgrade: BytesLike
|
|
364
|
+
], [
|
|
365
|
+
GovernanceStructs.GuardianSetUpgradeStructOutput
|
|
366
|
+
], 'view'>;
|
|
367
|
+
parseRecoverChainId: TypedContractMethod<[
|
|
368
|
+
encodedRecoverChainId: BytesLike
|
|
369
|
+
], [
|
|
370
|
+
GovernanceStructs.RecoverChainIdStructOutput
|
|
371
|
+
], 'view'>;
|
|
372
|
+
parseSetMessageFee: TypedContractMethod<[
|
|
373
|
+
encodedSetMessageFee: BytesLike
|
|
374
|
+
], [
|
|
375
|
+
GovernanceStructs.SetMessageFeeStructOutput
|
|
376
|
+
], 'view'>;
|
|
377
|
+
parseTransferFees: TypedContractMethod<[
|
|
378
|
+
encodedTransferFees: BytesLike
|
|
379
|
+
], [
|
|
380
|
+
GovernanceStructs.TransferFeesStructOutput
|
|
381
|
+
], 'view'>;
|
|
382
|
+
parseVM: TypedContractMethod<[
|
|
383
|
+
encodedVM: BytesLike
|
|
384
|
+
], [
|
|
385
|
+
Structs.VMStructOutput
|
|
386
|
+
], 'view'>;
|
|
387
|
+
publishMessage: TypedContractMethod<[
|
|
388
|
+
nonce: BigNumberish,
|
|
389
|
+
payload: BytesLike,
|
|
390
|
+
consistencyLevel: BigNumberish
|
|
391
|
+
], [
|
|
392
|
+
bigint
|
|
393
|
+
], 'payable'>;
|
|
394
|
+
quorum: TypedContractMethod<[numGuardians: BigNumberish], [bigint], 'view'>;
|
|
395
|
+
submitContractUpgrade: TypedContractMethod<[
|
|
396
|
+
_vm: BytesLike
|
|
397
|
+
], [
|
|
398
|
+
void
|
|
399
|
+
], 'nonpayable'>;
|
|
400
|
+
submitNewGuardianSet: TypedContractMethod<[
|
|
401
|
+
_vm: BytesLike
|
|
402
|
+
], [
|
|
403
|
+
void
|
|
404
|
+
], 'nonpayable'>;
|
|
405
|
+
submitRecoverChainId: TypedContractMethod<[
|
|
406
|
+
_vm: BytesLike
|
|
407
|
+
], [
|
|
408
|
+
void
|
|
409
|
+
], 'nonpayable'>;
|
|
410
|
+
submitSetMessageFee: TypedContractMethod<[
|
|
411
|
+
_vm: BytesLike
|
|
412
|
+
], [
|
|
413
|
+
void
|
|
414
|
+
], 'nonpayable'>;
|
|
415
|
+
submitTransferFees: TypedContractMethod<[
|
|
416
|
+
_vm: BytesLike
|
|
417
|
+
], [
|
|
418
|
+
void
|
|
419
|
+
], 'nonpayable'>;
|
|
420
|
+
verifySignatures: TypedContractMethod<[
|
|
421
|
+
hash: BytesLike,
|
|
422
|
+
signatures: Structs.SignatureStruct[],
|
|
423
|
+
guardianSet: Structs.GuardianSetStruct
|
|
424
|
+
], [
|
|
425
|
+
[boolean, string] & {
|
|
426
|
+
valid: boolean;
|
|
427
|
+
reason: string;
|
|
428
|
+
}
|
|
429
|
+
], 'view'>;
|
|
430
|
+
verifyVM: TypedContractMethod<[
|
|
431
|
+
vm: Structs.VMStruct
|
|
432
|
+
], [
|
|
433
|
+
[boolean, string] & {
|
|
434
|
+
valid: boolean;
|
|
435
|
+
reason: string;
|
|
436
|
+
}
|
|
437
|
+
], 'view'>;
|
|
438
|
+
getFunction<T extends ContractMethod = ContractMethod>(key: string | FunctionFragment): T;
|
|
439
|
+
getFunction(nameOrSignature: 'chainId'): TypedContractMethod<[], [bigint], 'view'>;
|
|
440
|
+
getFunction(nameOrSignature: 'evmChainId'): TypedContractMethod<[], [bigint], 'view'>;
|
|
441
|
+
getFunction(nameOrSignature: 'getCurrentGuardianSetIndex'): TypedContractMethod<[], [bigint], 'view'>;
|
|
442
|
+
getFunction(nameOrSignature: 'getGuardianSet'): TypedContractMethod<[
|
|
443
|
+
index: BigNumberish
|
|
444
|
+
], [
|
|
445
|
+
Structs.GuardianSetStructOutput
|
|
446
|
+
], 'view'>;
|
|
447
|
+
getFunction(nameOrSignature: 'getGuardianSetExpiry'): TypedContractMethod<[], [bigint], 'view'>;
|
|
448
|
+
getFunction(nameOrSignature: 'governanceActionIsConsumed'): TypedContractMethod<[hash: BytesLike], [boolean], 'view'>;
|
|
449
|
+
getFunction(nameOrSignature: 'governanceChainId'): TypedContractMethod<[], [bigint], 'view'>;
|
|
450
|
+
getFunction(nameOrSignature: 'governanceContract'): TypedContractMethod<[], [string], 'view'>;
|
|
451
|
+
getFunction(nameOrSignature: 'initialize'): TypedContractMethod<[], [void], 'nonpayable'>;
|
|
452
|
+
getFunction(nameOrSignature: 'isFork'): TypedContractMethod<[], [boolean], 'view'>;
|
|
453
|
+
getFunction(nameOrSignature: 'isInitialized'): TypedContractMethod<[impl: AddressLike], [boolean], 'view'>;
|
|
454
|
+
getFunction(nameOrSignature: 'messageFee'): TypedContractMethod<[], [bigint], 'view'>;
|
|
455
|
+
getFunction(nameOrSignature: 'nextSequence'): TypedContractMethod<[emitter: AddressLike], [bigint], 'view'>;
|
|
456
|
+
getFunction(nameOrSignature: 'parseAndVerifyVM'): TypedContractMethod<[
|
|
457
|
+
encodedVM: BytesLike
|
|
458
|
+
], [
|
|
459
|
+
[
|
|
460
|
+
Structs.VMStructOutput,
|
|
461
|
+
boolean,
|
|
462
|
+
string
|
|
463
|
+
] & {
|
|
464
|
+
vm: Structs.VMStructOutput;
|
|
465
|
+
valid: boolean;
|
|
466
|
+
reason: string;
|
|
467
|
+
}
|
|
468
|
+
], 'view'>;
|
|
469
|
+
getFunction(nameOrSignature: 'parseContractUpgrade'): TypedContractMethod<[
|
|
470
|
+
encodedUpgrade: BytesLike
|
|
471
|
+
], [
|
|
472
|
+
GovernanceStructs.ContractUpgradeStructOutput
|
|
473
|
+
], 'view'>;
|
|
474
|
+
getFunction(nameOrSignature: 'parseGuardianSetUpgrade'): TypedContractMethod<[
|
|
475
|
+
encodedUpgrade: BytesLike
|
|
476
|
+
], [
|
|
477
|
+
GovernanceStructs.GuardianSetUpgradeStructOutput
|
|
478
|
+
], 'view'>;
|
|
479
|
+
getFunction(nameOrSignature: 'parseRecoverChainId'): TypedContractMethod<[
|
|
480
|
+
encodedRecoverChainId: BytesLike
|
|
481
|
+
], [
|
|
482
|
+
GovernanceStructs.RecoverChainIdStructOutput
|
|
483
|
+
], 'view'>;
|
|
484
|
+
getFunction(nameOrSignature: 'parseSetMessageFee'): TypedContractMethod<[
|
|
485
|
+
encodedSetMessageFee: BytesLike
|
|
486
|
+
], [
|
|
487
|
+
GovernanceStructs.SetMessageFeeStructOutput
|
|
488
|
+
], 'view'>;
|
|
489
|
+
getFunction(nameOrSignature: 'parseTransferFees'): TypedContractMethod<[
|
|
490
|
+
encodedTransferFees: BytesLike
|
|
491
|
+
], [
|
|
492
|
+
GovernanceStructs.TransferFeesStructOutput
|
|
493
|
+
], 'view'>;
|
|
494
|
+
getFunction(nameOrSignature: 'parseVM'): TypedContractMethod<[
|
|
495
|
+
encodedVM: BytesLike
|
|
496
|
+
], [
|
|
497
|
+
Structs.VMStructOutput
|
|
498
|
+
], 'view'>;
|
|
499
|
+
getFunction(nameOrSignature: 'publishMessage'): TypedContractMethod<[
|
|
500
|
+
nonce: BigNumberish,
|
|
501
|
+
payload: BytesLike,
|
|
502
|
+
consistencyLevel: BigNumberish
|
|
503
|
+
], [
|
|
504
|
+
bigint
|
|
505
|
+
], 'payable'>;
|
|
506
|
+
getFunction(nameOrSignature: 'quorum'): TypedContractMethod<[numGuardians: BigNumberish], [bigint], 'view'>;
|
|
507
|
+
getFunction(nameOrSignature: 'submitContractUpgrade'): TypedContractMethod<[_vm: BytesLike], [void], 'nonpayable'>;
|
|
508
|
+
getFunction(nameOrSignature: 'submitNewGuardianSet'): TypedContractMethod<[_vm: BytesLike], [void], 'nonpayable'>;
|
|
509
|
+
getFunction(nameOrSignature: 'submitRecoverChainId'): TypedContractMethod<[_vm: BytesLike], [void], 'nonpayable'>;
|
|
510
|
+
getFunction(nameOrSignature: 'submitSetMessageFee'): TypedContractMethod<[_vm: BytesLike], [void], 'nonpayable'>;
|
|
511
|
+
getFunction(nameOrSignature: 'submitTransferFees'): TypedContractMethod<[_vm: BytesLike], [void], 'nonpayable'>;
|
|
512
|
+
getFunction(nameOrSignature: 'verifySignatures'): TypedContractMethod<[
|
|
513
|
+
hash: BytesLike,
|
|
514
|
+
signatures: Structs.SignatureStruct[],
|
|
515
|
+
guardianSet: Structs.GuardianSetStruct
|
|
516
|
+
], [
|
|
517
|
+
[boolean, string] & {
|
|
518
|
+
valid: boolean;
|
|
519
|
+
reason: string;
|
|
520
|
+
}
|
|
521
|
+
], 'view'>;
|
|
522
|
+
getFunction(nameOrSignature: 'verifyVM'): TypedContractMethod<[
|
|
523
|
+
vm: Structs.VMStruct
|
|
524
|
+
], [
|
|
525
|
+
[boolean, string] & {
|
|
526
|
+
valid: boolean;
|
|
527
|
+
reason: string;
|
|
528
|
+
}
|
|
529
|
+
], 'view'>;
|
|
530
|
+
getEvent(key: 'AdminChanged'): TypedContractEvent<AdminChangedEvent.InputTuple, AdminChangedEvent.OutputTuple, AdminChangedEvent.OutputObject>;
|
|
531
|
+
getEvent(key: 'BeaconUpgraded'): TypedContractEvent<BeaconUpgradedEvent.InputTuple, BeaconUpgradedEvent.OutputTuple, BeaconUpgradedEvent.OutputObject>;
|
|
532
|
+
getEvent(key: 'ContractUpgraded'): TypedContractEvent<ContractUpgradedEvent.InputTuple, ContractUpgradedEvent.OutputTuple, ContractUpgradedEvent.OutputObject>;
|
|
533
|
+
getEvent(key: 'GuardianSetAdded'): TypedContractEvent<GuardianSetAddedEvent.InputTuple, GuardianSetAddedEvent.OutputTuple, GuardianSetAddedEvent.OutputObject>;
|
|
534
|
+
getEvent(key: 'LogMessagePublished'): TypedContractEvent<LogMessagePublishedEvent.InputTuple, LogMessagePublishedEvent.OutputTuple, LogMessagePublishedEvent.OutputObject>;
|
|
535
|
+
getEvent(key: 'Upgraded'): TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
536
|
+
filters: {
|
|
537
|
+
'AdminChanged(address,address)': TypedContractEvent<AdminChangedEvent.InputTuple, AdminChangedEvent.OutputTuple, AdminChangedEvent.OutputObject>;
|
|
538
|
+
AdminChanged: TypedContractEvent<AdminChangedEvent.InputTuple, AdminChangedEvent.OutputTuple, AdminChangedEvent.OutputObject>;
|
|
539
|
+
'BeaconUpgraded(address)': TypedContractEvent<BeaconUpgradedEvent.InputTuple, BeaconUpgradedEvent.OutputTuple, BeaconUpgradedEvent.OutputObject>;
|
|
540
|
+
BeaconUpgraded: TypedContractEvent<BeaconUpgradedEvent.InputTuple, BeaconUpgradedEvent.OutputTuple, BeaconUpgradedEvent.OutputObject>;
|
|
541
|
+
'ContractUpgraded(address,address)': TypedContractEvent<ContractUpgradedEvent.InputTuple, ContractUpgradedEvent.OutputTuple, ContractUpgradedEvent.OutputObject>;
|
|
542
|
+
ContractUpgraded: TypedContractEvent<ContractUpgradedEvent.InputTuple, ContractUpgradedEvent.OutputTuple, ContractUpgradedEvent.OutputObject>;
|
|
543
|
+
'GuardianSetAdded(uint32)': TypedContractEvent<GuardianSetAddedEvent.InputTuple, GuardianSetAddedEvent.OutputTuple, GuardianSetAddedEvent.OutputObject>;
|
|
544
|
+
GuardianSetAdded: TypedContractEvent<GuardianSetAddedEvent.InputTuple, GuardianSetAddedEvent.OutputTuple, GuardianSetAddedEvent.OutputObject>;
|
|
545
|
+
'LogMessagePublished(address,uint64,uint32,bytes,uint8)': TypedContractEvent<LogMessagePublishedEvent.InputTuple, LogMessagePublishedEvent.OutputTuple, LogMessagePublishedEvent.OutputObject>;
|
|
546
|
+
LogMessagePublished: TypedContractEvent<LogMessagePublishedEvent.InputTuple, LogMessagePublishedEvent.OutputTuple, LogMessagePublishedEvent.OutputObject>;
|
|
547
|
+
'Upgraded(address)': TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
548
|
+
Upgraded: TypedContractEvent<UpgradedEvent.InputTuple, UpgradedEvent.OutputTuple, UpgradedEvent.OutputObject>;
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
//# sourceMappingURL=Implementation.d.ts.map
|