genlayer-js 0.23.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -2
- package/dist/{chunk-ZHBOSLFN.js → chunk-EY35NPSE.js} +13 -0
- package/dist/{chunk-W4V73RPN.cjs → chunk-GJXSECNH.cjs} +14 -1
- package/dist/{index-DOok9G7O.d.cts → index-BJI82mwC.d.cts} +14 -1
- package/dist/{index-DbrlrnTQ.d.ts → index-DEWwFm0_.d.ts} +14 -1
- package/dist/index.cjs +67 -30
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +48 -11
- package/dist/types/index.cjs +6 -2
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -99,13 +99,59 @@ const transactionHash = await client.writeContract({
|
|
|
99
99
|
value: 0, // value is optional, if you want to send some native token to the contract
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
const receipt = await client.waitForTransactionReceipt({
|
|
103
|
-
hash: txHash,
|
|
102
|
+
const receipt = await client.waitForTransactionReceipt({
|
|
103
|
+
hash: txHash,
|
|
104
104
|
status: TransactionStatus.FINALIZED, // or ACCEPTED
|
|
105
105
|
fullTransaction: false // False by default - returns simplified receipt for better readability
|
|
106
106
|
})
|
|
107
107
|
|
|
108
108
|
```
|
|
109
|
+
|
|
110
|
+
### Checking execution results
|
|
111
|
+
|
|
112
|
+
A transaction can be finalized by consensus but still have a failed execution. Always check `txExecutionResult` before reading contract state:
|
|
113
|
+
|
|
114
|
+
```typescript
|
|
115
|
+
import { ExecutionResult, TransactionStatus } from "genlayer-js/types";
|
|
116
|
+
|
|
117
|
+
const receipt = await client.waitForTransactionReceipt({
|
|
118
|
+
hash: txHash,
|
|
119
|
+
status: TransactionStatus.FINALIZED,
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
if (receipt.txExecutionResultName === ExecutionResult.FINISHED_WITH_RETURN) {
|
|
123
|
+
// Execution succeeded — safe to read state
|
|
124
|
+
const result = await client.readContract({
|
|
125
|
+
address: contractAddress,
|
|
126
|
+
functionName: "get_storage",
|
|
127
|
+
args: [],
|
|
128
|
+
});
|
|
129
|
+
} else if (receipt.txExecutionResultName === ExecutionResult.FINISHED_WITH_ERROR) {
|
|
130
|
+
// Execution failed — contract state was not modified
|
|
131
|
+
console.error("Contract execution failed");
|
|
132
|
+
} else {
|
|
133
|
+
// NOT_VOTED — execution hasn't completed
|
|
134
|
+
console.warn("Execution result not yet available");
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Fetching emitted messages and triggered transactions
|
|
139
|
+
|
|
140
|
+
Transactions can emit messages to other contracts. These messages create new child transactions when processed:
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
const tx = await client.getTransaction({ hash: txHash });
|
|
144
|
+
|
|
145
|
+
// Messages emitted by the contract during execution
|
|
146
|
+
console.log(tx.messages);
|
|
147
|
+
// [{messageType, recipient, value, data, onAcceptance, saltNonce}, ...]
|
|
148
|
+
|
|
149
|
+
// Child transaction IDs created from those messages (separate call)
|
|
150
|
+
const childTxIds = await client.getTriggeredTransactionIds({ hash: txHash });
|
|
151
|
+
console.log(childTxIds);
|
|
152
|
+
// ["0xabc...", "0xdef..."]
|
|
153
|
+
```
|
|
154
|
+
|
|
109
155
|
### Staking Operations
|
|
110
156
|
|
|
111
157
|
The SDK provides staking functionality for validators and delegators on testnet-bradbury (and testnet-asimov).
|
|
@@ -108,6 +108,17 @@ var TransactionResultNameToNumber = {
|
|
|
108
108
|
["MAJORITY_AGREE" /* MAJORITY_AGREE */]: "6",
|
|
109
109
|
["MAJORITY_DISAGREE" /* MAJORITY_DISAGREE */]: "7"
|
|
110
110
|
};
|
|
111
|
+
var ExecutionResult = /* @__PURE__ */ ((ExecutionResult2) => {
|
|
112
|
+
ExecutionResult2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
|
+
ExecutionResult2["FINISHED_WITH_RETURN"] = "FINISHED_WITH_RETURN";
|
|
114
|
+
ExecutionResult2["FINISHED_WITH_ERROR"] = "FINISHED_WITH_ERROR";
|
|
115
|
+
return ExecutionResult2;
|
|
116
|
+
})(ExecutionResult || {});
|
|
117
|
+
var executionResultNumberToName = {
|
|
118
|
+
"0": "NOT_VOTED" /* NOT_VOTED */,
|
|
119
|
+
"1": "FINISHED_WITH_RETURN" /* FINISHED_WITH_RETURN */,
|
|
120
|
+
"2": "FINISHED_WITH_ERROR" /* FINISHED_WITH_ERROR */
|
|
121
|
+
};
|
|
111
122
|
var VoteType = /* @__PURE__ */ ((VoteType2) => {
|
|
112
123
|
VoteType2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
124
|
VoteType2["AGREE"] = "AGREE";
|
|
@@ -146,6 +157,8 @@ export {
|
|
|
146
157
|
isDecidedState,
|
|
147
158
|
transactionResultNumberToName,
|
|
148
159
|
TransactionResultNameToNumber,
|
|
160
|
+
ExecutionResult,
|
|
161
|
+
executionResultNumberToName,
|
|
149
162
|
VoteType,
|
|
150
163
|
voteTypeNumberToName,
|
|
151
164
|
voteTypeNameToNumber,
|
|
@@ -108,6 +108,17 @@ var TransactionResultNameToNumber = {
|
|
|
108
108
|
["MAJORITY_AGREE" /* MAJORITY_AGREE */]: "6",
|
|
109
109
|
["MAJORITY_DISAGREE" /* MAJORITY_DISAGREE */]: "7"
|
|
110
110
|
};
|
|
111
|
+
var ExecutionResult = /* @__PURE__ */ ((ExecutionResult2) => {
|
|
112
|
+
ExecutionResult2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
|
+
ExecutionResult2["FINISHED_WITH_RETURN"] = "FINISHED_WITH_RETURN";
|
|
114
|
+
ExecutionResult2["FINISHED_WITH_ERROR"] = "FINISHED_WITH_ERROR";
|
|
115
|
+
return ExecutionResult2;
|
|
116
|
+
})(ExecutionResult || {});
|
|
117
|
+
var executionResultNumberToName = {
|
|
118
|
+
"0": "NOT_VOTED" /* NOT_VOTED */,
|
|
119
|
+
"1": "FINISHED_WITH_RETURN" /* FINISHED_WITH_RETURN */,
|
|
120
|
+
"2": "FINISHED_WITH_ERROR" /* FINISHED_WITH_ERROR */
|
|
121
|
+
};
|
|
111
122
|
var VoteType = /* @__PURE__ */ ((VoteType2) => {
|
|
112
123
|
VoteType2["NOT_VOTED"] = "NOT_VOTED";
|
|
113
124
|
VoteType2["AGREE"] = "AGREE";
|
|
@@ -150,4 +161,6 @@ var TransactionHashVariant = /* @__PURE__ */ ((TransactionHashVariant2) => {
|
|
|
150
161
|
|
|
151
162
|
|
|
152
163
|
|
|
153
|
-
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
exports.CalldataAddress = CalldataAddress; exports.TransactionStatus = TransactionStatus; exports.TransactionResult = TransactionResult; exports.transactionsStatusNumberToName = transactionsStatusNumberToName; exports.transactionsStatusNameToNumber = transactionsStatusNameToNumber; exports.DECIDED_STATES = DECIDED_STATES; exports.isDecidedState = isDecidedState; exports.transactionResultNumberToName = transactionResultNumberToName; exports.TransactionResultNameToNumber = TransactionResultNameToNumber; exports.ExecutionResult = ExecutionResult; exports.executionResultNumberToName = executionResultNumberToName; exports.VoteType = VoteType; exports.voteTypeNumberToName = voteTypeNumberToName; exports.voteTypeNameToNumber = voteTypeNameToNumber; exports.TransactionHashVariant = TransactionHashVariant;
|
|
@@ -102,6 +102,16 @@ declare const TransactionResultNameToNumber: {
|
|
|
102
102
|
MAJORITY_AGREE: string;
|
|
103
103
|
MAJORITY_DISAGREE: string;
|
|
104
104
|
};
|
|
105
|
+
declare enum ExecutionResult {
|
|
106
|
+
NOT_VOTED = "NOT_VOTED",
|
|
107
|
+
FINISHED_WITH_RETURN = "FINISHED_WITH_RETURN",
|
|
108
|
+
FINISHED_WITH_ERROR = "FINISHED_WITH_ERROR"
|
|
109
|
+
}
|
|
110
|
+
declare const executionResultNumberToName: {
|
|
111
|
+
"0": ExecutionResult;
|
|
112
|
+
"1": ExecutionResult;
|
|
113
|
+
"2": ExecutionResult;
|
|
114
|
+
};
|
|
105
115
|
declare enum VoteType {
|
|
106
116
|
NOT_VOTED = "NOT_VOTED",
|
|
107
117
|
AGREE = "AGREE",
|
|
@@ -167,6 +177,8 @@ type GenLayerTransaction = {
|
|
|
167
177
|
randomSeed?: Hash;
|
|
168
178
|
result?: number;
|
|
169
179
|
resultName?: TransactionResult;
|
|
180
|
+
txExecutionResult?: number;
|
|
181
|
+
txExecutionResultName?: ExecutionResult;
|
|
170
182
|
data?: Record<string, unknown>;
|
|
171
183
|
txData?: Hex;
|
|
172
184
|
txDataDecoded?: DecodedDeployData | DecodedCallData;
|
|
@@ -225,6 +237,7 @@ type GenLayerRawTransaction = {
|
|
|
225
237
|
lastVoteTimestamp: bigint;
|
|
226
238
|
randomSeed: Hash;
|
|
227
239
|
result: number;
|
|
240
|
+
txExecutionResult?: number;
|
|
228
241
|
txData: Hex | undefined | null;
|
|
229
242
|
txReceipt: Hash;
|
|
230
243
|
messages: unknown[];
|
|
@@ -2873,4 +2886,4 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2873
2886
|
}) => Promise<bigint>;
|
|
2874
2887
|
} & StakingActions;
|
|
2875
2888
|
|
|
2876
|
-
export { type
|
|
2889
|
+
export { type ValidatorExitOptions as $, type StakingContract as A, type ValidatorView as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorIdentity as F, type GenLayerClient as G, type Hash as H, type ValidatorInfo as I, type PendingWithdrawal as J, type BannedValidatorInfo as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type StakeInfo as O, type PendingDeposit as P, type EpochData as Q, type EpochInfo as R, STAKING_ABI as S, type TransactionDataElement as T, type StakingTransactionResult as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type ValidatorJoinResult as X, type DelegatorJoinResult as Y, type ValidatorJoinOptions as Z, type ValidatorDepositOptions as _, type DecodedCallData as a, type ValidatorClaimOptions as a0, type ValidatorPrimeOptions as a1, type SetOperatorOptions as a2, type SetIdentityOptions as a3, type DelegatorJoinOptions as a4, type DelegatorExitOptions as a5, type DelegatorClaimOptions as a6, type StakingActions as a7, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type SnapSource as z };
|
|
@@ -102,6 +102,16 @@ declare const TransactionResultNameToNumber: {
|
|
|
102
102
|
MAJORITY_AGREE: string;
|
|
103
103
|
MAJORITY_DISAGREE: string;
|
|
104
104
|
};
|
|
105
|
+
declare enum ExecutionResult {
|
|
106
|
+
NOT_VOTED = "NOT_VOTED",
|
|
107
|
+
FINISHED_WITH_RETURN = "FINISHED_WITH_RETURN",
|
|
108
|
+
FINISHED_WITH_ERROR = "FINISHED_WITH_ERROR"
|
|
109
|
+
}
|
|
110
|
+
declare const executionResultNumberToName: {
|
|
111
|
+
"0": ExecutionResult;
|
|
112
|
+
"1": ExecutionResult;
|
|
113
|
+
"2": ExecutionResult;
|
|
114
|
+
};
|
|
105
115
|
declare enum VoteType {
|
|
106
116
|
NOT_VOTED = "NOT_VOTED",
|
|
107
117
|
AGREE = "AGREE",
|
|
@@ -167,6 +177,8 @@ type GenLayerTransaction = {
|
|
|
167
177
|
randomSeed?: Hash;
|
|
168
178
|
result?: number;
|
|
169
179
|
resultName?: TransactionResult;
|
|
180
|
+
txExecutionResult?: number;
|
|
181
|
+
txExecutionResultName?: ExecutionResult;
|
|
170
182
|
data?: Record<string, unknown>;
|
|
171
183
|
txData?: Hex;
|
|
172
184
|
txDataDecoded?: DecodedDeployData | DecodedCallData;
|
|
@@ -225,6 +237,7 @@ type GenLayerRawTransaction = {
|
|
|
225
237
|
lastVoteTimestamp: bigint;
|
|
226
238
|
randomSeed: Hash;
|
|
227
239
|
result: number;
|
|
240
|
+
txExecutionResult?: number;
|
|
228
241
|
txData: Hex | undefined | null;
|
|
229
242
|
txReceipt: Hash;
|
|
230
243
|
messages: unknown[];
|
|
@@ -2873,4 +2886,4 @@ type GenLayerClient<TGenLayerChain extends GenLayerChain> = Omit<Client<Transpor
|
|
|
2873
2886
|
}) => Promise<bigint>;
|
|
2874
2887
|
} & StakingActions;
|
|
2875
2888
|
|
|
2876
|
-
export { type
|
|
2889
|
+
export { type ValidatorExitOptions as $, type StakingContract as A, type ValidatorView as B, type CalldataEncodable as C, type DecodedDeployData as D, ExecutionResult as E, type ValidatorIdentity as F, type GenLayerClient as G, type Hash as H, type ValidatorInfo as I, type PendingWithdrawal as J, type BannedValidatorInfo as K, type LeaderReceipt as L, type MethodDescription as M, type Network as N, type StakeInfo as O, type PendingDeposit as P, type EpochData as Q, type EpochInfo as R, STAKING_ABI as S, type TransactionDataElement as T, type StakingTransactionResult as U, VALIDATOR_WALLET_ABI as V, type WithdrawalCommit as W, type ValidatorJoinResult as X, type DelegatorJoinResult as Y, type ValidatorJoinOptions as Z, type ValidatorDepositOptions as _, type DecodedCallData as a, type ValidatorClaimOptions as a0, type ValidatorPrimeOptions as a1, type SetOperatorOptions as a2, type SetIdentityOptions as a3, type DelegatorJoinOptions as a4, type DelegatorExitOptions as a5, type DelegatorClaimOptions as a6, type StakingActions as a7, type GenLayerRawTransaction as b, type GenLayerTransaction as c, type ContractSchema as d, CalldataAddress as e, type GenLayerMethod as f, type ContractParamsArraySchemaElement as g, type ContractParamsSchema as h, type ContractMethodBase as i, type ContractMethod as j, type TransactionHash as k, TransactionStatus as l, TransactionResult as m, transactionsStatusNameToNumber as n, DECIDED_STATES as o, isDecidedState as p, transactionResultNumberToName as q, TransactionResultNameToNumber as r, executionResultNumberToName as s, transactionsStatusNumberToName as t, VoteType as u, voteTypeNumberToName as v, voteTypeNameToNumber as w, type TransactionType as x, TransactionHashVariant as y, type SnapSource as z };
|
package/dist/index.cjs
CHANGED
|
@@ -14,7 +14,8 @@ var _chunkNOMVZBCRcjs = require('./chunk-NOMVZBCR.cjs');
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
var _chunkGJXSECNHcjs = require('./chunk-GJXSECNH.cjs');
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
var _chunk75ZPJI57cjs = require('./chunk-75ZPJI57.cjs');
|
|
@@ -187,7 +188,7 @@ function encodeImpl(to, data) {
|
|
|
187
188
|
}
|
|
188
189
|
} else if (data instanceof Map) {
|
|
189
190
|
encodeMap(to, data);
|
|
190
|
-
} else if (data instanceof
|
|
191
|
+
} else if (data instanceof _chunkGJXSECNHcjs.CalldataAddress) {
|
|
191
192
|
to.push(SPECIAL_ADDR);
|
|
192
193
|
for (const c of data.bytes) {
|
|
193
194
|
to.push(c);
|
|
@@ -262,7 +263,7 @@ function decodeImpl(data, index) {
|
|
|
262
263
|
case BigInt(SPECIAL_ADDR): {
|
|
263
264
|
const res = data.slice(index.i, index.i + 20);
|
|
264
265
|
index.i += 20;
|
|
265
|
-
return new (0,
|
|
266
|
+
return new (0, _chunkGJXSECNHcjs.CalldataAddress)(res);
|
|
266
267
|
}
|
|
267
268
|
}
|
|
268
269
|
const type = Number(cur & 0xffn) & (1 << BITS_IN_TYPE) - 1;
|
|
@@ -374,7 +375,7 @@ function toStringImpl(data, to) {
|
|
|
374
375
|
to.push("]");
|
|
375
376
|
} else if (data instanceof Map) {
|
|
376
377
|
toStringImplMap(data.entries(), to);
|
|
377
|
-
} else if (data instanceof
|
|
378
|
+
} else if (data instanceof _chunkGJXSECNHcjs.CalldataAddress) {
|
|
378
379
|
to.push("addr#");
|
|
379
380
|
for (const c of data.bytes) {
|
|
380
381
|
to.push(c.toString(16));
|
|
@@ -499,7 +500,7 @@ function _toJsonSafeDeep(value, seen) {
|
|
|
499
500
|
}
|
|
500
501
|
return obj;
|
|
501
502
|
}
|
|
502
|
-
if (value instanceof
|
|
503
|
+
if (value instanceof _chunkGJXSECNHcjs.CalldataAddress) {
|
|
503
504
|
return _viem.toHex.call(void 0, value.bytes);
|
|
504
505
|
}
|
|
505
506
|
if (Object.getPrototypeOf(value) === Object.prototype) {
|
|
@@ -1095,8 +1096,10 @@ var decodeTransaction = (tx) => {
|
|
|
1095
1096
|
processingBlock: _nullishCoalesce(_optionalChain([tx, 'access', _59 => _59.readStateBlockRange, 'optionalAccess', _60 => _60.processingBlock, 'optionalAccess', _61 => _61.toString, 'call', _62 => _62()]), () => ( "0")),
|
|
1096
1097
|
proposalBlock: _nullishCoalesce(_optionalChain([tx, 'access', _63 => _63.readStateBlockRange, 'optionalAccess', _64 => _64.proposalBlock, 'optionalAccess', _65 => _65.toString, 'call', _66 => _66()]), () => ( "0"))
|
|
1097
1098
|
},
|
|
1098
|
-
statusName:
|
|
1099
|
-
resultName:
|
|
1099
|
+
statusName: _chunkGJXSECNHcjs.transactionsStatusNumberToName[String(tx.status)],
|
|
1100
|
+
resultName: _chunkGJXSECNHcjs.transactionResultNumberToName[String(tx.result)],
|
|
1101
|
+
txExecutionResult: tx.txExecutionResult !== void 0 ? Number(tx.txExecutionResult) : void 0,
|
|
1102
|
+
txExecutionResultName: tx.txExecutionResult !== void 0 ? _chunkGJXSECNHcjs.executionResultNumberToName[String(tx.txExecutionResult)] : void 0,
|
|
1100
1103
|
lastRound: {
|
|
1101
1104
|
...tx.lastRound,
|
|
1102
1105
|
round: _nullishCoalesce(_optionalChain([tx, 'access', _67 => _67.lastRound, 'optionalAccess', _68 => _68.round, 'optionalAccess', _69 => _69.toString, 'call', _70 => _70()]), () => ( "0")),
|
|
@@ -1106,7 +1109,7 @@ var decodeTransaction = (tx) => {
|
|
|
1106
1109
|
appealBond: _nullishCoalesce(_optionalChain([tx, 'access', _83 => _83.lastRound, 'optionalAccess', _84 => _84.appealBond, 'optionalAccess', _85 => _85.toString, 'call', _86 => _86()]), () => ( "0")),
|
|
1107
1110
|
rotationsLeft: _nullishCoalesce(_optionalChain([tx, 'access', _87 => _87.lastRound, 'optionalAccess', _88 => _88.rotationsLeft, 'optionalAccess', _89 => _89.toString, 'call', _90 => _90()]), () => ( "0")),
|
|
1108
1111
|
validatorVotesName: (_nullishCoalesce(_optionalChain([tx, 'access', _91 => _91.lastRound, 'optionalAccess', _92 => _92.validatorVotes]), () => ( []))).map(
|
|
1109
|
-
(vote) =>
|
|
1112
|
+
(vote) => _chunkGJXSECNHcjs.voteTypeNumberToName[String(vote)]
|
|
1110
1113
|
)
|
|
1111
1114
|
}
|
|
1112
1115
|
};
|
|
@@ -1246,8 +1249,8 @@ var receiptActions = (client, publicClient) => ({
|
|
|
1246
1249
|
throw new Error("Transaction not found");
|
|
1247
1250
|
}
|
|
1248
1251
|
const transactionStatusString = String(transaction.status);
|
|
1249
|
-
const requestedStatus =
|
|
1250
|
-
if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ &&
|
|
1252
|
+
const requestedStatus = _chunkGJXSECNHcjs.transactionsStatusNameToNumber[status];
|
|
1253
|
+
if (transactionStatusString === requestedStatus || status === "ACCEPTED" /* ACCEPTED */ && _chunkGJXSECNHcjs.isDecidedState.call(void 0, transactionStatusString)) {
|
|
1251
1254
|
let finalTransaction = transaction;
|
|
1252
1255
|
if (client.chain.id === _chunkNOMVZBCRcjs.localnet.id) {
|
|
1253
1256
|
finalTransaction = decodeLocalnetTransaction(transaction);
|
|
@@ -1275,22 +1278,56 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1275
1278
|
if (client.chain.isStudio) {
|
|
1276
1279
|
const transaction2 = await client.getTransaction({ hash });
|
|
1277
1280
|
const localnetStatus = transaction2.status === "ACTIVATED" ? "PENDING" /* PENDING */ : transaction2.status;
|
|
1278
|
-
transaction2.status = Number(
|
|
1281
|
+
transaction2.status = Number(_chunkGJXSECNHcjs.transactionsStatusNameToNumber[localnetStatus]);
|
|
1279
1282
|
transaction2.statusName = localnetStatus;
|
|
1280
1283
|
return decodeLocalnetTransaction(transaction2);
|
|
1281
1284
|
}
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1285
|
+
const contractAddress = _optionalChain([client, 'access', _97 => _97.chain, 'access', _98 => _98.consensusDataContract, 'optionalAccess', _99 => _99.address]);
|
|
1286
|
+
const contractAbi = _optionalChain([client, 'access', _100 => _100.chain, 'access', _101 => _101.consensusDataContract, 'optionalAccess', _102 => _102.abi]);
|
|
1287
|
+
const [txDataRaw, allDataRaw] = await Promise.all([
|
|
1288
|
+
publicClient.readContract({
|
|
1289
|
+
address: contractAddress,
|
|
1290
|
+
abi: contractAbi,
|
|
1291
|
+
functionName: "getTransactionData",
|
|
1292
|
+
args: [hash, Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)]
|
|
1293
|
+
}),
|
|
1294
|
+
publicClient.readContract({
|
|
1295
|
+
address: contractAddress,
|
|
1296
|
+
abi: contractAbi,
|
|
1297
|
+
functionName: "getTransactionAllData",
|
|
1298
|
+
args: [hash]
|
|
1299
|
+
})
|
|
1300
|
+
]);
|
|
1301
|
+
const txData = txDataRaw;
|
|
1302
|
+
const [txAllData, roundsData] = allDataRaw;
|
|
1303
|
+
const transaction = {
|
|
1304
|
+
...txData,
|
|
1305
|
+
txExecutionResult: Number(txAllData.txExecutionResult)
|
|
1306
|
+
};
|
|
1292
1307
|
return decodeTransaction(transaction);
|
|
1293
1308
|
},
|
|
1309
|
+
getTriggeredTransactionIds: async ({ hash }) => {
|
|
1310
|
+
if (client.chain.isStudio) {
|
|
1311
|
+
const tx2 = await client.getTransaction({ hash });
|
|
1312
|
+
return _nullishCoalesce(tx2.triggered_transactions, () => ( []));
|
|
1313
|
+
}
|
|
1314
|
+
const tx = await transactionActions(client, publicClient).getTransaction({ hash });
|
|
1315
|
+
const proposalBlock = BigInt(_nullishCoalesce(_optionalChain([tx, 'access', _103 => _103.readStateBlockRange, 'optionalAccess', _104 => _104.proposalBlock]), () => ( "0")));
|
|
1316
|
+
if (proposalBlock === BigInt(0)) return [];
|
|
1317
|
+
const scanRange = BigInt(100);
|
|
1318
|
+
const latestBlock = await publicClient.getBlockNumber();
|
|
1319
|
+
const toBlock = proposalBlock + scanRange < latestBlock ? proposalBlock + scanRange : latestBlock;
|
|
1320
|
+
const consensusAddress = _optionalChain([client, 'access', _105 => _105.chain, 'access', _106 => _106.consensusMainContract, 'optionalAccess', _107 => _107.address]);
|
|
1321
|
+
const internalMessageProcessedTopic = _viem.keccak256.call(void 0, _viem.stringToBytes.call(void 0, "InternalMessageProcessed(bytes32,address,address)"));
|
|
1322
|
+
const logs = await publicClient.getLogs({
|
|
1323
|
+
address: consensusAddress,
|
|
1324
|
+
event: void 0,
|
|
1325
|
+
fromBlock: proposalBlock,
|
|
1326
|
+
toBlock,
|
|
1327
|
+
topics: [internalMessageProcessedTopic, hash]
|
|
1328
|
+
});
|
|
1329
|
+
return logs.map((log) => log.topics[1]).filter(Boolean);
|
|
1330
|
+
},
|
|
1294
1331
|
cancelTransaction: async ({ hash }) => {
|
|
1295
1332
|
if (!client.chain.isStudio) {
|
|
1296
1333
|
throw new Error("cancelTransaction is only available on studio-based chains (localnet/studionet)");
|
|
@@ -1320,7 +1357,7 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1320
1357
|
},
|
|
1321
1358
|
estimateTransactionGas: async (transactionParams) => {
|
|
1322
1359
|
const formattedParams = {
|
|
1323
|
-
from: transactionParams.from || _optionalChain([client, 'access',
|
|
1360
|
+
from: transactionParams.from || _optionalChain([client, 'access', _108 => _108.account, 'optionalAccess', _109 => _109.address]),
|
|
1324
1361
|
to: transactionParams.to,
|
|
1325
1362
|
data: transactionParams.data || "0x",
|
|
1326
1363
|
value: transactionParams.value ? `0x${transactionParams.value.toString(16)}` : "0x0"
|
|
@@ -1363,7 +1400,7 @@ var connect = async (client, network = "studionet", snapSource = "npm") => {
|
|
|
1363
1400
|
chainName: selectedNetwork.name,
|
|
1364
1401
|
rpcUrls: selectedNetwork.rpcUrls.default.http,
|
|
1365
1402
|
nativeCurrency: selectedNetwork.nativeCurrency,
|
|
1366
|
-
blockExplorerUrls: [_optionalChain([selectedNetwork, 'access',
|
|
1403
|
+
blockExplorerUrls: [_optionalChain([selectedNetwork, 'access', _110 => _110.blockExplorers, 'optionalAccess', _111 => _111.default, 'access', _112 => _112.url])]
|
|
1367
1404
|
};
|
|
1368
1405
|
const currentChainId = await window.ethereum.request({ method: "eth_chainId" });
|
|
1369
1406
|
if (currentChainId !== chainIdHex) {
|
|
@@ -1397,10 +1434,10 @@ var metamaskClient = async (snapSource = "npm") => {
|
|
|
1397
1434
|
}
|
|
1398
1435
|
const isFlask = async () => {
|
|
1399
1436
|
try {
|
|
1400
|
-
const clientVersion = await _optionalChain([window, 'access',
|
|
1437
|
+
const clientVersion = await _optionalChain([window, 'access', _113 => _113.ethereum, 'optionalAccess', _114 => _114.request, 'call', _115 => _115({
|
|
1401
1438
|
method: "web3_clientVersion"
|
|
1402
1439
|
})]);
|
|
1403
|
-
return _optionalChain([clientVersion, 'optionalAccess',
|
|
1440
|
+
return _optionalChain([clientVersion, 'optionalAccess', _116 => _116.includes, 'call', _117 => _117("flask")]);
|
|
1404
1441
|
} catch (error) {
|
|
1405
1442
|
console.error("Error detecting Flask:", error);
|
|
1406
1443
|
return false;
|
|
@@ -1408,7 +1445,7 @@ var metamaskClient = async (snapSource = "npm") => {
|
|
|
1408
1445
|
};
|
|
1409
1446
|
const installedSnaps = async () => {
|
|
1410
1447
|
try {
|
|
1411
|
-
return await _optionalChain([window, 'access',
|
|
1448
|
+
return await _optionalChain([window, 'access', _118 => _118.ethereum, 'optionalAccess', _119 => _119.request, 'call', _120 => _120({
|
|
1412
1449
|
method: "wallet_getSnaps"
|
|
1413
1450
|
})]);
|
|
1414
1451
|
} catch (error) {
|
|
@@ -1495,7 +1532,7 @@ function extractRevertReason(err) {
|
|
|
1495
1532
|
}
|
|
1496
1533
|
const revertError = err.walk((e) => e instanceof _viem.ContractFunctionRevertedError);
|
|
1497
1534
|
if (revertError instanceof _viem.ContractFunctionRevertedError) {
|
|
1498
|
-
if (_optionalChain([revertError, 'access',
|
|
1535
|
+
if (_optionalChain([revertError, 'access', _121 => _121.data, 'optionalAccess', _122 => _122.errorName])) {
|
|
1499
1536
|
return revertError.data.errorName;
|
|
1500
1537
|
}
|
|
1501
1538
|
return revertError.reason || "Unknown reason";
|
|
@@ -1583,7 +1620,7 @@ var stakingActions = (client, publicClient) => {
|
|
|
1583
1620
|
};
|
|
1584
1621
|
const getStakingAddress = () => {
|
|
1585
1622
|
const stakingConfig = client.chain.stakingContract;
|
|
1586
|
-
if (!_optionalChain([stakingConfig, 'optionalAccess',
|
|
1623
|
+
if (!_optionalChain([stakingConfig, 'optionalAccess', _123 => _123.address]) || stakingConfig.address === "0x0000000000000000000000000000000000000000") {
|
|
1587
1624
|
throw new Error("Staking is not supported on studio-based networks. Use testnet-asimov for staking operations.");
|
|
1588
1625
|
}
|
|
1589
1626
|
return stakingConfig.address;
|
|
@@ -1664,10 +1701,10 @@ var stakingActions = (client, publicClient) => {
|
|
|
1664
1701
|
return executeWrite({ to: getStakingAddress(), data });
|
|
1665
1702
|
},
|
|
1666
1703
|
validatorClaim: async (options) => {
|
|
1667
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
1704
|
+
if (!_optionalChain([options, 'optionalAccess', _124 => _124.validator]) && !client.account) {
|
|
1668
1705
|
throw new Error("Either provide validator address or initialize client with an account");
|
|
1669
1706
|
}
|
|
1670
|
-
const validatorAddress = _optionalChain([options, 'optionalAccess',
|
|
1707
|
+
const validatorAddress = _optionalChain([options, 'optionalAccess', _125 => _125.validator]) || client.account.address;
|
|
1671
1708
|
const data = _viem.encodeFunctionData.call(void 0, {
|
|
1672
1709
|
abi: _chunkNOMVZBCRcjs.STAKING_ABI,
|
|
1673
1710
|
functionName: "validatorClaim",
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
3
|
import { G as GenLayerChain } from './chains-DqSbucSW.cjs';
|
|
4
|
-
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-
|
|
4
|
+
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-BJI82mwC.cjs';
|
|
5
5
|
import * as abitype from 'abitype';
|
|
6
6
|
import * as viem__types_types_authorization from 'viem/_types/types/authorization';
|
|
7
7
|
import * as viem_accounts from 'viem/accounts';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as viem from 'viem';
|
|
2
2
|
import { Account, Address, Hex } from 'viem';
|
|
3
3
|
import { G as GenLayerChain } from './chains-DqSbucSW.js';
|
|
4
|
-
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-
|
|
4
|
+
import { G as GenLayerClient, D as DecodedDeployData, a as DecodedCallData, b as GenLayerRawTransaction, c as GenLayerTransaction, C as CalldataEncodable, T as TransactionDataElement, S as STAKING_ABI, V as VALIDATOR_WALLET_ABI, d as ContractSchema } from './index-DEWwFm0_.js';
|
|
5
5
|
import * as abitype from 'abitype';
|
|
6
6
|
import * as viem__types_types_authorization from 'viem/_types/types/authorization';
|
|
7
7
|
import * as viem_accounts from 'viem/accounts';
|
package/dist/index.js
CHANGED
|
@@ -9,12 +9,13 @@ import {
|
|
|
9
9
|
} from "./chunk-C4Z24PT6.js";
|
|
10
10
|
import {
|
|
11
11
|
CalldataAddress,
|
|
12
|
+
executionResultNumberToName,
|
|
12
13
|
isDecidedState,
|
|
13
14
|
transactionResultNumberToName,
|
|
14
15
|
transactionsStatusNameToNumber,
|
|
15
16
|
transactionsStatusNumberToName,
|
|
16
17
|
voteTypeNumberToName
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-EY35NPSE.js";
|
|
18
19
|
import {
|
|
19
20
|
__export
|
|
20
21
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -1097,6 +1098,8 @@ var decodeTransaction = (tx) => {
|
|
|
1097
1098
|
},
|
|
1098
1099
|
statusName: transactionsStatusNumberToName[String(tx.status)],
|
|
1099
1100
|
resultName: transactionResultNumberToName[String(tx.result)],
|
|
1101
|
+
txExecutionResult: tx.txExecutionResult !== void 0 ? Number(tx.txExecutionResult) : void 0,
|
|
1102
|
+
txExecutionResultName: tx.txExecutionResult !== void 0 ? executionResultNumberToName[String(tx.txExecutionResult)] : void 0,
|
|
1100
1103
|
lastRound: {
|
|
1101
1104
|
...tx.lastRound,
|
|
1102
1105
|
round: tx.lastRound?.round?.toString() ?? "0",
|
|
@@ -1279,18 +1282,52 @@ var transactionActions = (client, publicClient) => ({
|
|
|
1279
1282
|
transaction2.statusName = localnetStatus;
|
|
1280
1283
|
return decodeLocalnetTransaction(transaction2);
|
|
1281
1284
|
}
|
|
1282
|
-
const
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1285
|
+
const contractAddress = client.chain.consensusDataContract?.address;
|
|
1286
|
+
const contractAbi = client.chain.consensusDataContract?.abi;
|
|
1287
|
+
const [txDataRaw, allDataRaw] = await Promise.all([
|
|
1288
|
+
publicClient.readContract({
|
|
1289
|
+
address: contractAddress,
|
|
1290
|
+
abi: contractAbi,
|
|
1291
|
+
functionName: "getTransactionData",
|
|
1292
|
+
args: [hash, Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3)]
|
|
1293
|
+
}),
|
|
1294
|
+
publicClient.readContract({
|
|
1295
|
+
address: contractAddress,
|
|
1296
|
+
abi: contractAbi,
|
|
1297
|
+
functionName: "getTransactionAllData",
|
|
1298
|
+
args: [hash]
|
|
1299
|
+
})
|
|
1300
|
+
]);
|
|
1301
|
+
const txData = txDataRaw;
|
|
1302
|
+
const [txAllData, roundsData] = allDataRaw;
|
|
1303
|
+
const transaction = {
|
|
1304
|
+
...txData,
|
|
1305
|
+
txExecutionResult: Number(txAllData.txExecutionResult)
|
|
1306
|
+
};
|
|
1292
1307
|
return decodeTransaction(transaction);
|
|
1293
1308
|
},
|
|
1309
|
+
getTriggeredTransactionIds: async ({ hash }) => {
|
|
1310
|
+
if (client.chain.isStudio) {
|
|
1311
|
+
const tx2 = await client.getTransaction({ hash });
|
|
1312
|
+
return tx2.triggered_transactions ?? [];
|
|
1313
|
+
}
|
|
1314
|
+
const tx = await transactionActions(client, publicClient).getTransaction({ hash });
|
|
1315
|
+
const proposalBlock = BigInt(tx.readStateBlockRange?.proposalBlock ?? "0");
|
|
1316
|
+
if (proposalBlock === BigInt(0)) return [];
|
|
1317
|
+
const scanRange = BigInt(100);
|
|
1318
|
+
const latestBlock = await publicClient.getBlockNumber();
|
|
1319
|
+
const toBlock = proposalBlock + scanRange < latestBlock ? proposalBlock + scanRange : latestBlock;
|
|
1320
|
+
const consensusAddress = client.chain.consensusMainContract?.address;
|
|
1321
|
+
const internalMessageProcessedTopic = keccak256(stringToBytes("InternalMessageProcessed(bytes32,address,address)"));
|
|
1322
|
+
const logs = await publicClient.getLogs({
|
|
1323
|
+
address: consensusAddress,
|
|
1324
|
+
event: void 0,
|
|
1325
|
+
fromBlock: proposalBlock,
|
|
1326
|
+
toBlock,
|
|
1327
|
+
topics: [internalMessageProcessedTopic, hash]
|
|
1328
|
+
});
|
|
1329
|
+
return logs.map((log) => log.topics[1]).filter(Boolean);
|
|
1330
|
+
},
|
|
1294
1331
|
cancelTransaction: async ({ hash }) => {
|
|
1295
1332
|
if (!client.chain.isStudio) {
|
|
1296
1333
|
throw new Error("cancelTransaction is only available on studio-based chains (localnet/studionet)");
|
package/dist/types/index.cjs
CHANGED
|
@@ -12,7 +12,9 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
var _chunkGJXSECNHcjs = require('../chunk-GJXSECNH.cjs');
|
|
16
18
|
require('../chunk-75ZPJI57.cjs');
|
|
17
19
|
|
|
18
20
|
|
|
@@ -28,4 +30,6 @@ require('../chunk-75ZPJI57.cjs');
|
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
exports.CalldataAddress = _chunkGJXSECNHcjs.CalldataAddress; exports.DECIDED_STATES = _chunkGJXSECNHcjs.DECIDED_STATES; exports.ExecutionResult = _chunkGJXSECNHcjs.ExecutionResult; exports.TransactionHashVariant = _chunkGJXSECNHcjs.TransactionHashVariant; exports.TransactionResult = _chunkGJXSECNHcjs.TransactionResult; exports.TransactionResultNameToNumber = _chunkGJXSECNHcjs.TransactionResultNameToNumber; exports.TransactionStatus = _chunkGJXSECNHcjs.TransactionStatus; exports.VoteType = _chunkGJXSECNHcjs.VoteType; exports.executionResultNumberToName = _chunkGJXSECNHcjs.executionResultNumberToName; exports.isDecidedState = _chunkGJXSECNHcjs.isDecidedState; exports.transactionResultNumberToName = _chunkGJXSECNHcjs.transactionResultNumberToName; exports.transactionsStatusNameToNumber = _chunkGJXSECNHcjs.transactionsStatusNameToNumber; exports.transactionsStatusNumberToName = _chunkGJXSECNHcjs.transactionsStatusNumberToName; exports.voteTypeNameToNumber = _chunkGJXSECNHcjs.voteTypeNameToNumber; exports.voteTypeNumberToName = _chunkGJXSECNHcjs.voteTypeNumberToName;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export {
|
|
2
|
+
export { K as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, a as DecodedCallData, D as DecodedDeployData, a6 as DelegatorClaimOptions, a5 as DelegatorExitOptions, a4 as DelegatorJoinOptions, Y as DelegatorJoinResult, Q as EpochData, R as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, J as PendingWithdrawal, a3 as SetIdentityOptions, a2 as SetOperatorOptions, z as SnapSource, O as StakeInfo, a7 as StakingActions, A as StakingContract, U as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a0 as ValidatorClaimOptions, _ as ValidatorDepositOptions, $ as ValidatorExitOptions, F as ValidatorIdentity, I as ValidatorInfo, Z as ValidatorJoinOptions, X as ValidatorJoinResult, a1 as ValidatorPrimeOptions, B as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-BJI82mwC.cjs';
|
|
3
3
|
export { G as GenLayerChain } from '../chains-DqSbucSW.cjs';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { Account, Address } from 'viem';
|
|
2
|
-
export {
|
|
2
|
+
export { K as BannedValidatorInfo, e as CalldataAddress, C as CalldataEncodable, j as ContractMethod, i as ContractMethodBase, g as ContractParamsArraySchemaElement, h as ContractParamsSchema, d as ContractSchema, o as DECIDED_STATES, a as DecodedCallData, D as DecodedDeployData, a6 as DelegatorClaimOptions, a5 as DelegatorExitOptions, a4 as DelegatorJoinOptions, Y as DelegatorJoinResult, Q as EpochData, R as EpochInfo, E as ExecutionResult, G as GenLayerClient, f as GenLayerMethod, b as GenLayerRawTransaction, c as GenLayerTransaction, H as Hash, L as LeaderReceipt, M as MethodDescription, N as Network, P as PendingDeposit, J as PendingWithdrawal, a3 as SetIdentityOptions, a2 as SetOperatorOptions, z as SnapSource, O as StakeInfo, a7 as StakingActions, A as StakingContract, U as StakingTransactionResult, k as TransactionHash, y as TransactionHashVariant, m as TransactionResult, r as TransactionResultNameToNumber, l as TransactionStatus, x as TransactionType, a0 as ValidatorClaimOptions, _ as ValidatorDepositOptions, $ as ValidatorExitOptions, F as ValidatorIdentity, I as ValidatorInfo, Z as ValidatorJoinOptions, X as ValidatorJoinResult, a1 as ValidatorPrimeOptions, B as ValidatorView, u as VoteType, W as WithdrawalCommit, s as executionResultNumberToName, p as isDecidedState, q as transactionResultNumberToName, n as transactionsStatusNameToNumber, t as transactionsStatusNumberToName, w as voteTypeNameToNumber, v as voteTypeNumberToName } from '../index-DEWwFm0_.js';
|
|
3
3
|
export { G as GenLayerChain } from '../chains-DqSbucSW.js';
|
package/dist/types/index.js
CHANGED
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CalldataAddress,
|
|
3
3
|
DECIDED_STATES,
|
|
4
|
+
ExecutionResult,
|
|
4
5
|
TransactionHashVariant,
|
|
5
6
|
TransactionResult,
|
|
6
7
|
TransactionResultNameToNumber,
|
|
7
8
|
TransactionStatus,
|
|
8
9
|
VoteType,
|
|
10
|
+
executionResultNumberToName,
|
|
9
11
|
isDecidedState,
|
|
10
12
|
transactionResultNumberToName,
|
|
11
13
|
transactionsStatusNameToNumber,
|
|
12
14
|
transactionsStatusNumberToName,
|
|
13
15
|
voteTypeNameToNumber,
|
|
14
16
|
voteTypeNumberToName
|
|
15
|
-
} from "../chunk-
|
|
17
|
+
} from "../chunk-EY35NPSE.js";
|
|
16
18
|
import "../chunk-MLKGABMK.js";
|
|
17
19
|
export {
|
|
18
20
|
CalldataAddress,
|
|
19
21
|
DECIDED_STATES,
|
|
22
|
+
ExecutionResult,
|
|
20
23
|
TransactionHashVariant,
|
|
21
24
|
TransactionResult,
|
|
22
25
|
TransactionResultNameToNumber,
|
|
23
26
|
TransactionStatus,
|
|
24
27
|
VoteType,
|
|
28
|
+
executionResultNumberToName,
|
|
25
29
|
isDecidedState,
|
|
26
30
|
transactionResultNumberToName,
|
|
27
31
|
transactionsStatusNameToNumber,
|