multiversx-chain-vm 0.23.1

MultiversX VM implementation and tooling
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
[BuiltInCost]
    ChangeOwnerAddress       = 5000000
    ClaimDeveloperRewards    = 5000000
    SaveUserName             = 1000000
    SaveKeyValue             = 250000
    ESDTTransfer             = 250000
    ESDTBurn                 = 250000
    ESDTLocalMint            = 250000
    ESDTLocalBurn            = 250000
    ESDTNFTCreate            = 500000
    ESDTNFTAddQuantity       = 500000
    ESDTNFTBurn              = 500000
    ESDTNFTTransfer          = 500000
    ESDTNFTChangeCreateOwner = 1000000
    ESDTNFTAddUri            = 500000
    ESDTNFTUpdateAttributes  = 500000
    ESDTNFTMultiTransfer     = 1000000
    ESDTModifyRoyalties      = 500000
    ESDTModifyCreator        = 500000
    ESDTNFTRecreate          = 1000000
    ESDTNFTUpdate            = 1000000
    ESDTNFTSetNewURIs        = 500000
    SetGuardian              = 250000
    GuardAccount             = 250000
    UnGuardAccount           = 250000
    TrieLoadPerNode          = 100000
    TrieStorePerNode         = 50000

[MetaChainSystemSCsCost]
    Stake                 = 5000000
    UnStake               = 5000000
    UnBond                = 5000000
    Claim                 = 5000000
    Get                   = 5000000
    ChangeRewardAddress   = 5000000
    ChangeValidatorKeys   = 5000000
    UnJail                = 5000000
    ESDTIssue             = 50000000
    ESDTOperations        = 50000000
    Proposal              = 5000000
    Vote                  = 500000
    DelegateVote          = 1000000
    RevokeVote            = 500000
    CloseProposal         = 1000000
    ClearProposal         = 1000000
    ClaimAccumulatedFees  = 1000000
    ChangeConfig          = 50000000
    DelegationOps         = 1000000
    UnstakeTokens         = 5000000
    UnbondTokens          = 5000000
    GetActiveFund         = 50000
    DelegationMgrOps      = 50000000
    ValidatorToDelegation = 500000000
    GetAllNodeStates      = 100000000
    FixWaitingListSize    = 500000000

[BaseOperationCost]
    StorePerByte      = 50000
    ReleasePerByte    = 10000
    DataCopyPerByte   = 1000
    PersistPerByte    = 10000
    CompilePerByte    = 300
    AoTPreparePerByte = 300
    GetCode           = 1000000

[BaseOpsAPICost]
    GetSCAddress       = 100
    GetOwnerAddress    = 5000
    IsSmartContract    = 5000
    GetShardOfAddress  = 5000
    GetExternalBalance = 7000
    GetBlockHash       = 10000
    TransferValue      = 150000
    GetArgument        = 100
    GetFunction        = 100
    GetNumArguments    = 100
    StorageStore       = 250000
    StorageLoad        = 100000
    CachedStorageLoad  = 100000
    GetCaller          = 100
    GetCallValue       = 100
    Log                = 3750
    Finish             = 1
    SignalError        = 1
    GetBlockTimeStamp  = 10000
    GetGasLeft         = 100
    Int64GetArgument   = 100
    Int64StorageStore  = 250000
    Int64StorageLoad   = 100000
    Int64Finish        = 1000
    GetStateRootHash   = 10000
    GetBlockNonce      = 10000
    GetBlockEpoch      = 10000
    GetBlockRound      = 10000
    GetBlockRandomSeed = 10000
    ExecuteOnSameContext = 160000
    ExecuteOnDestContext = 160000
    DelegateExecution    = 160000
    AsyncCallStep        = 200000
    AsyncCallbackGasLock = 2000000
    ExecuteReadOnly      = 160000
    CreateContract       = 300000
    GetReturnData        = 100
    GetNumReturnData     = 100
    GetReturnDataSize    = 100
    CleanReturnData      = 100
    DeleteFromReturnData = 100
    GetOriginalTxHash    = 10000
    GetPrevTxHash      = 10000
    GetCurrentTxHash   = 10000
    CreateAsyncCall      = 200000
    SetAsyncCallback     = 100000
    SetAsyncGroupCallback   = 100000
    SetAsyncContextCallback = 100000
    GetCallbackClosure   = 10000
    GetCodeMetadata      = 10000
    GetCodeHash          = 10000
    IsBuiltinFunction    = 10000
    IsReservedFunctionName = 10000
    GetRoundTime    = 10000
    EpochStartBlockTimeStamp = 10000
    EpochStartBlockNonce = 10000
    EpochStartBlockRound = 10000

