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
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
/* automatically generated by rust-bindgen */

pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int32_t = ::std::os::raw::c_int;
pub type __uint32_t = ::std::os::raw::c_uint;
pub type __int64_t = ::std::os::raw::c_long;
pub const EVMC_ABI_VERSION: _bindgen_ty_1 = _bindgen_ty_1::EVMC_ABI_VERSION;
#[repr(u32)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum _bindgen_ty_1 {
    #[doc = " The EVMC ABI version number of the interface declared in this file."]
    #[doc = ""]
    #[doc = " The EVMC ABI version always equals the major version number of the EVMC project."]
    #[doc = " The Host SHOULD check if the ABI versions match when dynamically loading VMs."]
    #[doc = ""]
    #[doc = " @see @ref versioning"]
    EVMC_ABI_VERSION = 7,
}
#[doc = " The fixed size array of 32 bytes."]
#[doc = ""]
#[doc = " 32 bytes of data capable of storing e.g. 256-bit hashes."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_bytes32 {
    #[doc = " The 32 bytes."]
    pub bytes: [u8; 32usize],
}
#[test]
fn bindgen_test_layout_evmc_bytes32() {
    assert_eq!(
        ::std::mem::size_of::<evmc_bytes32>(),
        32usize,
        concat!("Size of: ", stringify!(evmc_bytes32))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_bytes32>(),
        1usize,
        concat!("Alignment of ", stringify!(evmc_bytes32))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_bytes32>())).bytes as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_bytes32),
            "::",
            stringify!(bytes)
        )
    );
}
#[doc = " The alias for evmc_bytes32 to represent a big-endian 256-bit integer."]
pub type evmc_uint256be = evmc_bytes32;
#[doc = " Big-endian 160-bit hash suitable for keeping an Ethereum address."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_address {
    #[doc = " The 20 bytes of the hash."]
    pub bytes: [u8; 20usize],
}
#[test]
fn bindgen_test_layout_evmc_address() {
    assert_eq!(
        ::std::mem::size_of::<evmc_address>(),
        20usize,
        concat!("Size of: ", stringify!(evmc_address))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_address>(),
        1usize,
        concat!("Alignment of ", stringify!(evmc_address))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_address>())).bytes as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_address),
            "::",
            stringify!(bytes)
        )
    );
}
#[repr(u32)]
#[doc = " The kind of call-like instruction."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_call_kind {
    #[doc = "< Request CALL."]
    EVMC_CALL = 0,
    #[doc = "< Request DELEGATECALL. Valid since Homestead."]
    #[doc = "The value param ignored."]
    EVMC_DELEGATECALL = 1,
    #[doc = "< Request CALLCODE."]
    EVMC_CALLCODE = 2,
    #[doc = "< Request CREATE."]
    EVMC_CREATE = 3,
    #[doc = "< Request CREATE2. Valid since Constantinople."]
    EVMC_CREATE2 = 4,
}
#[repr(u32)]
#[doc = " The flags for ::evmc_message."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_flags {
    #[doc = "< Static call mode."]
    EVMC_STATIC = 1,
}
#[doc = " The message describing an EVM call,"]
#[doc = " including a zero-depth calls from a transaction origin."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_message {
    #[doc = " The kind of the call. For zero-depth calls ::EVMC_CALL SHOULD be used."]
    pub kind: evmc_call_kind,
    #[doc = " Additional flags modifying the call execution behavior."]
    #[doc = " In the current version the only valid values are ::EVMC_STATIC or 0."]
    pub flags: u32,
    #[doc = " The call depth."]
    pub depth: i32,
    #[doc = " The amount of gas for message execution."]
    pub gas: i64,
    #[doc = " The destination of the message."]
    pub destination: evmc_address,
    #[doc = " The sender of the message."]
    pub sender: evmc_address,
    #[doc = " The message input data."]
    #[doc = ""]
    #[doc = " This MAY be NULL."]
    pub input_data: *const u8,
    #[doc = " The size of the message input data."]
    #[doc = ""]
    #[doc = " If input_data is NULL this MUST be 0."]
    pub input_size: usize,
    #[doc = " The amount of Ether transferred with the message."]
    pub value: evmc_uint256be,
    #[doc = " The optional value used in new contract address construction."]
    #[doc = ""]
    #[doc = " Ignored unless kind is EVMC_CREATE2."]
    pub create2_salt: evmc_bytes32,
}
#[test]
fn bindgen_test_layout_evmc_message() {
    assert_eq!(
        ::std::mem::size_of::<evmc_message>(),
        144usize,
        concat!("Size of: ", stringify!(evmc_message))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_message>(),
        8usize,
        concat!("Alignment of ", stringify!(evmc_message))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).kind as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(kind)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).flags as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(flags)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).depth as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(depth)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).gas as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(gas)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).destination as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(destination)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).sender as *const _ as usize },
        44usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(sender)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).input_data as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(input_data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).input_size as *const _ as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(input_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).value as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(value)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_message>())).create2_salt as *const _ as usize },
        112usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_message),
            "::",
            stringify!(create2_salt)
        )
    );
}
#[doc = " The transaction and block data for execution."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_tx_context {
    #[doc = "< The transaction gas price."]
    pub tx_gas_price: evmc_uint256be,
    #[doc = "< The transaction origin account."]
    pub tx_origin: evmc_address,
    #[doc = "< The miner of the block."]
    pub block_coinbase: evmc_address,
    #[doc = "< The block number."]
    pub block_number: i64,
    #[doc = "< The block timestamp."]
    pub block_timestamp: i64,
    #[doc = "< The block gas limit."]
    pub block_gas_limit: i64,
    #[doc = "< The block difficulty."]
    pub block_difficulty: evmc_uint256be,
    #[doc = "< The blockchain's ChainID."]
    pub chain_id: evmc_uint256be,
}
#[test]
fn bindgen_test_layout_evmc_tx_context() {
    assert_eq!(
        ::std::mem::size_of::<evmc_tx_context>(),
        160usize,
        concat!("Size of: ", stringify!(evmc_tx_context))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_tx_context>(),
        8usize,
        concat!("Alignment of ", stringify!(evmc_tx_context))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).tx_gas_price as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(tx_gas_price)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).tx_origin as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(tx_origin)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).block_coinbase as *const _ as usize },
        52usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(block_coinbase)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).block_number as *const _ as usize },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(block_number)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).block_timestamp as *const _ as usize },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(block_timestamp)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).block_gas_limit as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(block_gas_limit)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_tx_context>())).block_difficulty as *const _ as usize
        },
        96usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(block_difficulty)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_tx_context>())).chain_id as *const _ as usize },
        128usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_tx_context),
            "::",
            stringify!(chain_id)
        )
    );
}
#[doc = " @struct evmc_host_context"]
#[doc = " The opaque data type representing the Host execution context."]
#[doc = " @see evmc_execute_fn()."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_host_context {
    _unused: [u8; 0],
}
#[doc = " Get transaction context callback function."]
#[doc = ""]
#[doc = "  This callback function is used by an EVM to retrieve the transaction and"]
#[doc = "  block context."]
#[doc = ""]
#[doc = "  @param      context  The pointer to the Host execution context."]
#[doc = "  @return              The transaction context."]
pub type evmc_get_tx_context_fn =
    ::std::option::Option<unsafe extern "C" fn(context: *mut evmc_host_context) -> evmc_tx_context>;
