#Calculating event size

2 messages · Page 1 of 1 (latest)

cloud wing
#

Would the following code return accurate event size? Trying to make sure event size is under the phase 1 limit.

simulation.events.reduce((acc, e) => acc + e.event().toXDR().length, 0)

simulation is SorobanRpc.SimulateTransactionSuccessResponse

cc: @wind shadow

grand peak
#

yes. also need to add the size of the return value of the top-level contract call to the result