Consensys / mythril

Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Rootstock, Tron and other EVM-compatible blockchains.
https://mythx.io/
MIT License
3.88k stars 741 forks source link

Strange exception found #1378

Closed pedrotbtl closed 3 years ago

pedrotbtl commented 4 years ago

Description

When I analyse the following contract, Mythril finds an assertion violation that does not seem to be correct. Is that correct?

RoomThermostat.sol is as follows.

pragma solidity >=0.4.25 <0.5.16;

contract RoomThermostat
{
    //Set of States
    enum StateType { Created, InUse}

    //List of properties
    StateType State;
    address Installer;
    address User;
    int TargetTemperature;
    enum ModeEnum {Off, Cool, Heat, Auto}
    ModeEnum  Mode;

    constructor(address thermostatInstaller, address thermostatUser) public
    {
        Installer = thermostatInstaller;
        User = thermostatUser;
        TargetTemperature = 70;

       assert(State == StateType.Created);
    }

    function StartThermostat() public
    {
        if (Installer != msg.sender || State != StateType.Created)
        {
            revert();
        }

       assert(State == StateType.Created);

        State = StateType.InUse;

       assert(State == StateType.InUse);
    }

    function SetTargetTemperature(int targetTemperature) public
    {
        if (User != msg.sender || State != StateType.InUse)
        {
            revert();
        }

       assert(State == StateType.InUse);

        TargetTemperature = targetTemperature;

       assert(State == StateType.InUse);
    }

    function SetMode(ModeEnum mode) public
    {
        if (User != msg.sender || State != StateType.InUse)
        {
            revert();
        }
       assert(State == StateType.InUse);

        Mode = mode;

       assert(State == StateType.InUse);
    }
}

How to Reproduce

I am using solc 0.5.10.

Run the following command: myth analyze --modules Exceptions RoomThermostat.sol

For example:

==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: RoomThermostat
Function name: SetMode(uint8)
PC address: 895
Estimated Gas Usage: 3824 - 5239
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: /RoomThermostat.sol:64

}

--------------------
Initial State:

Account: [CREATOR], balance: 0x10002, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x0, nonce:0, storage:{}
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}

Transaction Sequence:

Caller: [CREATOR], calldata: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaadeadbeefdeadbeefdeadbeefdeadbeefdeadbeefaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, value: 0x0
Caller: [SOMEGUY], function: StartThermostat(), txdata: 0x2279f6a5, value: 0x0
Caller: [ATTACKER], function: SetMode(uint8), txdata: 0xb554a6215454545454545454545454545454545454545454545454545454545454545404, value: 0x0

Expected behavior

The analysis was completed successfully. No issues were detected.

Environment

Mythril version v0.22.4 solc 0.5.10

norhh commented 4 years ago

Its probably something to do with solc versions, can you try a different version. try using something like myth a file_name --solv 0.5.2

pedrotbtl commented 4 years ago

Thanks for the quick reply.

I tried running myth analyze --modules Exceptions RoomThermostat.sol with SOLC env variable pointed to solc 0.5.2 (https://github.com/ethereum/solidity/releases/download/v0.5.2/solc-static-linux) and mythril 0.22.1 now and mythril still finds this assertion violation.

norhh commented 4 years ago

can you try v0.22.4?

pedrotbtl commented 4 years ago

Just tried with v0.22.4 and solc 0.5.2 and still got the same output.

pedrotbtl commented 4 years ago

@norhh Are you able to reproduce this output? Is there some assumption/behaviour of Mythril that I am missing?

norhh commented 4 years ago

Using docker, now I am able to reproduce it 👍

pedrotbtl commented 4 years ago

Can you confirm whether this is a bug of Mythril or whether I am just missing some detail on how Mythril works?

norhh commented 4 years ago

For some reason I didn't get the exact error. Can you try it out with a docker container.Something like this docker run -v $(pwd):/home mythril/myth-dev a /home/thermo -m Exceptions --solv 0.5.1

pedrotbtl commented 4 years ago

Got this:

==== Exception State ====
SWC ID: 110
Severity: Medium
Contract: RoomThermostat
Function name: SetMode(uint8)
PC address: 960
Estimated Gas Usage: 3835 - 5250
An assertion violation was triggered.
It is possible to trigger an assertion violation. Note that Solidity assert() statements should only be used to check invariants. Review the transaction trace generated for this issue and either make sure your program logic is correct, or use require() instead of assert() if your goal is to constrain user inputs or enforce preconditions. Remember to validate inputs from both callers (for instance, via passed arguments) and callees (for instance, via return values).
--------------------
In file: /RoomThermostat.sol:64

}