#[doc = " Get block hash callback function."]
#[doc = ""]
#[doc = " This callback function is used by a VM to query the hash of the header of the given block."]
#[doc = " If the information about the requested block is not available, then this is signalled by"]
#[doc = " returning null bytes."]
#[doc = ""]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param number   The block number."]
#[doc = " @return         The block hash or null bytes"]
#[doc = "                 if the information about the block is not available."]
pub type evmc_get_block_hash_fn = ::std::option::Option<
    unsafe extern "C" fn(context: *mut evmc_host_context, number: i64) -> evmc_bytes32,
>;
#[repr(i32)]
#[doc = " The execution status code."]
#[doc = ""]
#[doc = " Successful execution is represented by ::EVMC_SUCCESS having value 0."]
#[doc = ""]
#[doc = " Positive values represent failures defined by VM specifications with generic"]
#[doc = " ::EVMC_FAILURE code of value 1."]
#[doc = ""]
#[doc = " Status codes with negative values represent VM internal errors"]
#[doc = " not provided by EVM specifications. These errors MUST not be passed back"]
#[doc = " to the caller. They MAY be handled by the Client in predefined manner"]
#[doc = " (see e.g. ::EVMC_REJECTED), otherwise internal errors are not recoverable."]
#[doc = " The generic representant of errors is ::EVMC_INTERNAL_ERROR but"]
#[doc = " an EVM implementation MAY return negative status codes that are not defined"]
#[doc = " in the EVMC documentation."]
#[doc = ""]
#[doc = " @note"]
#[doc = " In case new status codes are needed, please create an issue or pull request"]
#[doc = " in the EVMC repository (https://github.com/ethereum/evmc)."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_status_code {
    #[doc = " Execution finished with success."]
    EVMC_SUCCESS = 0,
    #[doc = " Generic execution failure."]
    EVMC_FAILURE = 1,
    #[doc = " Execution terminated with REVERT opcode."]
    #[doc = ""]
    #[doc = " In this case the amount of gas left MAY be non-zero and additional output"]
    #[doc = " data MAY be provided in ::evmc_result."]
    EVMC_REVERT = 2,
    #[doc = " The execution has run out of gas."]
    EVMC_OUT_OF_GAS = 3,
    #[doc = " The designated INVALID instruction has been hit during execution."]
    #[doc = ""]
    #[doc = " The EIP-141 (https://github.com/ethereum/EIPs/blob/master/EIPS/eip-141.md)"]
    #[doc = " defines the instruction 0xfe as INVALID instruction to indicate execution"]
    #[doc = " abortion coming from high-level languages. This status code is reported"]
    #[doc = " in case this INVALID instruction has been encountered."]
    EVMC_INVALID_INSTRUCTION = 4,
    #[doc = " An undefined instruction has been encountered."]
    EVMC_UNDEFINED_INSTRUCTION = 5,
    #[doc = " The execution has attempted to put more items on the EVM stack"]
    #[doc = " than the specified limit."]
    EVMC_STACK_OVERFLOW = 6,
    #[doc = " Execution of an opcode has required more items on the EVM stack."]
    EVMC_STACK_UNDERFLOW = 7,
    #[doc = " Execution has violated the jump destination restrictions."]
    EVMC_BAD_JUMP_DESTINATION = 8,
    #[doc = " Tried to read outside memory bounds."]
    #[doc = ""]
    #[doc = " An example is RETURNDATACOPY reading past the available buffer."]
    EVMC_INVALID_MEMORY_ACCESS = 9,
    #[doc = " Call depth has exceeded the limit (if any)"]
    EVMC_CALL_DEPTH_EXCEEDED = 10,
    #[doc = " Tried to execute an operation which is restricted in static mode."]
    EVMC_STATIC_MODE_VIOLATION = 11,
    #[doc = " A call to a precompiled or system contract has ended with a failure."]
    #[doc = ""]
    #[doc = " An example: elliptic curve functions handed invalid EC points."]
    EVMC_PRECOMPILE_FAILURE = 12,
    #[doc = " Contract validation has failed (e.g. due to EVM 1.5 jump validity,"]
    #[doc = " Casper's purity checker or ewasm contract rules)."]
    EVMC_CONTRACT_VALIDATION_FAILURE = 13,
    #[doc = " An argument to a state accessing method has a value outside of the"]
    #[doc = " accepted range of values."]
    EVMC_ARGUMENT_OUT_OF_RANGE = 14,
    #[doc = " A WebAssembly `unreachable` instruction has been hit during execution."]
    EVMC_WASM_UNREACHABLE_INSTRUCTION = 15,
    #[doc = " A WebAssembly trap has been hit during execution. This can be for many"]
    #[doc = " reasons, including division by zero, validation errors, etc."]
    EVMC_WASM_TRAP = 16,
    #[doc = " The caller does not have enough funds for value transfer."]
    EVMC_INSUFFICIENT_BALANCE = 17,
    #[doc = " EVM implementation generic internal error."]
    EVMC_INTERNAL_ERROR = -1,
    #[doc = " The execution of the given code and/or message has been rejected"]
    #[doc = " by the EVM implementation."]
    #[doc = ""]
    #[doc = " This error SHOULD be used to signal that the EVM is not able to or"]
    #[doc = " willing to execute the given code type or message."]
    #[doc = " If an EVM returns the ::EVMC_REJECTED status code,"]
    #[doc = " the Client MAY try to execute it in other EVM implementation."]
    #[doc = " For example, the Client tries running a code in the EVM 1.5. If the"]
    #[doc = " code is not supported there, the execution falls back to the EVM 1.0."]
    EVMC_REJECTED = -2,
    #[doc = " The VM failed to allocate the amount of memory needed for execution."]
    EVMC_OUT_OF_MEMORY = -3,
}
#[doc = " Releases resources assigned to an execution result."]
#[doc = ""]
#[doc = " This function releases memory (and other resources, if any) assigned to the"]
#[doc = " specified execution result making the result object invalid."]
#[doc = ""]
#[doc = " @param result  The execution result which resources are to be released. The"]
#[doc = "                result itself it not modified by this function, but becomes"]
#[doc = "                invalid and user MUST discard it as well."]
#[doc = "                This MUST NOT be NULL."]
#[doc = ""]
#[doc = " @note"]
#[doc = " The result is passed by pointer to avoid (shallow) copy of the ::evmc_result"]
#[doc = " struct. Think of this as the best possible C language approximation to"]
#[doc = " passing objects by reference."]
pub type evmc_release_result_fn =
    ::std::option::Option<unsafe extern "C" fn(result: *const evmc_result)>;
