@layerzerolabs/onesig-evm 0.0.9 → 0.0.11
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/artifacts/contracts/ExecutorStore.sol/ExecutorStore.json +164 -0
- package/artifacts/contracts/MultiSig.sol/MultiSig.json +1 -1
- package/artifacts/contracts/OneSig.sol/OneSig.json +188 -6
- package/artifacts-tron/contracts/ExecutorStore.sol/ExecutorStore.json +164 -0
- package/artifacts-tron/contracts/MultiSig.sol/MultiSig.json +1 -1
- package/artifacts-tron/contracts/OneSig.sol/OneSig.json +188 -6
- package/artifacts-zk/contracts/ExecutorStore.sol/ExecutorStore.json +165 -0
- package/artifacts-zk/contracts/MultiSig.sol/MultiSig.json +1 -1
- package/artifacts-zk/contracts/OneSig.sol/OneSig.json +188 -6
- package/contracts/ExecutorStore.sol +137 -0
- package/contracts/MultiSig.sol +1 -1
- package/contracts/OneSig.sol +32 -6
- package/dist/index.d.mts +12 -0
- package/dist/index.mjs +20 -0
- package/package.json +3 -3
- package/typechain-types/contracts/ExecutorStore.ts +286 -0
- package/typechain-types/contracts/MultiSig.ts +5 -2
- package/typechain-types/contracts/OneSig.ts +247 -2
- package/typechain-types/contracts/index.ts +1 -0
- package/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory.ts +1 -1
- package/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/MerkleProof__factory.ts +1 -1
- package/typechain-types/factories/contracts/ExecutorStore__factory.ts +179 -0
- package/typechain-types/factories/contracts/MultiSig__factory.ts +1 -1
- package/typechain-types/factories/contracts/OneSig__factory.ts +199 -9
- package/typechain-types/factories/contracts/index.ts +1 -0
- package/typechain-types/factories/contracts/mocks/MockOApp__factory.ts +1 -1
- package/typechain-types/hardhat.d.ts +9 -0
- package/typechain-types/index.ts +2 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// SPDX-License-Identifier: GPL-3.0
|
|
2
|
+
|
|
3
|
+
pragma solidity ^0.8.22;
|
|
4
|
+
|
|
5
|
+
import { EnumerableSet } from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
|
|
6
|
+
import { SelfCallable } from "./lib/SelfCallable.sol";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @title ExecutorStore
|
|
10
|
+
* @notice Abstract contract that manages a set of executors and a whether they are required.
|
|
11
|
+
* @dev Uses EnumerableSet to store executor addresses
|
|
12
|
+
*/
|
|
13
|
+
abstract contract ExecutorStore is SelfCallable {
|
|
14
|
+
using EnumerableSet for EnumerableSet.AddressSet;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @dev Set of available executors for the MultiSig.
|
|
18
|
+
*/
|
|
19
|
+
EnumerableSet.AddressSet internal executorSet;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @notice Whether the executor permission is required to execute a transaction.
|
|
23
|
+
*/
|
|
24
|
+
bool public executorRequired;
|
|
25
|
+
|
|
26
|
+
/// @notice Error thrown when an executor address is invalid.
|
|
27
|
+
/// @dev This error is thrown when the address is zero.
|
|
28
|
+
error InvalidExecutor();
|
|
29
|
+
|
|
30
|
+
/// @notice Error thrown when attempting to add an execute who is already active.
|
|
31
|
+
/// @param executor The address of the executor.
|
|
32
|
+
error ExecutorAlreadyActive(address executor);
|
|
33
|
+
|
|
34
|
+
/// @notice Error thrown when attempting to remove an execute who is not found.
|
|
35
|
+
/// @param executor The address of the executor.
|
|
36
|
+
error ExecutorNotFound(address executor);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @notice Emitted when an executor's active status is updated.
|
|
40
|
+
* @param executor The address of the executor.
|
|
41
|
+
* @param active True if added, false if removed.
|
|
42
|
+
*/
|
|
43
|
+
event ExecutorSet(address indexed executor, bool active);
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* @notice Emitted when the executor required state is updated.
|
|
47
|
+
* @param required The new state
|
|
48
|
+
*/
|
|
49
|
+
event ExecutorRequiredSet(bool required);
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @dev Initializes the ExecutorStore with a list of executors and sets whether executors are required.
|
|
53
|
+
* @param _executors Array of executor addresses, can be empty.
|
|
54
|
+
* @dev If the array is empty, executorsRequired will be set to false.
|
|
55
|
+
*/
|
|
56
|
+
constructor(address[] memory _executors, bool _executorRequired) {
|
|
57
|
+
for (uint256 i = 0; i < _executors.length; i++) {
|
|
58
|
+
_addExecutor(_executors[i]);
|
|
59
|
+
}
|
|
60
|
+
_setExecutorRequired(_executorRequired);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @dev Sets whether executors are required.
|
|
65
|
+
* @param _executorRequired The new threshold value.
|
|
66
|
+
*/
|
|
67
|
+
function setExecutorRequired(bool _executorRequired) external onlySelfCall {
|
|
68
|
+
_setExecutorRequired(_executorRequired);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* @dev Internal function to set whether executors are required for this MultiSig.
|
|
73
|
+
* @param _executorRequired The new value.
|
|
74
|
+
*/
|
|
75
|
+
function _setExecutorRequired(bool _executorRequired) internal {
|
|
76
|
+
executorRequired = _executorRequired;
|
|
77
|
+
emit ExecutorRequiredSet(_executorRequired);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @notice Adds or removes an executor from this MultiSig.
|
|
82
|
+
* @dev Only callable via the MultiSig contract itself.
|
|
83
|
+
* @param _executor The address of the executor to add/remove.
|
|
84
|
+
* @param _active True to add executor, false to remove executor.
|
|
85
|
+
*/
|
|
86
|
+
function setExecutor(address _executor, bool _active) external onlySelfCall {
|
|
87
|
+
if (_active) {
|
|
88
|
+
_addExecutor(_executor);
|
|
89
|
+
} else {
|
|
90
|
+
_removeExecutor(_executor);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @dev Internal function to add an executor.
|
|
96
|
+
* @param _executor The address of the executor to add.
|
|
97
|
+
*/
|
|
98
|
+
function _addExecutor(address _executor) internal {
|
|
99
|
+
if (_executor == address(0)) revert InvalidExecutor();
|
|
100
|
+
if (!executorSet.add(_executor)) revert ExecutorAlreadyActive(_executor);
|
|
101
|
+
emit ExecutorSet(_executor, true);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @dev Internal function to remove an executor.
|
|
106
|
+
* @param _executor The address of the executor to remove.
|
|
107
|
+
*/
|
|
108
|
+
function _removeExecutor(address _executor) internal {
|
|
109
|
+
if (!executorSet.remove(_executor)) revert ExecutorNotFound(_executor);
|
|
110
|
+
emit ExecutorSet(_executor, false);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* @notice Returns the list of all active executors.
|
|
115
|
+
* @return An array of addresses representing the current set of executors.
|
|
116
|
+
*/
|
|
117
|
+
function getExecutors() public view returns (address[] memory) {
|
|
118
|
+
return executorSet.values();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @notice Checks if a given address is in the set of executors.
|
|
123
|
+
* @param _executor The address to check.
|
|
124
|
+
* @return True if the address is a executor, otherwise false.
|
|
125
|
+
*/
|
|
126
|
+
function isExecutor(address _executor) public view returns (bool) {
|
|
127
|
+
return executorSet.contains(_executor);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* @notice Returns the total number of active executors.
|
|
132
|
+
* @return The number of executors currently active.
|
|
133
|
+
*/
|
|
134
|
+
function totalExecutors() public view returns (uint256) {
|
|
135
|
+
return executorSet.length();
|
|
136
|
+
}
|
|
137
|
+
}
|
package/contracts/MultiSig.sol
CHANGED
|
@@ -55,7 +55,7 @@ abstract contract MultiSig is SelfCallable {
|
|
|
55
55
|
* @param signer The address of the signer.
|
|
56
56
|
* @param active True if added, false if removed.
|
|
57
57
|
*/
|
|
58
|
-
event SignerSet(address signer, bool active);
|
|
58
|
+
event SignerSet(address indexed signer, bool active);
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* @notice Emitted when the threshold for signatures is set.
|
package/contracts/OneSig.sol
CHANGED
|
@@ -5,6 +5,7 @@ pragma solidity ^0.8.22;
|
|
|
5
5
|
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
|
|
6
6
|
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
|
7
7
|
import { MultiSig } from "./MultiSig.sol";
|
|
8
|
+
import { ExecutorStore } from "./ExecutorStore.sol";
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* @title OneSig
|
|
@@ -14,7 +15,7 @@ import { MultiSig } from "./MultiSig.sol";
|
|
|
14
15
|
* provided the Merkle proof is valid and the threshold of signers is met.
|
|
15
16
|
* @dev Inherits from MultiSig for signature threshold logic.
|
|
16
17
|
*/
|
|
17
|
-
contract OneSig is MultiSig, ReentrancyGuard {
|
|
18
|
+
contract OneSig is MultiSig, ReentrancyGuard, ExecutorStore {
|
|
18
19
|
/// @notice The version string of the OneSig contract.
|
|
19
20
|
string public constant VERSION = "0.0.1";
|
|
20
21
|
|
|
@@ -95,6 +96,9 @@ contract OneSig is MultiSig, ReentrancyGuard {
|
|
|
95
96
|
/// @param index The index of the failing call within the transaction.
|
|
96
97
|
error ExecutionFailed(uint256 index);
|
|
97
98
|
|
|
99
|
+
/// @notice Error thrown when a function is not called from an executor or signer.
|
|
100
|
+
error OnlyExecutorOrSigner();
|
|
101
|
+
|
|
98
102
|
/**
|
|
99
103
|
* @notice Call to be executed as part of a Transaction.calls.
|
|
100
104
|
* - OneSig -> [Arbitrary contract].
|
|
@@ -123,20 +127,32 @@ contract OneSig is MultiSig, ReentrancyGuard {
|
|
|
123
127
|
bytes32[] proof;
|
|
124
128
|
}
|
|
125
129
|
|
|
130
|
+
/**
|
|
131
|
+
* @dev Restricts access to functions so they can only be called via an executor, OR a multisig signer.
|
|
132
|
+
*/
|
|
133
|
+
modifier onlyExecutorOrSigner() {
|
|
134
|
+
if (!canExecuteTransaction(msg.sender)) revert OnlyExecutorOrSigner();
|
|
135
|
+
_;
|
|
136
|
+
}
|
|
137
|
+
|
|
126
138
|
/**
|
|
127
139
|
* @notice Constructor to initialize the OneSig contract.
|
|
128
140
|
* @dev Inherits MultiSig(_signers, _threshold).
|
|
141
|
+
* @param _oneSigId A unique identifier per deployment, (typically block.chainid).
|
|
129
142
|
* @param _signers The list of signers authorized to sign transactions.
|
|
130
143
|
* @param _threshold The initial threshold of signers required to execute a transaction.
|
|
131
|
-
* @param
|
|
144
|
+
* @param _executors The list of executors authorized to execute transactions.
|
|
145
|
+
* @param _executorRequired If executors are required to execute transactions.
|
|
132
146
|
* @param _seed The random seed to encode into the signatures/root.
|
|
133
147
|
*/
|
|
134
148
|
constructor(
|
|
149
|
+
uint64 _oneSigId,
|
|
135
150
|
address[] memory _signers,
|
|
136
151
|
uint256 _threshold,
|
|
137
|
-
|
|
152
|
+
address[] memory _executors,
|
|
153
|
+
bool _executorRequired,
|
|
138
154
|
bytes32 _seed
|
|
139
|
-
) MultiSig(_signers, _threshold) {
|
|
155
|
+
) MultiSig(_signers, _threshold) ExecutorStore(_executors, _executorRequired) {
|
|
140
156
|
ONE_SIG_ID = _oneSigId;
|
|
141
157
|
_setSeed(_seed);
|
|
142
158
|
}
|
|
@@ -151,7 +167,7 @@ contract OneSig is MultiSig, ReentrancyGuard {
|
|
|
151
167
|
}
|
|
152
168
|
|
|
153
169
|
/**
|
|
154
|
-
* @notice
|
|
170
|
+
* @notice Sets the contract's seed.
|
|
155
171
|
* @dev Only callable via MultiSig functionality (i.e., requires threshold signatures from signers).
|
|
156
172
|
* @param _seed The new seed value.
|
|
157
173
|
*/
|
|
@@ -173,7 +189,7 @@ contract OneSig is MultiSig, ReentrancyGuard {
|
|
|
173
189
|
bytes32 _merkleRoot,
|
|
174
190
|
uint256 _expiry,
|
|
175
191
|
bytes calldata _signatures
|
|
176
|
-
) public payable virtual nonReentrant {
|
|
192
|
+
) public payable virtual nonReentrant onlyExecutorOrSigner {
|
|
177
193
|
// Verify the merkle root and signatures
|
|
178
194
|
verifyMerkleRoot(_merkleRoot, _expiry, _signatures);
|
|
179
195
|
|
|
@@ -255,6 +271,16 @@ contract OneSig is MultiSig, ReentrancyGuard {
|
|
|
255
271
|
);
|
|
256
272
|
}
|
|
257
273
|
|
|
274
|
+
/**
|
|
275
|
+
* @notice Checks if the a given address can execute a transaction.
|
|
276
|
+
* @param _sender The address of the message sender.
|
|
277
|
+
* @return True if executeTransaction can be called by the executor, otherwise false.
|
|
278
|
+
*/
|
|
279
|
+
function canExecuteTransaction(address _sender) public view returns (bool) {
|
|
280
|
+
// If the flag is set to false, then ANYONE can execute permissionlessly, otherwise the msg.sender must be a executor, or a signer
|
|
281
|
+
return (!executorRequired || isExecutor(_sender) || isSigner(_sender));
|
|
282
|
+
}
|
|
283
|
+
|
|
258
284
|
/**
|
|
259
285
|
* @notice Fallback function to receive ether.
|
|
260
286
|
* @dev Allows the contract to accept ETH.
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BigNumber } from 'ethers';
|
|
2
|
+
import { BaseLeafData, GenerateLeafsResult } from '@layerzerolabs/onesig-core';
|
|
3
|
+
|
|
4
|
+
interface ETHTransactionCallData {
|
|
5
|
+
to: string;
|
|
6
|
+
value: BigNumber;
|
|
7
|
+
data: string;
|
|
8
|
+
}
|
|
9
|
+
type ETHLeafData = BaseLeafData<string, ETHTransactionCallData>;
|
|
10
|
+
declare function evmLeafGenerator(leafs: ETHLeafData[]): GenerateLeafsResult<ETHLeafData>;
|
|
11
|
+
|
|
12
|
+
export { type ETHLeafData, evmLeafGenerator };
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import { ethers } from "ethers";
|
|
3
|
+
function evmLeafGenerator(leafs) {
|
|
4
|
+
return {
|
|
5
|
+
leafs,
|
|
6
|
+
encodeAddress(address) {
|
|
7
|
+
return Buffer.from(address.substring(2).padStart(64, "0"), "hex");
|
|
8
|
+
},
|
|
9
|
+
encodeCalls(calls) {
|
|
10
|
+
const hexString = ethers.utils.defaultAbiCoder.encode(
|
|
11
|
+
["tuple(address to, uint256 value, bytes data)[]"],
|
|
12
|
+
[calls]
|
|
13
|
+
);
|
|
14
|
+
return Buffer.from(hexString.substring(2), "hex");
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
evmLeafGenerator
|
|
20
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@layerzerolabs/onesig-evm",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"license": "GPL-3.0-only",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"ethers": "^5.7.2",
|
|
38
|
-
"@layerzerolabs/onesig-core": "0.0.
|
|
38
|
+
"@layerzerolabs/onesig-core": "0.0.9"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@babel/core": "^7.23.9",
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"access": "restricted"
|
|
89
89
|
},
|
|
90
90
|
"scripts": {
|
|
91
|
-
"build:js": "pnpm tsup",
|
|
91
|
+
"build:js": "pnpm tsup --config ../../tsup.config.ts ./src/index.ts",
|
|
92
92
|
"clean": "pnpm clean:prebuild && rimraf cache out artifacts artifacts-zk artifacts-tron typechain-types",
|
|
93
93
|
"clean:prebuild": "rimraf dist",
|
|
94
94
|
"forge:build": "forge build",
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
/* Autogenerated file. Do not edit manually. */
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
import type {
|
|
5
|
+
BaseContract,
|
|
6
|
+
BigNumber,
|
|
7
|
+
BytesLike,
|
|
8
|
+
CallOverrides,
|
|
9
|
+
ContractTransaction,
|
|
10
|
+
Overrides,
|
|
11
|
+
PopulatedTransaction,
|
|
12
|
+
Signer,
|
|
13
|
+
utils,
|
|
14
|
+
} from "ethers";
|
|
15
|
+
import type {
|
|
16
|
+
FunctionFragment,
|
|
17
|
+
Result,
|
|
18
|
+
EventFragment,
|
|
19
|
+
} from "@ethersproject/abi";
|
|
20
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
21
|
+
import type {
|
|
22
|
+
TypedEventFilter,
|
|
23
|
+
TypedEvent,
|
|
24
|
+
TypedListener,
|
|
25
|
+
OnEvent,
|
|
26
|
+
PromiseOrValue,
|
|
27
|
+
} from "../common";
|
|
28
|
+
|
|
29
|
+
export interface ExecutorStoreInterface extends utils.Interface {
|
|
30
|
+
functions: {
|
|
31
|
+
"executorRequired()": FunctionFragment;
|
|
32
|
+
"getExecutors()": FunctionFragment;
|
|
33
|
+
"isExecutor(address)": FunctionFragment;
|
|
34
|
+
"setExecutor(address,bool)": FunctionFragment;
|
|
35
|
+
"setExecutorRequired(bool)": FunctionFragment;
|
|
36
|
+
"totalExecutors()": FunctionFragment;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
getFunction(
|
|
40
|
+
nameOrSignatureOrTopic:
|
|
41
|
+
| "executorRequired"
|
|
42
|
+
| "getExecutors"
|
|
43
|
+
| "isExecutor"
|
|
44
|
+
| "setExecutor"
|
|
45
|
+
| "setExecutorRequired"
|
|
46
|
+
| "totalExecutors"
|
|
47
|
+
): FunctionFragment;
|
|
48
|
+
|
|
49
|
+
encodeFunctionData(
|
|
50
|
+
functionFragment: "executorRequired",
|
|
51
|
+
values?: undefined
|
|
52
|
+
): string;
|
|
53
|
+
encodeFunctionData(
|
|
54
|
+
functionFragment: "getExecutors",
|
|
55
|
+
values?: undefined
|
|
56
|
+
): string;
|
|
57
|
+
encodeFunctionData(
|
|
58
|
+
functionFragment: "isExecutor",
|
|
59
|
+
values: [PromiseOrValue<string>]
|
|
60
|
+
): string;
|
|
61
|
+
encodeFunctionData(
|
|
62
|
+
functionFragment: "setExecutor",
|
|
63
|
+
values: [PromiseOrValue<string>, PromiseOrValue<boolean>]
|
|
64
|
+
): string;
|
|
65
|
+
encodeFunctionData(
|
|
66
|
+
functionFragment: "setExecutorRequired",
|
|
67
|
+
values: [PromiseOrValue<boolean>]
|
|
68
|
+
): string;
|
|
69
|
+
encodeFunctionData(
|
|
70
|
+
functionFragment: "totalExecutors",
|
|
71
|
+
values?: undefined
|
|
72
|
+
): string;
|
|
73
|
+
|
|
74
|
+
decodeFunctionResult(
|
|
75
|
+
functionFragment: "executorRequired",
|
|
76
|
+
data: BytesLike
|
|
77
|
+
): Result;
|
|
78
|
+
decodeFunctionResult(
|
|
79
|
+
functionFragment: "getExecutors",
|
|
80
|
+
data: BytesLike
|
|
81
|
+
): Result;
|
|
82
|
+
decodeFunctionResult(functionFragment: "isExecutor", data: BytesLike): Result;
|
|
83
|
+
decodeFunctionResult(
|
|
84
|
+
functionFragment: "setExecutor",
|
|
85
|
+
data: BytesLike
|
|
86
|
+
): Result;
|
|
87
|
+
decodeFunctionResult(
|
|
88
|
+
functionFragment: "setExecutorRequired",
|
|
89
|
+
data: BytesLike
|
|
90
|
+
): Result;
|
|
91
|
+
decodeFunctionResult(
|
|
92
|
+
functionFragment: "totalExecutors",
|
|
93
|
+
data: BytesLike
|
|
94
|
+
): Result;
|
|
95
|
+
|
|
96
|
+
events: {
|
|
97
|
+
"ExecutorRequiredSet(bool)": EventFragment;
|
|
98
|
+
"ExecutorSet(address,bool)": EventFragment;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
getEvent(nameOrSignatureOrTopic: "ExecutorRequiredSet"): EventFragment;
|
|
102
|
+
getEvent(nameOrSignatureOrTopic: "ExecutorSet"): EventFragment;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface ExecutorRequiredSetEventObject {
|
|
106
|
+
required: boolean;
|
|
107
|
+
}
|
|
108
|
+
export type ExecutorRequiredSetEvent = TypedEvent<
|
|
109
|
+
[boolean],
|
|
110
|
+
ExecutorRequiredSetEventObject
|
|
111
|
+
>;
|
|
112
|
+
|
|
113
|
+
export type ExecutorRequiredSetEventFilter =
|
|
114
|
+
TypedEventFilter<ExecutorRequiredSetEvent>;
|
|
115
|
+
|
|
116
|
+
export interface ExecutorSetEventObject {
|
|
117
|
+
executor: string;
|
|
118
|
+
active: boolean;
|
|
119
|
+
}
|
|
120
|
+
export type ExecutorSetEvent = TypedEvent<
|
|
121
|
+
[string, boolean],
|
|
122
|
+
ExecutorSetEventObject
|
|
123
|
+
>;
|
|
124
|
+
|
|
125
|
+
export type ExecutorSetEventFilter = TypedEventFilter<ExecutorSetEvent>;
|
|
126
|
+
|
|
127
|
+
export interface ExecutorStore extends BaseContract {
|
|
128
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
129
|
+
attach(addressOrName: string): this;
|
|
130
|
+
deployed(): Promise<this>;
|
|
131
|
+
|
|
132
|
+
interface: ExecutorStoreInterface;
|
|
133
|
+
|
|
134
|
+
queryFilter<TEvent extends TypedEvent>(
|
|
135
|
+
event: TypedEventFilter<TEvent>,
|
|
136
|
+
fromBlockOrBlockhash?: string | number | undefined,
|
|
137
|
+
toBlock?: string | number | undefined
|
|
138
|
+
): Promise<Array<TEvent>>;
|
|
139
|
+
|
|
140
|
+
listeners<TEvent extends TypedEvent>(
|
|
141
|
+
eventFilter?: TypedEventFilter<TEvent>
|
|
142
|
+
): Array<TypedListener<TEvent>>;
|
|
143
|
+
listeners(eventName?: string): Array<Listener>;
|
|
144
|
+
removeAllListeners<TEvent extends TypedEvent>(
|
|
145
|
+
eventFilter: TypedEventFilter<TEvent>
|
|
146
|
+
): this;
|
|
147
|
+
removeAllListeners(eventName?: string): this;
|
|
148
|
+
off: OnEvent<this>;
|
|
149
|
+
on: OnEvent<this>;
|
|
150
|
+
once: OnEvent<this>;
|
|
151
|
+
removeListener: OnEvent<this>;
|
|
152
|
+
|
|
153
|
+
functions: {
|
|
154
|
+
executorRequired(overrides?: CallOverrides): Promise<[boolean]>;
|
|
155
|
+
|
|
156
|
+
getExecutors(overrides?: CallOverrides): Promise<[string[]]>;
|
|
157
|
+
|
|
158
|
+
isExecutor(
|
|
159
|
+
_executor: PromiseOrValue<string>,
|
|
160
|
+
overrides?: CallOverrides
|
|
161
|
+
): Promise<[boolean]>;
|
|
162
|
+
|
|
163
|
+
setExecutor(
|
|
164
|
+
_executor: PromiseOrValue<string>,
|
|
165
|
+
_active: PromiseOrValue<boolean>,
|
|
166
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
167
|
+
): Promise<ContractTransaction>;
|
|
168
|
+
|
|
169
|
+
setExecutorRequired(
|
|
170
|
+
_executorRequired: PromiseOrValue<boolean>,
|
|
171
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
172
|
+
): Promise<ContractTransaction>;
|
|
173
|
+
|
|
174
|
+
totalExecutors(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
executorRequired(overrides?: CallOverrides): Promise<boolean>;
|
|
178
|
+
|
|
179
|
+
getExecutors(overrides?: CallOverrides): Promise<string[]>;
|
|
180
|
+
|
|
181
|
+
isExecutor(
|
|
182
|
+
_executor: PromiseOrValue<string>,
|
|
183
|
+
overrides?: CallOverrides
|
|
184
|
+
): Promise<boolean>;
|
|
185
|
+
|
|
186
|
+
setExecutor(
|
|
187
|
+
_executor: PromiseOrValue<string>,
|
|
188
|
+
_active: PromiseOrValue<boolean>,
|
|
189
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
190
|
+
): Promise<ContractTransaction>;
|
|
191
|
+
|
|
192
|
+
setExecutorRequired(
|
|
193
|
+
_executorRequired: PromiseOrValue<boolean>,
|
|
194
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
195
|
+
): Promise<ContractTransaction>;
|
|
196
|
+
|
|
197
|
+
totalExecutors(overrides?: CallOverrides): Promise<BigNumber>;
|
|
198
|
+
|
|
199
|
+
callStatic: {
|
|
200
|
+
executorRequired(overrides?: CallOverrides): Promise<boolean>;
|
|
201
|
+
|
|
202
|
+
getExecutors(overrides?: CallOverrides): Promise<string[]>;
|
|
203
|
+
|
|
204
|
+
isExecutor(
|
|
205
|
+
_executor: PromiseOrValue<string>,
|
|
206
|
+
overrides?: CallOverrides
|
|
207
|
+
): Promise<boolean>;
|
|
208
|
+
|
|
209
|
+
setExecutor(
|
|
210
|
+
_executor: PromiseOrValue<string>,
|
|
211
|
+
_active: PromiseOrValue<boolean>,
|
|
212
|
+
overrides?: CallOverrides
|
|
213
|
+
): Promise<void>;
|
|
214
|
+
|
|
215
|
+
setExecutorRequired(
|
|
216
|
+
_executorRequired: PromiseOrValue<boolean>,
|
|
217
|
+
overrides?: CallOverrides
|
|
218
|
+
): Promise<void>;
|
|
219
|
+
|
|
220
|
+
totalExecutors(overrides?: CallOverrides): Promise<BigNumber>;
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
filters: {
|
|
224
|
+
"ExecutorRequiredSet(bool)"(
|
|
225
|
+
required?: null
|
|
226
|
+
): ExecutorRequiredSetEventFilter;
|
|
227
|
+
ExecutorRequiredSet(required?: null): ExecutorRequiredSetEventFilter;
|
|
228
|
+
|
|
229
|
+
"ExecutorSet(address,bool)"(
|
|
230
|
+
executor?: PromiseOrValue<string> | null,
|
|
231
|
+
active?: null
|
|
232
|
+
): ExecutorSetEventFilter;
|
|
233
|
+
ExecutorSet(
|
|
234
|
+
executor?: PromiseOrValue<string> | null,
|
|
235
|
+
active?: null
|
|
236
|
+
): ExecutorSetEventFilter;
|
|
237
|
+
};
|
|
238
|
+
|
|
239
|
+
estimateGas: {
|
|
240
|
+
executorRequired(overrides?: CallOverrides): Promise<BigNumber>;
|
|
241
|
+
|
|
242
|
+
getExecutors(overrides?: CallOverrides): Promise<BigNumber>;
|
|
243
|
+
|
|
244
|
+
isExecutor(
|
|
245
|
+
_executor: PromiseOrValue<string>,
|
|
246
|
+
overrides?: CallOverrides
|
|
247
|
+
): Promise<BigNumber>;
|
|
248
|
+
|
|
249
|
+
setExecutor(
|
|
250
|
+
_executor: PromiseOrValue<string>,
|
|
251
|
+
_active: PromiseOrValue<boolean>,
|
|
252
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
253
|
+
): Promise<BigNumber>;
|
|
254
|
+
|
|
255
|
+
setExecutorRequired(
|
|
256
|
+
_executorRequired: PromiseOrValue<boolean>,
|
|
257
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
258
|
+
): Promise<BigNumber>;
|
|
259
|
+
|
|
260
|
+
totalExecutors(overrides?: CallOverrides): Promise<BigNumber>;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
populateTransaction: {
|
|
264
|
+
executorRequired(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
265
|
+
|
|
266
|
+
getExecutors(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
267
|
+
|
|
268
|
+
isExecutor(
|
|
269
|
+
_executor: PromiseOrValue<string>,
|
|
270
|
+
overrides?: CallOverrides
|
|
271
|
+
): Promise<PopulatedTransaction>;
|
|
272
|
+
|
|
273
|
+
setExecutor(
|
|
274
|
+
_executor: PromiseOrValue<string>,
|
|
275
|
+
_active: PromiseOrValue<boolean>,
|
|
276
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
277
|
+
): Promise<PopulatedTransaction>;
|
|
278
|
+
|
|
279
|
+
setExecutorRequired(
|
|
280
|
+
_executorRequired: PromiseOrValue<boolean>,
|
|
281
|
+
overrides?: Overrides & { from?: PromiseOrValue<string> }
|
|
282
|
+
): Promise<PopulatedTransaction>;
|
|
283
|
+
|
|
284
|
+
totalExecutors(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
285
|
+
};
|
|
286
|
+
}
|
|
@@ -273,10 +273,13 @@ export interface MultiSig extends BaseContract {
|
|
|
273
273
|
|
|
274
274
|
filters: {
|
|
275
275
|
"SignerSet(address,bool)"(
|
|
276
|
-
signer?: null,
|
|
276
|
+
signer?: PromiseOrValue<string> | null,
|
|
277
|
+
active?: null
|
|
278
|
+
): SignerSetEventFilter;
|
|
279
|
+
SignerSet(
|
|
280
|
+
signer?: PromiseOrValue<string> | null,
|
|
277
281
|
active?: null
|
|
278
282
|
): SignerSetEventFilter;
|
|
279
|
-
SignerSet(signer?: null, active?: null): SignerSetEventFilter;
|
|
280
283
|
|
|
281
284
|
"ThresholdSet(uint256)"(threshold?: null): ThresholdSetEventFilter;
|
|
282
285
|
ThresholdSet(threshold?: null): ThresholdSetEventFilter;
|