[EthAPICost]
    UseGas              = 100
    GetAddress          = 100000
    GetExternalBalance  = 70000
    GetBlockHash        = 100000
    Call                = 160000
    CallDataCopy        = 200
    GetCallDataSize     = 100
    CallCode            = 160000
    CallDelegate        = 160000
    CallStatic          = 160000
    StorageStore        = 250000
    StorageLoad         = 100000
    GetCaller           = 100
    GetCallValue        = 100
    CodeCopy            = 1000
    GetCodeSize         = 100
    GetBlockCoinbase    = 100
    Create              = 320000
    GetBlockDifficulty  = 100
    ExternalCodeCopy    = 3000
    GetExternalCodeSize = 2500
    GetGasLeft          = 100
    GetBlockGasLimit    = 100000
    GetTxGasPrice       = 1000
    Log                 = 3750
    GetBlockNumber      = 100000
    GetTxOrigin         = 100000
    Finish              = 1
    Revert              = 1
    GetReturnDataSize   = 200
    ReturnDataCopy      = 500
    SelfDestruct        = 5000000
    GetBlockTimeStamp   = 100000

[BigIntAPICost]
    BigIntNew                = 2000
    BigIntByteLength         = 2000
    BigIntUnsignedByteLength = 2000
    BigIntSignedByteLength   = 2000
    BigIntGetBytes           = 2000
    BigIntGetUnsignedBytes   = 2000
    BigIntGetSignedBytes     = 2000
    BigIntSetBytes           = 2000
    BigIntSetUnsignedBytes   = 2000
    BigIntSetSignedBytes     = 2000
    BigIntIsInt64            = 2000
    BigIntGetInt64           = 2000
    BigIntSetInt64           = 2000
    BigIntAdd                = 2000
    BigIntSub                = 2000
    BigIntMul                = 6000
    BigIntSqrt               = 6000
    BigIntPow                = 6000
    BigIntLog                = 6000
    BigIntTDiv               = 6000
    BigIntTMod               = 6000
    BigIntEDiv               = 6000
    BigIntEMod               = 6000
    BigIntAbs                = 2000
    BigIntNeg                = 2000
    BigIntSign               = 2000
    BigIntCmp                = 2000
    BigIntNot                = 2000
    BigIntAnd                = 2000
    BigIntOr                 = 2000
    BigIntXor                = 2000
    BigIntShr                = 2000
    BigIntShl                = 2000
    BigIntFinishUnsigned     = 1000
    BigIntFinishSigned       = 1000
    BigIntStorageLoadUnsigned   = 100000
    BigIntStorageStoreUnsigned  = 250000
    BigIntGetArgument           = 1000
    BigIntGetUnsignedArgument   = 1000
    BigIntGetSignedArgument     = 1000
    BigIntGetCallValue          = 1000
    BigIntGetExternalBalance    = 10000
    CopyPerByteForTooBig        = 1000

[CryptoAPICost]
    SHA256          = 1000000
    Keccak256       = 1000000
    Ripemd160       = 1000000
    VerifyBLS       = 5000000
    VerifyEd25519   = 2000000
    VerifySecp256k1 = 2000000
    EllipticCurveNew       = 10000
    AddECC                 = 75000
    DoubleECC              = 65000
    IsOnCurveECC           = 10000
    ScalarMultECC          = 400000
    MarshalECC             = 13000
    MarshalCompressedECC   = 15000
    UnmarshalECC           = 20000
    UnmarshalCompressedECC = 270000
    GenerateKeyECC         = 7000000
    EncodeDERSig           = 10000000
    VerifySecp256r1        = 2000000
    VerifyBLSSignatureShare = 2000000
    VerifyBLSMultiSig      = 2000000