#[doc = " The EVM code execution result."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_result {
    #[doc = " The execution status code."]
    pub status_code: evmc_status_code,
    #[doc = " The amount of gas left after the execution."]
    #[doc = ""]
    #[doc = " If evmc_result::status_code is neither ::EVMC_SUCCESS nor ::EVMC_REVERT"]
    #[doc = " the value MUST be 0."]
    pub gas_left: i64,
    #[doc = " The reference to output data."]
    #[doc = ""]
    #[doc = "  The output contains data coming from RETURN opcode (iff evmc_result::code"]
    #[doc = "  field is ::EVMC_SUCCESS) or from REVERT opcode."]
    #[doc = ""]
    #[doc = "  The memory containing the output data is owned by EVM and has to be"]
    #[doc = "  freed with evmc_result::release()."]
    #[doc = ""]
    #[doc = "  This MAY be NULL."]
    pub output_data: *const u8,
    #[doc = " The size of the output data."]
    #[doc = ""]
    #[doc = "  If output_data is NULL this MUST be 0."]
    pub output_size: usize,
    #[doc = " The method releasing all resources associated with the result object."]
    #[doc = ""]
    #[doc = " This method (function pointer) is optional (MAY be NULL) and MAY be set"]
    #[doc = " by the VM implementation. If set it MUST be called by the user once to"]
    #[doc = " release memory and other resources associated with the result object."]
    #[doc = " Once the resources are released the result object MUST NOT be used again."]
    #[doc = ""]
    #[doc = " The suggested code pattern for releasing execution results:"]
    #[doc = " @code"]
    #[doc = " struct evmc_result result = ...;"]
    #[doc = " if (result.release)"]
    #[doc = "     result.release(&result);"]
    #[doc = " @endcode"]
    #[doc = ""]
    #[doc = " @note"]
    #[doc = " It works similarly to C++ virtual destructor. Attaching the release"]
    #[doc = " function to the result itself allows VM composition."]
    pub release: evmc_release_result_fn,
    #[doc = " The address of the contract created by create instructions."]
    #[doc = ""]
    #[doc = " This field has valid value only if:"]
    #[doc = " - it is a result of the Host method evmc_host_interface::call"]
    #[doc = " - and the result describes successful contract creation"]
    #[doc = "   (evmc_result::status_code is ::EVMC_SUCCESS)."]
    #[doc = " In all other cases the address MUST be null bytes."]
    pub create_address: evmc_address,
    #[doc = " Reserved data that MAY be used by a evmc_result object creator."]
    #[doc = ""]
    #[doc = "  This reserved 4 bytes together with 20 bytes from create_address form"]
    #[doc = "  24 bytes of memory called \"optional data\" within evmc_result struct"]
    #[doc = "  to be optionally used by the evmc_result object creator."]
    #[doc = ""]
    #[doc = "  @see evmc_result_optional_data, evmc_get_optional_data()."]
    #[doc = ""]
    #[doc = "  Also extends the size of the evmc_result to 64 bytes (full cache line)."]
    pub padding: [u8; 4usize],
}
#[test]
fn bindgen_test_layout_evmc_result() {
    assert_eq!(
        ::std::mem::size_of::<evmc_result>(),
        64usize,
        concat!("Size of: ", stringify!(evmc_result))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_result>(),
        8usize,
        concat!("Alignment of ", stringify!(evmc_result))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).status_code as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(status_code)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).gas_left as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(gas_left)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).output_data as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(output_data)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).output_size as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(output_size)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).release as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(release)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).create_address as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(create_address)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_result>())).padding as *const _ as usize },
        60usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_result),
            "::",
            stringify!(padding)
        )
    );
}
#[doc = " Check account existence callback function."]
#[doc = ""]
#[doc = " This callback function is used by the VM to check if"]
#[doc = " there exists an account at given address."]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param address  The address of the account the query is about."]
#[doc = " @return         true if exists, false otherwise."]
pub type evmc_account_exists_fn = ::std::option::Option<
    unsafe extern "C" fn(context: *mut evmc_host_context, address: *const evmc_address) -> bool,