--------------------
Initial State:

Account: [CREATOR], balance: 0x21c10c00020fbfbe, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x2000, nonce:0, storage:{}
Account: [SOMEGUY], balance: 0x0, nonce:0, storage:{}

Transaction Sequence:

Caller: [CREATOR], calldata: a5a5a5a5a5a5a5a5a5a5a5a5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa5a5a5a5a5a5a5a5a5a5a5a5deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, value: 0x0
Caller: [SOMEGUY], function: StartThermostat(), txdata: 0x2279f6a5, value: 0x0
Caller: [ATTACKER], function: SetMode(uint8), txdata: 0xb554a621aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa04, value: 0x0
norhh commented 4 years ago

Are you sure it's the same file as the one mentioned at the start of the post? As there is no assert at PC 960 for the mentioned file so it might be slightly different.

pedrotbtl commented 4 years ago

I copied the exact thing in the example and got the same error again. I am attaching here the file I used (had to rename .txt because github doesn't seem to allow .sol).

thermostat.txt

norhh commented 4 years ago

For some reason it still shows me the same output, Can you send me the output of disassembly. run myth d file.sol

pedrotbtl commented 4 years ago

Here it is:

Runtime Disassembly: 0 PUSH1 0x80 2 PUSH1 0x40 4 MSTORE 5 PUSH1 0x04 7 CALLDATASIZE 8 LT 9 PUSH2 0x0051 12 JUMPI 13 PUSH1 0x00 15 CALLDATALOAD 16 PUSH29 0x0100000000000000000000000000000000000000000000000000000000 46 SWAP1 47 DIV 48 DUP1 49 PUSH4 0x2279f6a5 54 EQ 55 PUSH2 0x0056 58 JUMPI 59 DUP1 60 PUSH4 0x4a542ae2 65 EQ 66 PUSH2 0x006d 69 JUMPI 70 DUP1 71 PUSH4 0xb554a621 76 EQ 77 PUSH2 0x00a8 80 JUMPI 81 JUMPDEST 82 PUSH1 0x00 84 DUP1 85 REVERT 86 JUMPDEST 87 CALLVALUE 88 DUP1 89 ISZERO 90 PUSH2 0x0062 93 JUMPI 94 PUSH1 0x00 96 DUP1 97 REVERT 98 JUMPDEST 99 POP 100 PUSH2 0x006b 103 PUSH2 0x00e6 106 JUMP 107 JUMPDEST 108 STOP 109 JUMPDEST 110 CALLVALUE 111 DUP1 112 ISZERO 113 PUSH2 0x0079 116 JUMPI 117 PUSH1 0x00 119 DUP1 120 REVERT 121 JUMPDEST 122 POP 123 PUSH2 0x00a6 126 PUSH1 0x04 128 DUP1 129 CALLDATASIZE 130 SUB 131 PUSH1 0x20 133 DUP2 134 LT 135 ISZERO 136 PUSH2 0x0090 139 JUMPI 140 PUSH1 0x00 142 DUP1 143 REVERT 144 JUMPDEST 145 DUP2 146 ADD 147 SWAP1 148 DUP1 149 DUP1 150 CALLDATALOAD 151 SWAP1 152 PUSH1 0x20 154 ADD 155 SWAP1 156 SWAP3 157 SWAP2 158 SWAP1 159 POP 160 POP 161 POP 162 PUSH2 0x01f6 165 JUMP 166 JUMPDEST 167 STOP 168 JUMPDEST 169 CALLVALUE 170 DUP1 171 ISZERO 172 PUSH2 0x00b4 175 JUMPI 176 PUSH1 0x00 178 DUP1 179 REVERT 180 JUMPDEST 181 POP 182 PUSH2 0x00e4 185 PUSH1 0x04 187 DUP1 188 CALLDATASIZE 189 SUB 190 PUSH1 0x20 192 DUP2 193 LT 194 ISZERO 195 PUSH2 0x00cb 198 JUMPI 199 PUSH1 0x00 201 DUP1 202 REVERT 203 JUMPDEST 204 DUP2 205 ADD 206 SWAP1 207 DUP1 208 DUP1 209 CALLDATALOAD 210 PUSH1 0xff 212 AND 213 SWAP1 214 PUSH1 0x20 216 ADD 217 SWAP1 218 SWAP3 219 SWAP2 220 SWAP1 221 POP 222 POP 223 POP 224 PUSH2 0x02e9 227 JUMP 228 JUMPDEST 229 STOP 230 JUMPDEST 231 CALLER 232 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 253 AND 254 PUSH1 0x00 256 PUSH1 0x01 258 SWAP1 259 SLOAD 260 SWAP1 261 PUSH2 0x0100 264 EXP 265 SWAP1 266 DIV 267 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 288 AND 289 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 310 AND 311 EQ 312 ISZERO 313 DUP1 314 PUSH2 0x0168 317 JUMPI 318 POP 319 PUSH1 0x00 321 PUSH1 0x01 323 DUP2 324 GT 325 ISZERO 326 PUSH2 0x014b 329 JUMPI 330 ASSERT_FAIL 331 JUMPDEST 332 PUSH1 0x00 334 DUP1 335 SWAP1 336 SLOAD 337 SWAP1 338 PUSH2 0x0100 341 EXP 342 SWAP1 343 DIV 344 PUSH1 0xff 346 AND 347 PUSH1 0x01 349 DUP2 350 GT 351 ISZERO 352 PUSH2 0x0165 355 JUMPI 356 ASSERT_FAIL 357 JUMPDEST 358 EQ 359 ISZERO 360 JUMPDEST 361 ISZERO 362 PUSH2 0x0172 365 JUMPI 366 PUSH1 0x00 368 DUP1 369 REVERT 370 JUMPDEST 371 PUSH1 0x00 373 PUSH1 0x01 375 DUP2 376 GT 377 ISZERO 378 PUSH2 0x017f 381 JUMPI 382 ASSERT_FAIL 383 JUMPDEST 384 PUSH1 0x00 386 DUP1 387 SWAP1 388 SLOAD 389 SWAP1 390 PUSH2 0x0100 393 EXP 394 SWAP1 395 DIV 396 PUSH1 0xff 398 AND 399 PUSH1 0x01 401 DUP2 402 GT 403 ISZERO 404 PUSH2 0x0199 407 JUMPI 408 ASSERT_FAIL 409 JUMPDEST 410 EQ 411 ISZERO 412 ISZERO 413 PUSH2 0x01a2 416 JUMPI 417 ASSERT_FAIL 418 JUMPDEST 419 PUSH1 0x01 421 PUSH1 0x00 423 DUP1 424 PUSH2 0x0100 427 EXP 428 DUP2 429 SLOAD 430 DUP2 431 PUSH1 0xff 433 MUL 434 NOT 435 AND 436 SWAP1 437 DUP4 438 PUSH1 0x01 440 DUP2 441 GT 442 ISZERO 443 PUSH2 0x01c0 446 JUMPI 447 ASSERT_FAIL 448 JUMPDEST 449 MUL 450 OR 451 SWAP1 452 SSTORE 453 POP 454 PUSH1 0x01 456 DUP1 457 DUP2 458 GT 459 ISZERO 460 PUSH2 0x01d1 463 JUMPI 464 ASSERT_FAIL 465 JUMPDEST 466 PUSH1 0x00 468 DUP1 469 SWAP1 470 SLOAD 471 SWAP1 472 PUSH2 0x0100 475 EXP 476 SWAP1 477 DIV 478 PUSH1 0xff 480 AND 481 PUSH1 0x01 483 DUP2 484 GT 485 ISZERO 486 PUSH2 0x01eb 489 JUMPI 490 ASSERT_FAIL 491 JUMPDEST 492 EQ 493 ISZERO 494 ISZERO 495 PUSH2 0x01f4 498 JUMPI 499 ASSERT_FAIL 500 JUMPDEST 501 JUMP 502 JUMPDEST 503 CALLER 504 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 525 AND 526 PUSH1 0x01 528 PUSH1 0x00 530 SWAP1 531 SLOAD 532 SWAP1 533 PUSH2 0x0100 536 EXP 537 SWAP1 538 DIV 539 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 560 AND 561 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 582 AND 583 EQ 584 ISZERO 585 DUP1 586 PUSH2 0x0277 589 JUMPI 590 POP 591 PUSH1 0x01 593 DUP1 594 DUP2 595 GT 596 ISZERO 597 PUSH2 0x025a 600 JUMPI 601 ASSERT_FAIL 602 JUMPDEST 603 PUSH1 0x00 605 DUP1 606 SWAP1 607 SLOAD 608 SWAP1 609 PUSH2 0x0100 612 EXP 613 SWAP1 614 DIV 615 PUSH1 0xff 617 AND 618 PUSH1 0x01 620 DUP2 621 GT 622 ISZERO 623 PUSH2 0x0274 626 JUMPI 627 ASSERT_FAIL 628 JUMPDEST 629 EQ 630 ISZERO 631 JUMPDEST 632 ISZERO 633 PUSH2 0x0281 636 JUMPI 637 PUSH1 0x00 639 DUP1 640 REVERT 641 JUMPDEST 642 PUSH1 0x01 644 DUP1 645 DUP2 646 GT 647 ISZERO 648 PUSH2 0x028d 651 JUMPI 652 ASSERT_FAIL 653 JUMPDEST 654 PUSH1 0x00 656 DUP1 657 SWAP1 658 SLOAD 659 SWAP1 660 PUSH2 0x0100 663 EXP 664 SWAP1 665 DIV 666 PUSH1 0xff 668 AND 669 PUSH1 0x01 671 DUP2 672 GT 673 ISZERO 674 PUSH2 0x02a7 677 JUMPI 678 ASSERT_FAIL 679 JUMPDEST 680 EQ 681 ISZERO 682 ISZERO 683 PUSH2 0x02b0 686 JUMPI 687 ASSERT_FAIL 688 JUMPDEST 689 DUP1 690 PUSH1 0x02 692 DUP2 693 SWAP1 694 SSTORE 695 POP 696 PUSH1 0x01 698 DUP1 699 DUP2 700 GT 701 ISZERO 702 PUSH2 0x02c3 705 JUMPI 706 ASSERT_FAIL 707 JUMPDEST 708 PUSH1 0x00 710 DUP1 711 SWAP1 712 SLOAD 713 SWAP1 714 PUSH2 0x0100 717 EXP 718 SWAP1 719 DIV 720 PUSH1 0xff 722 AND 723 PUSH1 0x01 725 DUP2 726 GT 727 ISZERO 728 PUSH2 0x02dd 731 JUMPI 732 ASSERT_FAIL 733 JUMPDEST 734 EQ 735 ISZERO 736 ISZERO 737 PUSH2 0x02e6 740 JUMPI 741 ASSERT_FAIL 742 JUMPDEST 743 POP 744 JUMP 745 JUMPDEST 746 CALLER 747 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 768 AND 769 PUSH1 0x01 771 PUSH1 0x00 773 SWAP1 774 SLOAD 775 SWAP1 776 PUSH2 0x0100 779 EXP 780 SWAP1 781 DIV 782 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 803 AND 804 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 825 AND 826 EQ 827 ISZERO 828 DUP1 829 PUSH2 0x036a 832 JUMPI 833 POP 834 PUSH1 0x01 836 DUP1 837 DUP2 838 GT 839 ISZERO 840 PUSH2 0x034d 843 JUMPI 844 ASSERT_FAIL 845 JUMPDEST 846 PUSH1 0x00 848 DUP1 849 SWAP1 850 SLOAD 851 SWAP1 852 PUSH2 0x0100 855 EXP 856 SWAP1 857 DIV 858 PUSH1 0xff 860 AND 861 PUSH1 0x01 863 DUP2 864 GT 865 ISZERO 866 PUSH2 0x0367 869 JUMPI 870 ASSERT_FAIL 871 JUMPDEST 872 EQ 873 ISZERO 874 JUMPDEST 875 ISZERO 876 PUSH2 0x0374 879 JUMPI 880 PUSH1 0x00 882 DUP1 883 REVERT 884 JUMPDEST 885 PUSH1 0x01 887 DUP1 888 DUP2 889 GT 890 ISZERO 891 PUSH2 0x0380 894 JUMPI 895 ASSERT_FAIL 896 JUMPDEST 897 PUSH1 0x00 899 DUP1 900 SWAP1 901 SLOAD 902 SWAP1 903 PUSH2 0x0100 906 EXP 907 SWAP1 908 DIV 909 PUSH1 0xff 911 AND 912 PUSH1 0x01 914 DUP2 915 GT 916 ISZERO 917 PUSH2 0x039a 920 JUMPI 921 ASSERT_FAIL 922 JUMPDEST 923 EQ 924 ISZERO 925 ISZERO 926 PUSH2 0x03a3 929 JUMPI 930 ASSERT_FAIL 931 JUMPDEST 932 DUP1 933 PUSH1 0x03 935 PUSH1 0x00 937 PUSH2 0x0100 940 EXP 941 DUP2 942 SLOAD 943 DUP2 944 PUSH1 0xff 946 MUL 947 NOT 948 AND 949 SWAP1 950 DUP4 951 PUSH1 0x03 953 DUP2 954 GT 955 ISZERO 956 PUSH2 0x03c1 959 JUMPI 960 ASSERT_FAIL 961 JUMPDEST 962 MUL 963 OR 964 SWAP1 965 SSTORE 966 POP 967 PUSH1 0x01 969 DUP1 970 DUP2 971 GT 972 ISZERO 973 PUSH2 0x03d2 976 JUMPI 977 ASSERT_FAIL 978 JUMPDEST 979 PUSH1 0x00 981 DUP1 982 SWAP1 983 SLOAD 984 SWAP1 985 PUSH2 0x0100 988 EXP 989 SWAP1 990 DIV 991 PUSH1 0xff 993 AND 994 PUSH1 0x01 996 DUP2 997 GT 998 ISZERO 999 PUSH2 0x03ec 1002 JUMPI 1003 ASSERT_FAIL 1004 JUMPDEST 1005 EQ 1006 ISZERO 1007 ISZERO 1008 PUSH2 0x03f5 1011 JUMPI 1012 ASSERT_FAIL 1013 JUMPDEST 1014 POP 1015 JUMP 1016 ASSERT_FAIL

Disassembly: 0 PUSH1 0x80 2 PUSH1 0x40 4 MSTORE 5 CALLVALUE 6 DUP1 7 ISZERO 8 PUSH2 0x0010 11 JUMPI 12 PUSH1 0x00 14 DUP1 15 REVERT 16 JUMPDEST 17 POP 18 PUSH1 0x40 20 MLOAD 21 PUSH1 0x40 23 DUP1 24 PUSH2 0x053a 27 DUP4 28 CODECOPY 29 DUP2 30 ADD 31 DUP1 32 PUSH1 0x40 34 MSTORE 35 PUSH1 0x40 37 DUP2 38 LT 39 ISZERO 40 PUSH2 0x0030 43 JUMPI 44 PUSH1 0x00 46 DUP1 47 REVERT 48 JUMPDEST 49 DUP2 50 ADD 51 SWAP1 52 DUP1 53 DUP1 54 MLOAD 55 SWAP1 56 PUSH1 0x20 58 ADD 59 SWAP1 60 SWAP3 61 SWAP2 62 SWAP1 63 DUP1 64 MLOAD 65 SWAP1 66 PUSH1 0x20 68 ADD 69 SWAP1 70 SWAP3 71 SWAP2 72 SWAP1 73 POP 74 POP 75 POP 76 DUP2 77 PUSH1 0x00 79 PUSH1 0x01 81 PUSH2 0x0100 84 EXP 85 DUP2 86 SLOAD 87 DUP2 88 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 109 MUL 110 NOT 111 AND 112 SWAP1 113 DUP4 114 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 135 AND 136 MUL 137 OR 138 SWAP1 139 SSTORE 140 POP 141 DUP1 142 PUSH1 0x01 144 PUSH1 0x00 146 PUSH2 0x0100 149 EXP 150 DUP2 151 SLOAD 152 DUP2 153 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 174 MUL 175 NOT 176 AND 177 SWAP1 178 DUP4 179 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 200 AND 201 MUL 202 OR 203 SWAP1 204 SSTORE 205 POP 206 PUSH1 0x46 208 PUSH1 0x02 210 DUP2 211 SWAP1 212 SSTORE 213 POP 214 PUSH1 0x00 216 PUSH1 0x01 218 DUP2 219 GT 220 ISZERO 221 PUSH2 0x00e2 224 JUMPI 225 ASSERT_FAIL 226 JUMPDEST 227 PUSH1 0x00 229 DUP1 230 SWAP1 231 SLOAD 232 SWAP1 233 PUSH2 0x0100 236 EXP 237 SWAP1 238 DIV 239 PUSH1 0xff 241 AND 242 PUSH1 0x01 244 DUP2 245 GT 246 ISZERO 247 PUSH2 0x00fc 250 JUMPI 251 ASSERT_FAIL 252 JUMPDEST 253 EQ 254 ISZERO 255 ISZERO 256 PUSH2 0x0105 259 JUMPI 260 ASSERT_FAIL 261 JUMPDEST 262 POP 263 POP 264 PUSH2 0x0424 267 DUP1 268 PUSH2 0x0116 271 PUSH1 0x00 273 CODECOPY 274 PUSH1 0x00 276 RETURN 277 ASSERT_FAIL 278 PUSH1 0x80 280 PUSH1 0x40 282 MSTORE 283 PUSH1 0x04 285 CALLDATASIZE 286 LT 287 PUSH2 0x0051 290 JUMPI 291 PUSH1 0x00 293 CALLDATALOAD 294 PUSH29 0x0100000000000000000000000000000000000000000000000000000000 324 SWAP1 325 DIV 326 DUP1 327 PUSH4 0x2279f6a5 332 EQ 333 PUSH2 0x0056 336 JUMPI 337 DUP1 338 PUSH4 0x4a542ae2 343 EQ 344 PUSH2 0x006d 347 JUMPI 348 DUP1 349 PUSH4 0xb554a621 354 EQ 355 PUSH2 0x00a8 358 JUMPI 359 JUMPDEST 360 PUSH1 0x00 362 DUP1 363 REVERT 364 JUMPDEST 365 CALLVALUE 366 DUP1 367 ISZERO 368 PUSH2 0x0062 371 JUMPI 372 PUSH1 0x00 374 DUP1 375 REVERT 376 JUMPDEST 377 POP 378 PUSH2 0x006b 381 PUSH2 0x00e6 384 JUMP 385 JUMPDEST 386 STOP 387 JUMPDEST 388 CALLVALUE 389 DUP1 390 ISZERO 391 PUSH2 0x0079 394 JUMPI 395 PUSH1 0x00 397 DUP1 398 REVERT 399 JUMPDEST 400 POP 401 PUSH2 0x00a6 404 PUSH1 0x04 406 DUP1 407 CALLDATASIZE 408 SUB 409 PUSH1 0x20 411 DUP2 412 LT 413 ISZERO 414 PUSH2 0x0090 417 JUMPI 418 PUSH1 0x00 420 DUP1 421 REVERT 422 JUMPDEST 423 DUP2 424 ADD 425 SWAP1 426 DUP1 427 DUP1 428 CALLDATALOAD 429 SWAP1 430 PUSH1 0x20 432 ADD 433 SWAP1 434 SWAP3 435 SWAP2 436 SWAP1 437 POP 438 POP 439 POP 440 PUSH2 0x01f6 443 JUMP 444 JUMPDEST 445 STOP 446 JUMPDEST 447 CALLVALUE 448 DUP1 449 ISZERO 450 PUSH2 0x00b4 453 JUMPI 454 PUSH1 0x00 456 DUP1 457 REVERT 458 JUMPDEST 459 POP 460 PUSH2 0x00e4 463 PUSH1 0x04 465 DUP1 466 CALLDATASIZE 467 SUB 468 PUSH1 0x20 470 DUP2 471 LT 472 ISZERO 473 PUSH2 0x00cb 476 JUMPI 477 PUSH1 0x00 479 DUP1 480 REVERT 481 JUMPDEST 482 DUP2 483 ADD 484 SWAP1 485 DUP1 486 DUP1 487 CALLDATALOAD 488 PUSH1 0xff 490 AND 491 SWAP1 492 PUSH1 0x20 494 ADD 495 SWAP1 496 SWAP3 497 SWAP2 498 SWAP1 499 POP 500 POP 501 POP 502 PUSH2 0x02e9 505 JUMP 506 JUMPDEST 507 STOP 508 JUMPDEST 509 CALLER 510 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 531 AND 532 PUSH1 0x00 534 PUSH1 0x01 536 SWAP1 537 SLOAD 538 SWAP1 539 PUSH2 0x0100 542 EXP 543 SWAP1 544 DIV 545 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 566 AND 567 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 588 AND 589 EQ 590 ISZERO 591 DUP1 592 PUSH2 0x0168 595 JUMPI 596 POP 597 PUSH1 0x00 599 PUSH1 0x01 601 DUP2 602 GT 603 ISZERO 604 PUSH2 0x014b 607 JUMPI 608 ASSERT_FAIL 609 JUMPDEST 610 PUSH1 0x00 612 DUP1 613 SWAP1 614 SLOAD 615 SWAP1 616 PUSH2 0x0100 619 EXP 620 SWAP1 621 DIV 622 PUSH1 0xff 624 AND 625 PUSH1 0x01 627 DUP2 628 GT 629 ISZERO 630 PUSH2 0x0165 633 JUMPI 634 ASSERT_FAIL 635 JUMPDEST 636 EQ 637 ISZERO 638 JUMPDEST 639 ISZERO 640 PUSH2 0x0172 643 JUMPI 644 PUSH1 0x00 646 DUP1 647 REVERT 648 JUMPDEST 649 PUSH1 0x00 651 PUSH1 0x01 653 DUP2 654 GT 655 ISZERO 656 PUSH2 0x017f 659 JUMPI 660 ASSERT_FAIL 661 JUMPDEST 662 PUSH1 0x00 664 DUP1 665 SWAP1 666 SLOAD 667 SWAP1 668 PUSH2 0x0100 671 EXP 672 SWAP1 673 DIV 674 PUSH1 0xff 676 AND 677 PUSH1 0x01 679 DUP2 680 GT 681 ISZERO 682 PUSH2 0x0199 685 JUMPI 686 ASSERT_FAIL 687 JUMPDEST 688 EQ 689 ISZERO 690 ISZERO 691 PUSH2 0x01a2 694 JUMPI 695 ASSERT_FAIL 696 JUMPDEST 697 PUSH1 0x01 699 PUSH1 0x00 701 DUP1 702 PUSH2 0x0100 705 EXP 706 DUP2 707 SLOAD 708 DUP2 709 PUSH1 0xff 711 MUL 712 NOT 713 AND 714 SWAP1 715 DUP4 716 PUSH1 0x01 718 DUP2 719 GT 720 ISZERO 721 PUSH2 0x01c0 724 JUMPI 725 ASSERT_FAIL 726 JUMPDEST 727 MUL 728 OR 729 SWAP1 730 SSTORE 731 POP 732 PUSH1 0x01 734 DUP1 735 DUP2 736 GT 737 ISZERO 738 PUSH2 0x01d1 741 JUMPI 742 ASSERT_FAIL 743 JUMPDEST 744 PUSH1 0x00 746 DUP1 747 SWAP1 748 SLOAD 749 SWAP1 750 PUSH2 0x0100 753 EXP 754 SWAP1 755 DIV 756 PUSH1 0xff 758 AND 759 PUSH1 0x01 761 DUP2 762 GT 763 ISZERO 764 PUSH2 0x01eb 767 JUMPI 768 ASSERT_FAIL 769 JUMPDEST 770 EQ 771 ISZERO 772 ISZERO 773 PUSH2 0x01f4 776 JUMPI 777 ASSERT_FAIL 778 JUMPDEST 779 JUMP 780 JUMPDEST 781 CALLER 782 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 803 AND 804 PUSH1 0x01 806 PUSH1 0x00 808 SWAP1 809 SLOAD 810 SWAP1 811 PUSH2 0x0100 814 EXP 815 SWAP1 816 DIV 817 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 838 AND 839 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 860 AND 861 EQ 862 ISZERO 863 DUP1 864 PUSH2 0x0277 867 JUMPI 868 POP 869 PUSH1 0x01 871 DUP1 872 DUP2 873 GT 874 ISZERO 875 PUSH2 0x025a 878 JUMPI 879 ASSERT_FAIL 880 JUMPDEST 881 PUSH1 0x00 883 DUP1 884 SWAP1 885 SLOAD 886 SWAP1 887 PUSH2 0x0100 890 EXP 891 SWAP1 892 DIV 893 PUSH1 0xff 895 AND 896 PUSH1 0x01 898 DUP2 899 GT 900 ISZERO 901 PUSH2 0x0274 904 JUMPI 905 ASSERT_FAIL 906 JUMPDEST 907 EQ 908 ISZERO 909 JUMPDEST 910 ISZERO 911 PUSH2 0x0281 914 JUMPI 915 PUSH1 0x00 917 DUP1 918 REVERT 919 JUMPDEST 920 PUSH1 0x01 922 DUP1 923 DUP2 924 GT 925 ISZERO 926 PUSH2 0x028d 929 JUMPI 930 ASSERT_FAIL 931 JUMPDEST 932 PUSH1 0x00 934 DUP1 935 SWAP1 936 SLOAD 937 SWAP1 938 PUSH2 0x0100 941 EXP 942 SWAP1 943 DIV 944 PUSH1 0xff 946 AND 947 PUSH1 0x01 949 DUP2 950 GT 951 ISZERO 952 PUSH2 0x02a7 955 JUMPI 956 ASSERT_FAIL 957 JUMPDEST 958 EQ 959 ISZERO 960 ISZERO 961 PUSH2 0x02b0 964 JUMPI 965 ASSERT_FAIL 966 JUMPDEST 967 DUP1 968 PUSH1 0x02 970 DUP2 971 SWAP1 972 SSTORE 973 POP 974 PUSH1 0x01 976 DUP1 977 DUP2 978 GT 979 ISZERO 980 PUSH2 0x02c3 983 JUMPI 984 ASSERT_FAIL 985 JUMPDEST 986 PUSH1 0x00 988 DUP1 989 SWAP1 990 SLOAD 991 SWAP1 992 PUSH2 0x0100 995 EXP 996 SWAP1 997 DIV 998 PUSH1 0xff 1000 AND 1001 PUSH1 0x01 1003 DUP2 1004 GT 1005 ISZERO 1006 PUSH2 0x02dd 1009 JUMPI 1010 ASSERT_FAIL 1011 JUMPDEST 1012 EQ 1013 ISZERO 1014 ISZERO 1015 PUSH2 0x02e6 1018 JUMPI 1019 ASSERT_FAIL 1020 JUMPDEST 1021 POP 1022 JUMP 1023 JUMPDEST 1024 CALLER 1025 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 1046 AND 1047 PUSH1 0x01 1049 PUSH1 0x00 1051 SWAP1 1052 SLOAD 1053 SWAP1 1054 PUSH2 0x0100 1057 EXP 1058 SWAP1 1059 DIV 1060 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 1081 AND 1082 PUSH20 0xffffffffffffffffffffffffffffffffffffffff 1103 AND 1104 EQ 1105 ISZERO 1106 DUP1 1107 PUSH2 0x036a 1110 JUMPI 1111 POP 1112 PUSH1 0x01 1114 DUP1 1115 DUP2 1116 GT 1117 ISZERO 1118 PUSH2 0x034d 1121 JUMPI 1122 ASSERT_FAIL 1123 JUMPDEST 1124 PUSH1 0x00 1126 DUP1 1127 SWAP1 1128 SLOAD 1129 SWAP1 1130 PUSH2 0x0100 1133 EXP 1134 SWAP1 1135 DIV 1136 PUSH1 0xff 1138 AND 1139 PUSH1 0x01 1141 DUP2 1142 GT 1143 ISZERO 1144 PUSH2 0x0367 1147 JUMPI 1148 ASSERT_FAIL 1149 JUMPDEST 1150 EQ 1151 ISZERO 1152 JUMPDEST 1153 ISZERO 1154 PUSH2 0x0374 1157 JUMPI 1158 PUSH1 0x00 1160 DUP1 1161 REVERT 1162 JUMPDEST 1163 PUSH1 0x01 1165 DUP1 1166 DUP2 1167 GT 1168 ISZERO 1169 PUSH2 0x0380 1172 JUMPI 1173 ASSERT_FAIL 1174 JUMPDEST 1175 PUSH1 0x00 1177 DUP1 1178 SWAP1 1179 SLOAD 1180 SWAP1 1181 PUSH2 0x0100 1184 EXP 1185 SWAP1 1186 DIV 1187 PUSH1 0xff 1189 AND 1190 PUSH1 0x01 1192 DUP2 1193 GT 1194 ISZERO 1195 PUSH2 0x039a 1198 JUMPI 1199 ASSERT_FAIL 1200 JUMPDEST 1201 EQ 1202 ISZERO 1203 ISZERO 1204 PUSH2 0x03a3 1207 JUMPI 1208 ASSERT_FAIL 1209 JUMPDEST 1210 DUP1 1211 PUSH1 0x03 1213 PUSH1 0x00 1215 PUSH2 0x0100 1218 EXP 1219 DUP2 1220 SLOAD 1221 DUP2 1222 PUSH1 0xff 1224 MUL 1225 NOT 1226 AND 1227 SWAP1 1228 DUP4 1229 PUSH1 0x03 1231 DUP2 1232 GT 1233 ISZERO 1234 PUSH2 0x03c1 1237 JUMPI 1238 ASSERT_FAIL 1239 JUMPDEST 1240 MUL 1241 OR 1242 SWAP1 1243 SSTORE 1244 POP 1245 PUSH1 0x01 1247 DUP1 1248 DUP2 1249 GT 1250 ISZERO 1251 PUSH2 0x03d2 1254 JUMPI 1255 ASSERT_FAIL 1256 JUMPDEST 1257 PUSH1 0x00 1259 DUP1 1260 SWAP1 1261 SLOAD 1262 SWAP1 1263 PUSH2 0x0100 1266 EXP 1267 SWAP1 1268 DIV 1269 PUSH1 0xff 1271 AND 1272 PUSH1 0x01 1274 DUP2 1275 GT 1276 ISZERO 1277 PUSH2 0x03ec 1280 JUMPI 1281 ASSERT_FAIL 1282 JUMPDEST 1283 EQ 1284 ISZERO 1285 ISZERO 1286 PUSH2 0x03f5 1289 JUMPI 1290 ASSERT_FAIL 1291 JUMPDEST 1292 POP 1293 JUMP 1294 ASSERT_FAIL

norhh commented 3 years ago

This should be fixed now, If not feel free to reopen this.