@@ -140,9 +140,9 @@ func (vm *VM) Instantiate(
140140 return nil , gasUsed , err
141141 }
142142
143- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
143+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
144144 if gasLimit < gasForDeserialization + gasUsed {
145- return nil , gasUsed , fmt .Errorf ("gas depletion" )
145+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
146146 }
147147 gasUsed += gasForDeserialization
148148
@@ -188,9 +188,9 @@ func (vm *VM) Execute(
188188 return nil , gasUsed , err
189189 }
190190
191- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
191+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
192192 if gasLimit < gasForDeserialization + gasUsed {
193- return nil , gasUsed , fmt .Errorf ("gas depletion" )
193+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
194194 }
195195
196196 gasUsed += gasForDeserialization
@@ -228,9 +228,9 @@ func (vm *VM) Query(
228228 return nil , gasUsed , err
229229 }
230230
231- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
231+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
232232 if gasLimit < gasForDeserialization + gasUsed {
233- return nil , gasUsed , fmt .Errorf ("gas depletion" )
233+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
234234 }
235235 gasUsed += gasForDeserialization
236236
@@ -271,9 +271,9 @@ func (vm *VM) Migrate(
271271 return nil , gasUsed , err
272272 }
273273
274- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
274+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
275275 if gasLimit < gasForDeserialization + gasUsed {
276- return nil , gasUsed , fmt .Errorf ("gas depletion" )
276+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
277277 }
278278 gasUsed += gasForDeserialization
279279
@@ -314,9 +314,9 @@ func (vm *VM) Sudo(
314314 return nil , gasUsed , err
315315 }
316316
317- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
317+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
318318 if gasLimit < gasForDeserialization + gasUsed {
319- return nil , gasUsed , fmt .Errorf ("gas depletion" )
319+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
320320 }
321321 gasUsed += gasForDeserialization
322322
@@ -359,9 +359,9 @@ func (vm *VM) Reply(
359359 return nil , gasUsed , err
360360 }
361361
362- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
362+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
363363 if gasLimit < gasForDeserialization + gasUsed {
364- return nil , gasUsed , fmt .Errorf ("gas depletion" )
364+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
365365 }
366366 gasUsed += gasForDeserialization
367367
@@ -402,9 +402,9 @@ func (vm *VM) IBCChannelOpen(
402402 return gasUsed , err
403403 }
404404
405- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
405+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
406406 if gasLimit < gasForDeserialization + gasUsed {
407- return gasUsed , fmt .Errorf ("gas depletion" )
407+ return gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
408408 }
409409 gasUsed += gasForDeserialization
410410
@@ -445,9 +445,9 @@ func (vm *VM) IBCChannelConnect(
445445 return nil , gasUsed , err
446446 }
447447
448- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
448+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
449449 if gasLimit < gasForDeserialization + gasUsed {
450- return nil , gasUsed , fmt .Errorf ("gas depletion" )
450+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
451451 }
452452 gasUsed += gasForDeserialization
453453
@@ -488,9 +488,9 @@ func (vm *VM) IBCChannelClose(
488488 return nil , gasUsed , err
489489 }
490490
491- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
491+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
492492 if gasLimit < gasForDeserialization + gasUsed {
493- return nil , gasUsed , fmt .Errorf ("gas depletion" )
493+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
494494 }
495495 gasUsed += gasForDeserialization
496496
@@ -531,9 +531,9 @@ func (vm *VM) IBCPacketReceive(
531531 return nil , gasUsed , err
532532 }
533533
534- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
534+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
535535 if gasLimit < gasForDeserialization + gasUsed {
536- return nil , gasUsed , fmt .Errorf ("gas depletion" )
536+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
537537 }
538538 gasUsed += gasForDeserialization
539539
@@ -575,9 +575,9 @@ func (vm *VM) IBCPacketAck(
575575 return nil , gasUsed , err
576576 }
577577
578- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
578+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
579579 if gasLimit < gasForDeserialization + gasUsed {
580- return nil , gasUsed , fmt .Errorf ("gas depletion" )
580+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
581581 }
582582 gasUsed += gasForDeserialization
583583
@@ -619,9 +619,9 @@ func (vm *VM) IBCPacketTimeout(
619619 return nil , gasUsed , err
620620 }
621621
622- gasForDeserialization := uint64 ( deserCost .Mul (uint64 (len (data ))).Floor () )
622+ gasForDeserialization := deserCost .Mul (uint64 (len (data ))).Floor ()
623623 if gasLimit < gasForDeserialization + gasUsed {
624- return nil , gasUsed , fmt .Errorf ("gas depletion" )
624+ return nil , gasUsed , fmt .Errorf ("Insufficient gas left to deserialize contract execution result (%d bytes)" , len ( data ) )
625625 }
626626 gasUsed += gasForDeserialization
627627
0 commit comments