>;
#[doc = " Get storage callback function."]
#[doc = ""]
#[doc = " This callback function is used by a VM to query the given account storage entry."]
#[doc = ""]
#[doc = " @param context  The Host execution context."]
#[doc = " @param address  The address of the account."]
#[doc = " @param key      The index of the account's storage entry."]
#[doc = " @return         The storage value at the given storage key or null bytes"]
#[doc = "                 if the account does not exist."]
pub type evmc_get_storage_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
        key: *const evmc_bytes32,
    ) -> evmc_bytes32,
>;
#[repr(u32)]
#[doc = " The effect of an attempt to modify a contract storage item."]
#[doc = ""]
#[doc = " For the purpose of explaining the meaning of each element, the following"]
#[doc = " notation is used:"]
#[doc = " - 0 is zero value,"]
#[doc = " - X != 0 (X is any value other than 0),"]
#[doc = " - Y != X, Y != 0 (Y is any value other than X and 0),"]
#[doc = " - Z != Y (Z is any value other than Y),"]
#[doc = " - the \"->\" means the change from one value to another."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_storage_status {
    #[doc = " The value of a storage item has been left unchanged: 0 -> 0 and X -> X."]
    EVMC_STORAGE_UNCHANGED = 0,
    #[doc = " The value of a storage item has been modified: X -> Y."]
    EVMC_STORAGE_MODIFIED = 1,
    #[doc = " A storage item has been modified after being modified before: X -> Y -> Z."]
    EVMC_STORAGE_MODIFIED_AGAIN = 2,
    #[doc = " A new storage item has been added: 0 -> X."]
    EVMC_STORAGE_ADDED = 3,
    #[doc = " A storage item has been deleted: X -> 0."]
    EVMC_STORAGE_DELETED = 4,
}
#[doc = " Set storage callback function."]
#[doc = ""]
#[doc = " This callback function is used by a VM to update the given account storage entry."]
#[doc = " The VM MUST make sure that the account exists. This requirement is only a formality because"]
#[doc = " VM implementations only modify storage of the account of the current execution context"]
#[doc = " (i.e. referenced by evmc_message::destination)."]
#[doc = ""]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param address  The address of the account."]
#[doc = " @param key      The index of the storage entry."]
#[doc = " @param value    The value to be stored."]
#[doc = " @return         The effect on the storage item."]
pub type evmc_set_storage_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
        key: *const evmc_bytes32,
        value: *const evmc_bytes32,
    ) -> evmc_storage_status,