[ManagedBufferAPICost]
    MBufferNew                   = 2000
    MBufferNewFromBytes          = 4000
    MBufferGetLength             = 2000
    MBufferGetBytes              = 2000
    MBufferGetByteSlice          = 2000
    MBufferCopyByteSlice         = 2000
    MBufferSetBytes              = 2000
    MBufferAppend                = 2000
    MBufferAppendBytes           = 2000
    MBufferToBigIntUnsigned      = 4000
    MBufferToBigIntSigned        = 10000
    MBufferFromBigIntUnsigned    = 4000
    MBufferFromBigIntSigned      = 10000
    MBufferStorageStore          = 250000
    MBufferStorageLoad           = 100000
    MBufferGetArgument           = 1000
    MBufferFinish                = 1000
    MBufferSetRandom             = 6000
    MBufferToBigFloat            = 2000
    MBufferFromBigFloat          = 2000
    MBufferToSmallIntUnsigned    = 10000
    MBufferToSmallIntSigned      = 10000
    MBufferFromSmallIntUnsigned  = 10000
    MBufferFromSmallIntSigned    = 10000

[BigFloatAPICost]
    BigFloatNewFromParts    = 3000
    BigFloatAdd             = 7000
    BigFloatSub             = 7000
    BigFloatMul             = 7000
    BigFloatDiv             = 7000
    BigFloatTruncate        = 5000
    BigFloatNeg             = 5000
    BigFloatClone           = 5000
    BigFloatCmp             = 4000
    BigFloatAbs             = 5000
    BigFloatSqrt            = 7000
    BigFloatPow             = 10000
    BigFloatPowPerIteration = 10000
    BigFloatFloor           = 5000
    BigFloatCeil            = 5000
    BigFloatIsInt           = 3000
    BigFloatSetBigInt       = 3000
    BigFloatSetInt64        = 1000
    BigFloatGetConst        = 1000

