You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// TODO: we should add a link to the docs explaining the reasoning behind it once we have such an explainer
76
+
error+=`Error: The transaction is too expensive, try reducing the number of AccountUpdates that are attached to the transaction.
77
+
Each transaction needs to be processed by the snark workers on the network.
78
+
Certain layouts of AccountUpdates require more proving time than others, and therefore are too expensive.
79
+
80
+
${JSON.stringify(authTypes)}
81
+
\n\n`;
82
+
}
83
+
84
+
if(!isWithinEventsLimit){
85
+
error+=`Error: The account updates in your transaction are trying to emit too much event data. The maximum allowed number of field elements in events is ${TransactionLimits.MAX_EVENT_ELEMENTS}, but you tried to emit ${eventElements.events}.\n\n`;
86
+
}
87
+
88
+
if(!isWithinActionsLimit){
89
+
error+=`Error: The account updates in your transaction are trying to emit too much action data. The maximum allowed number of field elements in actions is ${TransactionLimits.MAX_ACTION_ELEMENTS}, but you tried to emit ${eventElements.actions}.\n\n`;
90
+
}
91
+
92
+
if(error)throwError('Error during transaction sending:\n\n'+error);
// TODO: we should add a link to the docs explaining the reasoning behind it once we have such an explainer
107
-
error+=`Error: The transaction is too expensive, try reducing the number of AccountUpdates that are attached to the transaction.
108
-
Each transaction needs to be processed by the snark workers on the network.
109
-
Certain layouts of AccountUpdates require more proving time than others, and therefore are too expensive.
110
-
111
-
${JSON.stringify(authTypes)}
112
-
\n\n`;
113
-
}
114
-
115
-
if(!isWithinEventsLimit){
116
-
error+=`Error: The account updates in your transaction are trying to emit too much event data. The maximum allowed number of field elements in events is ${TransactionLimits.MAX_EVENT_ELEMENTS}, but you tried to emit ${eventElements.events}.\n\n`;
117
-
}
118
-
119
-
if(!isWithinActionsLimit){
120
-
error+=`Error: The account updates in your transaction are trying to emit too much action data. The maximum allowed number of field elements in actions is ${TransactionLimits.MAX_ACTION_ELEMENTS}, but you tried to emit ${eventElements.actions}.\n\n`;
121
-
}
122
-
123
-
if(error)throwError('Error during transaction sending:\n\n'+error);
131
+
// returns totalTimeRequired and additional data used by verifyTransactionLimits
* setFeePerWU behaves identically to {@link setFee} but the fee is given per Account Update in the transaction. This is useful because nodes prioritize transactions by fee per weight unit.
134
+
* setFeePerSnarkCost behaves identically to {@link setFee} but the fee is given per Account Update in the transaction. This is useful because nodes prioritize transactions by fee per weight unit.
0 commit comments