>;
#[doc = " Get balance callback function."]
#[doc = ""]
#[doc = " This callback function is used by a VM to query the balance of the given account."]
#[doc = ""]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param address  The address of the account."]
#[doc = " @return         The balance of the given account or 0 if the account does not exist."]
pub type evmc_get_balance_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
    ) -> evmc_uint256be,
>;
#[doc = " Get code size callback function."]
#[doc = ""]
#[doc = " This callback function is used by a VM to get the size of the code stored"]
#[doc = " in the account at the given address."]
#[doc = ""]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param address  The address of the account."]
#[doc = " @return         The size of the code in the account or 0 if the account does not exist."]
pub type evmc_get_code_size_fn = ::std::option::Option<
    unsafe extern "C" fn(context: *mut evmc_host_context, address: *const evmc_address) -> usize,
>;
#[doc = " Get code hash callback function."]
#[doc = ""]
#[doc = " This callback function is used by a VM to get the keccak256 hash of the code stored"]
#[doc = " in the account at the given address. For existing accounts not having a code, this"]
#[doc = " function returns keccak256 hash of empty data."]
#[doc = ""]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param address  The address of the account."]
#[doc = " @return         The hash of the code in the account or null bytes if the account does not exist."]
pub type evmc_get_code_hash_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
    ) -> evmc_bytes32,
>;
#[doc = " Copy code callback function."]
#[doc = ""]
#[doc = " This callback function is used by an EVM to request a copy of the code"]
#[doc = " of the given account to the memory buffer provided by the EVM."]
#[doc = " The Client MUST copy the requested code, starting with the given offset,"]
#[doc = " to the provided memory buffer up to the size of the buffer or the size of"]
#[doc = " the code, whichever is smaller."]
#[doc = ""]
#[doc = " @param context      The pointer to the Host execution context. See ::evmc_host_context."]
#[doc = " @param address      The address of the account."]
#[doc = " @param code_offset  The offset of the code to copy."]
#[doc = " @param buffer_data  The pointer to the memory buffer allocated by the EVM"]
#[doc = "                     to store a copy of the requested code."]
#[doc = " @param buffer_size  The size of the memory buffer."]
#[doc = " @return             The number of bytes copied to the buffer by the Client."]
pub type evmc_copy_code_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
        code_offset: usize,
        buffer_data: *mut u8,
        buffer_size: usize,
    ) -> usize,
>;
#[doc = " Selfdestruct callback function."]
#[doc = ""]
#[doc = " This callback function is used by an EVM to SELFDESTRUCT given contract."]
#[doc = " The execution of the contract will not be stopped, that is up to the EVM."]
#[doc = ""]
#[doc = " @param context      The pointer to the Host execution context. See ::evmc_host_context."]
#[doc = " @param address      The address of the contract to be selfdestructed."]
#[doc = " @param beneficiary  The address where the remaining ETH is going to be transferred."]
pub type evmc_selfdestruct_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
        beneficiary: *const evmc_address,
    ),