[WASMOpcodeCost]
    Unreachable = 1
    Nop = 1
    Block = 1
    Loop = 1
    If = 1
    Else = 2
    End = 2
    Br = 2
    BrIf = 3
    BrTable = 2
    Return = 3
    Call = 3
    CallIndirect = 3
    Drop = 3
    Select = 3
    TypedSelect = 3
    LocalGet = 3
    LocalSet = 3
    LocalTee = 3
    GlobalGet = 3
    GlobalSet = 3
    I32Load = 3
    I64Load = 3
    F32Load = 6
    F64Load = 6
    I32Load8S = 3
    I32Load8U = 3
    I32Load16S = 3
    I32Load16U = 3
    I64Load8S = 3
    I64Load8U = 3
    I64Load16S = 3
    I64Load16U = 3
    I64Load32S = 3
    I64Load32U = 3
    I32Store = 3
    I64Store = 3
    F32Store = 12
    F64Store = 12
    I32Store8 = 3
    I32Store16 = 3
    I64Store8 = 3
    I64Store16 = 3
    I64Store32 = 3
    MemorySize = 5
    MemoryGrow = 5
    I32Const = 1
    I64Const = 1
    F32Const = 1
    F64Const = 1
    RefNull = 1
    RefIsNull = 1
    RefFunc = 1
    I32Eqz = 1
    I32Eq = 1
    I32Ne = 1
    I32LtS = 1
    I32LtU = 1
    I32GtS = 1
    I32GtU = 1
    I32LeS = 1
    I32LeU = 1
    I32GeS = 1
    I32GeU = 1
    I64Eqz = 1
    I64Eq = 1
    I64Ne = 1
    I64LtS = 1
    I64LtU = 1
    I64GtS = 1
    I64GtU = 1
    I64LeS = 1
    I64LeU = 1
    I64GeS = 1
    I64GeU = 1
    F32Eq = 6
    F32Ne = 6
    F32Lt = 6
    F32Gt = 6
    F32Le = 6
    F32Ge = 6
    F64Eq = 6
    F64Ne = 6
    F64Lt = 6
    F64Gt = 6
    F64Le = 6
    F64Ge = 6
    I32Clz = 100
    I32Ctz = 100
    I32Popcnt = 100
    I32Add = 1
    I32Sub = 1
    I32Mul = 3
    I32DivS = 18
    I32DivU = 18
    I32RemS = 18
    I32RemU = 18
    I32And = 1
    I32Or = 1
    I32Xor = 1
    I32Shl = 3
    I32ShrS = 3
    I32ShrU = 3
    I32Rotl = 5
    I32Rotr = 5
    I64Clz = 100
    I64Ctz = 100
    I64Popcnt = 100
    I64Add = 1
    I64Sub = 1
    I64Mul = 3
    I64DivS = 18
    I64DivU = 18
    I64RemS = 18
    I64RemU = 18
    I64And = 1
    I64Or = 1
    I64Xor = 1
    I64Shl = 3
    I64ShrS = 3
    I64ShrU = 3
    I64Rotl = 5
    I64Rotr = 5
    F32Abs = 5
    F32Neg = 5
    F32Ceil = 100
    F32Floor = 100
    F32Trunc = 100
    F32Nearest = 100
    F32Sqrt = 100
    F32Add = 5
    F32Sub = 5
    F32Mul = 15
    F32Div = 100
    F32Min = 15
    F32Max = 15
    F32Copysign = 5
    F64Abs = 5
    F64Neg = 5
    F64Ceil = 100
    F64Floor = 100
    F64Trunc = 100
    F64Nearest = 100
    F64Sqrt = 100
    F64Add = 5
    F64Sub = 5
    F64Mul = 15
    F64Div = 100
    F64Min = 15
    F64Max = 15
    F64Copysign = 5
    I32WrapI64 = 9
    I32TruncF32S = 100
    I32TruncF32U = 100
    I32TruncF64S = 100
    I32TruncF64U = 100
    I64ExtendI32S = 9
    I64ExtendI32U = 9
    I64TruncF32S = 100
    I64TruncF32U = 100
    I64TruncF64S = 100
    I64TruncF64U = 100
    F32ConvertI32S = 100
    F32ConvertI32U = 100
    F32ConvertI64S = 100
    F32ConvertI64U = 100
    F32DemoteF64 = 100
    F64ConvertI32S = 100
    F64ConvertI32U = 100
    F64ConvertI64S = 100
    F64ConvertI64U = 100
    F64PromoteF32 = 100
    I32ReinterpretF32 = 100
    I64ReinterpretF64 = 100
    F32ReinterpretI32 = 100
    F64ReinterpretI64 = 100
    I32Extend8S = 9
    I32Extend16S = 9
    I64Extend8S = 9
    I64Extend16S = 9
    I64Extend32S = 9
    I32TruncSatF32S = 100
    I32TruncSatF32U = 100
    I32TruncSatF64S = 100
    I32TruncSatF64U = 100
    I64TruncSatF32S = 100
    I64TruncSatF32U = 100
    I64TruncSatF64S = 100
    I64TruncSatF64U = 100
    MemoryInit = 5
    DataDrop = 5
    MemoryCopy = 5
    MemoryFill = 5
    TableInit = 10
    ElemDrop = 10
    TableCopy = 10
    TableFill = 10
    TableGet = 10
    TableSet = 10
    TableGrow = 10
    TableSize = 10
    AtomicNotify = 10
    I32AtomicWait = 10
    I64AtomicWait = 10
    AtomicFence = 10
    I32AtomicLoad = 15
    I64AtomicLoad = 15
    I32AtomicLoad8U = 15
    I32AtomicLoad16U = 15
    I64AtomicLoad8U = 15
    I64AtomicLoad16U = 15
    I64AtomicLoad32U = 15
    I32AtomicStore = 15
    I64AtomicStore = 15
    I32AtomicStore8 = 15
    I32AtomicStore16 = 15
    I64AtomicStore8 = 15
    I64AtomicStore16 = 15
    I64AtomicStore32 = 15
    I32AtomicRmwAdd = 20
    I64AtomicRmwAdd = 20
    I32AtomicRmw8AddU = 20
    I32AtomicRmw16AddU = 20
    I64AtomicRmw8AddU = 20
    I64AtomicRmw16AddU = 20
    I64AtomicRmw32AddU = 20
    I32AtomicRmwSub = 20
    I64AtomicRmwSub = 20
    I32AtomicRmw8SubU = 20
    I32AtomicRmw16SubU = 20
    I64AtomicRmw8SubU = 20
    I64AtomicRmw16SubU = 20
    I64AtomicRmw32SubU = 20
    I32AtomicRmwAnd = 15
    I64AtomicRmwAnd = 15
    I32AtomicRmw8AndU = 15
    I32AtomicRmw16AndU = 15
    I64AtomicRmw8AndU = 15
    I64AtomicRmw16AndU = 15
    I64AtomicRmw32AndU = 15
    I32AtomicRmwOr = 15
    I64AtomicRmwOr = 15
    I32AtomicRmw8OrU = 15
    I32AtomicRmw16OrU = 15
    I64AtomicRmw8OrU = 15
    I64AtomicRmw16OrU = 15
    I64AtomicRmw32OrU = 15
    I32AtomicRmwXor = 15
    I64AtomicRmwXor = 15
    I32AtomicRmw8XorU = 15
    I32AtomicRmw16XorU = 15
    I64AtomicRmw8XorU = 15
    I64AtomicRmw16XorU = 15
    I64AtomicRmw32XorU = 15
    I32AtomicRmwXchg = 30
    I64AtomicRmwXchg = 30
    I32AtomicRmw8XchgU = 30
    I32AtomicRmw16XchgU = 30
    I64AtomicRmw8XchgU = 30
    I64AtomicRmw16XchgU = 30
    I64AtomicRmw32XchgU = 30
    I32AtomicRmwCmpxchg = 30
    I64AtomicRmwCmpxchg = 30
    I32AtomicRmw8CmpxchgU = 30
    I32AtomicRmw16CmpxchgU = 30
    I64AtomicRmw8CmpxchgU = 30
    I64AtomicRmw16CmpxchgU = 30
    I64AtomicRmw32CmpxchgU = 30
    V128Load = 18
    V128Store = 18
    V128Const = 18
    I8x16Splat = 20
    I8x16ExtractLaneS = 20
    I8x16ExtractLaneU = 20
    I8x16ReplaceLane = 20
    I16x8Splat = 20
    I16x8ExtractLaneS = 20
    I16x8ExtractLaneU = 20
    I16x8ReplaceLane = 20
    I32x4Splat = 20
    I32x4ExtractLane = 20
    I32x4ReplaceLane = 20
    I64x2Splat = 20
    I64x2ExtractLane = 20
    I64x2ReplaceLane = 20
    F32x4Splat = 120
    F32x4ExtractLane = 120
    F32x4ReplaceLane = 120
    F64x2Splat = 120
    F64x2ExtractLane = 120
    F64x2ReplaceLane = 120
    I8x16Eq = 30
    I8x16Ne = 30
    I8x16LtS = 40
    I8x16LtU = 40
    I8x16GtS = 40
    I8x16GtU = 40
    I8x16LeS = 40
    I8x16LeU = 40
    I8x16GeS = 40
    I8x16GeU = 40
    I16x8Eq = 30
    I16x8Ne = 30
    I16x8LtS = 40
    I16x8LtU = 40
    I16x8GtS = 40
    I16x8GtU = 40
    I16x8LeS = 40
    I16x8LeU = 40
    I16x8GeS = 40
    I16x8GeU = 40
    I32x4Eq = 30
    I32x4Ne = 30
    I32x4LtS = 40
    I32x4LtU = 40
    I32x4GtS = 40
    I32x4GtU = 40
    I32x4LeS = 40
    I32x4LeU = 40
    I32x4GeS = 40
    I32x4GeU = 40
    F32x4Eq = 120
    F32x4Ne = 120
    F32x4Lt = 120
    F32x4Gt = 120
    F32x4Le = 120
    F32x4Ge = 120
    F64x2Eq = 120
    F64x2Ne = 120
    F64x2Lt = 120
    F64x2Gt = 120
    F64x2Le = 120
    F64x2Ge = 120
    V128Not = 40
    V128And = 40
    V128AndNot = 40
    V128Or = 40
    V128Xor = 40
    V128Bitselect = 40
    I8x16Neg = 20
    I8x16AnyTrue = 20
    I8x16AllTrue = 20
    I8x16Shl = 30
    I8x16ShrS = 30
    I8x16ShrU = 30
    I8x16Add = 20
    I8x16AddSaturateS = 20
    I8x16AddSaturateU = 20
    I8x16Sub = 20
    I8x16SubSaturateS = 20
    I8x16SubSaturateU = 20
    I8x16MinS = 40
    I8x16MinU = 40
    I8x16MaxS = 40
    I8x16MaxU = 40
    I8x16Mul = 80
    I16x8Neg = 40
    I16x8AnyTrue = 40
    I16x8AllTrue = 40
    I16x8Shl = 30
    I16x8ShrS = 30
    I16x8ShrU = 30
    I16x8Add = 20
    I16x8AddSaturateS = 20
    I16x8AddSaturateU = 20
    I16x8Sub = 20
    I16x8SubSaturateS = 20
    I16x8SubSaturateU = 20
    I16x8Mul = 40
    I16x8MinS = 40
    I16x8MinU = 40
    I16x8MaxS = 40
    I16x8MaxU = 40
    I32x4Neg = 20
    I32x4AnyTrue = 20
    I32x4AllTrue = 20
    I32x4Shl = 30
    I32x4ShrS = 30
    I32x4ShrU = 30
    I32x4Add = 20
    I32x4Sub = 20
    I32x4Mul = 80
    I32x4MinS = 40
    I32x4MinU = 40
    I32x4MaxS = 40
    I32x4MaxU = 40
    I64x2Neg = 40
    I64x2AnyTrue = 20
    I64x2AllTrue = 20
    I64x2Shl = 30
    I64x2ShrS = 30
    I64x2ShrU = 30
    I64x2Add = 20
    I64x2Sub = 20
    I64x2Mul = 80
    F32x4Abs = 200
    F32x4Neg = 200
    F32x4Sqrt = 1000
    F32x4Add = 200
    F32x4Sub = 200
    F32x4Mul = 800
    F32x4Div = 1000
    F32x4Min = 500
    F32x4Max = 500
    F64x2Abs = 500
    F64x2Neg = 400
    F64x2Sqrt = 1000
    F64x2Add = 200
    F64x2Sub = 200
    F64x2Mul = 800
    F64x2Div = 1000
    F64x2Min = 500
    F64x2Max = 500
    I32x4TruncSatF32x4S = 1000
    I32x4TruncSatF32x4U = 1000
    I64x2TruncSatF64x2S = 1000
    I64x2TruncSatF64x2U = 1000
    F32x4ConvertI32x4S = 1000
    F32x4ConvertI32x4U = 1000
    F64x2ConvertI64x2S = 1000
    F64x2ConvertI64x2U = 1000
    V8x16Swizzle = 1200
    V8x16Shuffle = 1200
    V8x16LoadSplat = 40
    V16x8LoadSplat = 40
    V32x4LoadSplat = 40
    V64x2LoadSplat = 40
    I8x16NarrowI16x8S = 800
    I8x16NarrowI16x8U = 800
    I16x8NarrowI32x4S = 800
    I16x8NarrowI32x4U = 800
    I16x8WidenLowI8x16S = 800
    I16x8WidenHighI8x16S = 800
    I16x8WidenLowI8x16U = 800
    I16x8WidenHighI8x16U = 800
    I32x4WidenLowI16x8S = 800
    I32x4WidenHighI16x8S = 800
    I32x4WidenLowI16x8U = 800
    I32x4WidenHighI16x8U = 800
    I16x8Load8x8S = 400
    I16x8Load8x8U = 400
    I32x4Load16x4S = 400
    I32x4Load16x4U = 400
    I64x2Load32x2S = 400
    I64x2Load32x2U = 400
    I8x16RoundingAverageU = 200
    I16x8RoundingAverageU = 200
    LocalAllocate = 2
    LocalsUnmetered = 100
    MaxMemoryGrowDelta = 100
    MaxMemoryGrow = 100
    Catch = 1
    CatchAll = 1
    Delegate = 1
    F32x4Ceil = 1
    F32x4DemoteF64x2Zero = 1
    F32x4Floor = 1
    F32x4Nearest = 1
    F32x4PMax = 1
    F32x4PMin = 1
    F32x4Trunc = 1
    F64x2Ceil = 1
    F64x2ConvertLowI32x4S = 1
    F64x2ConvertLowI32x4U = 1
    F64x2Floor = 1
    F64x2Nearest = 1
    F64x2PMax = 1
    F64x2PMin = 1
    F64x2PromoteLowF32x4 = 1
    F64x2Trunc = 1
    I16x8Abs = 1
    I16x8AddSatS = 1
    I16x8AddSatU = 1
    I16x8Bitmask = 1
    I16x8ExtAddPairwiseI8x16S = 1
    I16x8ExtAddPairwiseI8x16U = 1
    I16x8ExtMulHighI8x16S = 1
    I16x8ExtMulHighI8x16U = 1
    I16x8ExtMulLowI8x16S = 1
    I16x8ExtMulLowI8x16U = 1
    I16x8ExtendHighI8x16S = 1
    I16x8ExtendHighI8x16U = 1
    I16x8ExtendLowI8x16S = 1
    I16x8ExtendLowI8x16U = 1
    I16x8Q15MulrSatS = 1
    I16x8SubSatS = 1
    I16x8SubSatU = 1
    I32x4Abs = 1
    I32x4Bitmask = 1
    I32x4DotI16x8S = 1
    I32x4ExtAddPairwiseI16x8S = 1
    I32x4ExtAddPairwiseI16x8U = 1
    I32x4ExtMulHighI16x8S = 1
    I32x4ExtMulHighI16x8U = 1
    I32x4ExtMulLowI16x8S = 1
    I32x4ExtMulLowI16x8U = 1
    I32x4ExtendHighI16x8S = 1
    I32x4ExtendHighI16x8U = 1
    I32x4ExtendLowI16x8S = 1
    I32x4ExtendLowI16x8U = 1
    I32x4TruncSatF64x2SZero = 1
    I32x4TruncSatF64x2UZero = 1
    I64x2Abs = 1
    I64x2Bitmask = 1
    I64x2Eq = 1
    I64x2ExtMulHighI32x4S = 1
    I64x2ExtMulHighI32x4U = 1
    I64x2ExtMulLowI32x4S = 1
    I64x2ExtMulLowI32x4U = 1
    I64x2ExtendHighI32x4S = 1
    I64x2ExtendHighI32x4U = 1
    I64x2ExtendLowI32x4S = 1
    I64x2ExtendLowI32x4U = 1
    I64x2GeS = 1
    I64x2GtS = 1
    I64x2LeS = 1
    I64x2LtS = 1
    I64x2Ne = 1
    I8x16Abs = 1
    I8x16AddSatS = 1
    I8x16AddSatU = 1
    I8x16Bitmask = 1
    I8x16Popcnt = 1
    I8x16Shuffle = 1
    I8x16SubSatS = 1
    I8x16SubSatU = 1
    I8x16Swizzle = 1
    MemoryAtomicNotify = 1
    MemoryAtomicWait32 = 1
    MemoryAtomicWait64 = 1
    Rethrow = 1
    ReturnCall = 1
    ReturnCallIndirect = 1
    Throw = 1
    Try = 1
    Unwind = 1
    V128AnyTrue = 1
    V128Load16Lane = 1
    V128Load16Splat = 1
    V128Load16x4S = 1
    V128Load16x4U = 1
    V128Load32Lane = 1
    V128Load32Splat = 1
    V128Load32Zero = 1
    V128Load32x2S = 1
    V128Load32x2U = 1
    V128Load64Lane = 1
    V128Load64Splat = 1
    V128Load64Zero = 1
    V128Load8Lane = 1
    V128Load8Splat = 1
    V128Load8x8S = 1
    V128Load8x8U = 1
    V128Store16Lane = 1
    V128Store32Lane = 1
    V128Store64Lane = 1
    V128Store8Lane = 1

[MaxPerTransaction]
    MaxBuiltInCallsPerTx = 100
    MaxNumberOfTransfersPerTx = 250
    MaxNumberOfTrieReadsPerTx = 1500

# Quadratic, Linear and Constant are the coefficients for a quadratic func. Separate variables are used for the
# sign of each coefficient, 0 meaning positive and 1 meaning negative
# The current values for the coefficients were computed based on benchmarking.
# For the given coefficients, the minimum of the function must not be lower than MinimumGasCost
[DynamicStorageLoad]
    QuadraticCoefficient = 688
    SignOfQuadratic = 0
    LinearCoefficient = 31858
    SignOfLinear = 0
    ConstantCoefficient = 15287
    SignOfConstant = 0
    MinimumGasCost = 10000