>;
#[doc = " Log callback function."]
#[doc = ""]
#[doc = " This callback function is used by an EVM to inform about a LOG that happened"]
#[doc = " during an EVM bytecode execution."]
#[doc = ""]
#[doc = " @param context       The pointer to the Host execution context. See ::evmc_host_context."]
#[doc = " @param address       The address of the contract that generated the log."]
#[doc = " @param data          The pointer to unindexed data attached to the log."]
#[doc = " @param data_size     The length of the data."]
#[doc = " @param topics        The pointer to the array of topics attached to the log."]
#[doc = " @param topics_count  The number of the topics. Valid values are between 0 and 4 inclusively."]
pub type evmc_emit_log_fn = ::std::option::Option<
    unsafe extern "C" fn(
        context: *mut evmc_host_context,
        address: *const evmc_address,
        data: *const u8,
        data_size: usize,
        topics: *const evmc_bytes32,
        topics_count: usize,
    ),
>;
#[doc = " Pointer to the callback function supporting EVM calls."]
#[doc = ""]
#[doc = " @param context  The pointer to the Host execution context."]
#[doc = " @param msg      The call parameters."]
#[doc = " @return         The result of the call."]
pub type evmc_call_fn = ::std::option::Option<
    unsafe extern "C" fn(context: *mut evmc_host_context, msg: *const evmc_message) -> evmc_result,
>;
#[doc = " The Host interface."]
#[doc = ""]
#[doc = " The set of all callback functions expected by VM instances. This is C"]
#[doc = " realisation of vtable for OOP interface (only virtual methods, no data)."]
#[doc = " Host implementations SHOULD create constant singletons of this (similarly"]
#[doc = " to vtables) to lower the maintenance and memory management cost."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_host_interface {
    #[doc = " Check account existence callback function."]
    pub account_exists: evmc_account_exists_fn,
    #[doc = " Get storage callback function."]
    pub get_storage: evmc_get_storage_fn,
    #[doc = " Set storage callback function."]
    pub set_storage: evmc_set_storage_fn,
    #[doc = " Get balance callback function."]
    pub get_balance: evmc_get_balance_fn,
    #[doc = " Get code size callback function."]
    pub get_code_size: evmc_get_code_size_fn,
    #[doc = " Get code hash callback function."]
    pub get_code_hash: evmc_get_code_hash_fn,
    #[doc = " Copy code callback function."]
    pub copy_code: evmc_copy_code_fn,
    #[doc = " Selfdestruct callback function."]
    pub selfdestruct: evmc_selfdestruct_fn,
    #[doc = " Call callback function."]
    pub call: evmc_call_fn,
    #[doc = " Get transaction context callback function."]
    pub get_tx_context: evmc_get_tx_context_fn,
    #[doc = " Get block hash callback function."]
    pub get_block_hash: evmc_get_block_hash_fn,
    #[doc = " Emit log callback function."]
    pub emit_log: evmc_emit_log_fn,
}
#[test]
fn bindgen_test_layout_evmc_host_interface() {
    assert_eq!(
        ::std::mem::size_of::<evmc_host_interface>(),
        96usize,
        concat!("Size of: ", stringify!(evmc_host_interface))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_host_interface>(),
        8usize,
        concat!("Alignment of ", stringify!(evmc_host_interface))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_host_interface>())).account_exists as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(account_exists)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_host_interface>())).get_storage as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(get_storage)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_host_interface>())).set_storage as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(set_storage)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_host_interface>())).get_balance as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(get_balance)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_host_interface>())).get_code_size as *const _ as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(get_code_size)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_host_interface>())).get_code_hash as *const _ as usize
        },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(get_code_hash)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_host_interface>())).copy_code as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(copy_code)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_host_interface>())).selfdestruct as *const _ as usize
        },
        56usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(selfdestruct)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_host_interface>())).call as *const _ as usize },
        64usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(call)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_host_interface>())).get_tx_context as *const _ as usize
        },
        72usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(get_tx_context)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<evmc_host_interface>())).get_block_hash as *const _ as usize
        },
        80usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(get_block_hash)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_host_interface>())).emit_log as *const _ as usize },
        88usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_host_interface),
            "::",
            stringify!(emit_log)
        )
    );
}
#[doc = " Destroys the VM instance."]
#[doc = ""]
#[doc = " @param vm  The VM instance to be destroyed."]
pub type evmc_destroy_fn = ::std::option::Option<unsafe extern "C" fn(vm: *mut evmc_vm)>;
#[repr(u32)]
#[doc = " Possible outcomes of evmc_set_option."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_set_option_result {
    EVMC_SET_OPTION_SUCCESS = 0,
    EVMC_SET_OPTION_INVALID_NAME = 1,
    EVMC_SET_OPTION_INVALID_VALUE = 2,
}
#[doc = " Configures the VM instance."]
#[doc = ""]
#[doc = " Allows modifying options of the VM instance."]
#[doc = " Options:"]
#[doc = " - code cache behavior: on, off, read-only, ..."]
#[doc = " - optimizations,"]
#[doc = ""]
#[doc = " @param vm     The VM instance to be configured."]
#[doc = " @param name   The option name. NULL-terminated string. Cannot be NULL."]
#[doc = " @param value  The new option value. NULL-terminated string. Cannot be NULL."]
#[doc = " @return       The outcome of the operation."]
pub type evmc_set_option_fn = ::std::option::Option<
    unsafe extern "C" fn(
        vm: *mut evmc_vm,
        name: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
    ) -> evmc_set_option_result,
>;
impl evmc_revision {
    pub const EVMC_MAX_REVISION: evmc_revision = evmc_revision::EVMC_BERLIN;
}
#[repr(u32)]
#[doc = " EVM revision."]
#[doc = ""]
#[doc = " The revision of the EVM specification based on the Ethereum"]
#[doc = " upgrade / hard fork codenames."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_revision {
    #[doc = " The Frontier revision."]
    #[doc = ""]
    #[doc = " The one Ethereum launched with."]
    EVMC_FRONTIER = 0,
    #[doc = " The Homestead revision."]
    #[doc = ""]
    #[doc = " https://eips.ethereum.org/EIPS/eip-606"]
    EVMC_HOMESTEAD = 1,
    #[doc = " The Tangerine Whistle revision."]
    #[doc = ""]
    #[doc = " https://eips.ethereum.org/EIPS/eip-608"]
    EVMC_TANGERINE_WHISTLE = 2,
    #[doc = " The Spurious Dragon revision."]
    #[doc = ""]
    #[doc = " https://eips.ethereum.org/EIPS/eip-607"]
    EVMC_SPURIOUS_DRAGON = 3,
    #[doc = " The Byzantium revision."]
    #[doc = ""]
    #[doc = " https://eips.ethereum.org/EIPS/eip-609"]
    EVMC_BYZANTIUM = 4,
    #[doc = " The Constantinople revision."]
    #[doc = ""]
    #[doc = " https://eips.ethereum.org/EIPS/eip-1013"]
    EVMC_CONSTANTINOPLE = 5,
    #[doc = " The Petersburg revision."]
    #[doc = ""]
    #[doc = " Other names: Constantinople2, ConstantinopleFix."]
    #[doc = ""]
    #[doc = " https://eips.ethereum.org/EIPS/eip-1716"]
    EVMC_PETERSBURG = 6,
    #[doc = " The Istanbul revision."]
    #[doc = ""]
    #[doc = " The spec draft: https://eips.ethereum.org/EIPS/eip-1679."]
    EVMC_ISTANBUL = 7,
    #[doc = " The Berlin revision."]
    #[doc = ""]
    #[doc = " The spec draft: https://eips.ethereum.org/EIPS/eip-2070."]
    EVMC_BERLIN = 8,
}
#[doc = " Executes the given code using the input from the message."]
#[doc = ""]
#[doc = " This function MAY be invoked multiple times for a single VM instance."]
#[doc = ""]
#[doc = " @param vm         The VM instance. This argument MUST NOT be NULL."]
#[doc = " @param host       The Host interface. This argument MUST NOT be NULL unless"]
#[doc = "                   the @p vm has the ::EVMC_CAPABILITY_PRECOMPILES capability."]
#[doc = " @param context    The opaque pointer to the Host execution context."]
#[doc = "                   This argument MAY be NULL. The VM MUST pass the same"]
#[doc = "                   pointer to the methods of the @p host interface."]
#[doc = "                   The VM MUST NOT dereference the pointer."]
#[doc = " @param rev        The requested EVM specification revision."]
#[doc = " @param msg        The call parameters. See ::evmc_message. This argument MUST NOT be NULL."]
#[doc = " @param code       The reference to the code to be executed. This argument MAY be NULL."]
#[doc = " @param code_size  The length of the code. If @p code is NULL this argument MUST be 0."]
#[doc = " @return           The execution result."]
pub type evmc_execute_fn = ::std::option::Option<
    unsafe extern "C" fn(
        vm: *mut evmc_vm,
        host: *const evmc_host_interface,
        context: *mut evmc_host_context,
        rev: evmc_revision,
        msg: *const evmc_message,
        code: *const u8,
        code_size: usize,
    ) -> evmc_result,
>;
#[repr(u32)]
#[doc = " Possible capabilities of a VM."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum evmc_capabilities {
    #[doc = " The VM is capable of executing EVM1 bytecode."]
    EVMC_CAPABILITY_EVM1 = 1,
    #[doc = " The VM is capable of executing ewasm bytecode."]
    EVMC_CAPABILITY_EWASM = 2,
    #[doc = " The VM is capable of executing the precompiled contracts"]
    #[doc = " defined for the range of destination addresses."]
    #[doc = ""]
    #[doc = " The EIP-1352 (https://eips.ethereum.org/EIPS/eip-1352) specifies"]
    #[doc = " the range 0x000...0000 - 0x000...ffff of addresses"]
    #[doc = " reserved for precompiled and system contracts."]
    #[doc = ""]
    #[doc = " This capability is **experimental** and MAY be removed without notice."]
    EVMC_CAPABILITY_PRECOMPILES = 4,
}
#[doc = " Alias for unsigned integer representing a set of bit flags of EVMC capabilities."]
#[doc = ""]
#[doc = " @see evmc_capabilities"]
pub type evmc_capabilities_flagset = u32;
#[doc = " Return the supported capabilities of the VM instance."]
#[doc = ""]
#[doc = " This function MAY be invoked multiple times for a single VM instance,"]
#[doc = " and its value MAY be influenced by calls to evmc_vm::set_option."]
#[doc = ""]
#[doc = " @param vm  The VM instance."]
#[doc = " @return    The supported capabilities of the VM. @see evmc_capabilities."]
pub type evmc_get_capabilities_fn =
    ::std::option::Option<unsafe extern "C" fn(vm: *mut evmc_vm) -> evmc_capabilities_flagset>;
#[doc = " The VM instance."]
#[doc = ""]
#[doc = " Defines the base struct of the VM implementation."]
#[repr(C)]
#[derive(Debug, Copy, Clone, Hash, PartialEq)]
pub struct evmc_vm {
    #[doc = " EVMC ABI version implemented by the VM instance."]
    #[doc = ""]
    #[doc = " Can be used to detect ABI incompatibilities."]
    #[doc = " The EVMC ABI version represented by this file is in ::EVMC_ABI_VERSION."]
    pub abi_version: ::std::os::raw::c_int,
    #[doc = " The name of the EVMC VM implementation."]
    #[doc = ""]
    #[doc = " It MUST be a NULL-terminated not empty string."]
    #[doc = " The content MUST be UTF-8 encoded (this implies ASCII encoding is also allowed)."]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " The version of the EVMC VM implementation, e.g. \"1.2.3b4\"."]
    #[doc = ""]
    #[doc = " It MUST be a NULL-terminated not empty string."]
    #[doc = " The content MUST be UTF-8 encoded (this implies ASCII encoding is also allowed)."]
    pub version: *const ::std::os::raw::c_char,
    #[doc = " Pointer to function destroying the VM instance."]
    #[doc = ""]
    #[doc = " This is a mandatory method and MUST NOT be set to NULL."]
    pub destroy: evmc_destroy_fn,
    #[doc = " Pointer to function executing a code by the VM instance."]
    #[doc = ""]
    #[doc = " This is a mandatory method and MUST NOT be set to NULL."]
    pub execute: evmc_execute_fn,
    #[doc = " A method returning capabilities supported by the VM instance."]
    #[doc = ""]
    #[doc = " The value returned MAY change when different options are set via the set_option() method."]
    #[doc = ""]
    #[doc = " A Client SHOULD only rely on the value returned if it has queried it after"]
    #[doc = " it has called the set_option()."]
    #[doc = ""]
    #[doc = " This is a mandatory method and MUST NOT be set to NULL."]
    pub get_capabilities: evmc_get_capabilities_fn,
    #[doc = " Optional pointer to function modifying VM's options."]
    #[doc = ""]
    #[doc = "  If the VM does not support this feature the pointer can be NULL."]
    pub set_option: evmc_set_option_fn,
}
#[test]
fn bindgen_test_layout_evmc_vm() {
    assert_eq!(
        ::std::mem::size_of::<evmc_vm>(),
        56usize,
        concat!("Size of: ", stringify!(evmc_vm))
    );
    assert_eq!(
        ::std::mem::align_of::<evmc_vm>(),
        8usize,
        concat!("Alignment of ", stringify!(evmc_vm))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).abi_version as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(abi_version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).name as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).version as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(version)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).destroy as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(destroy)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).execute as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(execute)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).get_capabilities as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(get_capabilities)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<evmc_vm>())).set_option as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(evmc_vm),
            "::",
            stringify!(set_option)
        )
    );
}