smlxl / storage-layout-extractor

A tool that performs extraction of storage layouts based on EVM bytecode.
https://smlxl.io
GNU Affero General Public License v3.0
132 stars 11 forks source link

[BUG] Duplicate struct member offset (and unordered members) #103

Closed 2xic closed 1 year ago

2xic commented 1 year ago

Describe the Bug

When running RibbonThetaVault the struct at index 203 (0xcb) has the offset 16 show up multiple times and unordered

        StorageSlot {
            index: 203,
            offset: 0,
            typ: Mapping {
                key_type: Address,
                value_type: Struct {
                    elements: [
                        StructElement {
                            offset: 0,
                            typ: Any,
                        },
                        StructElement { // first appearance
                            offset: 16,
                            typ: Any,
                        },
                        StructElement {
                            offset: 104,
                            typ: Any,
                        },
                        StructElement { // second appearance
                            offset: 16,
                            typ: Bytes {
                                length: Some(
                                    16,
                                ),
                            },
                        },
                        StructElement {
                            offset: 144,
                            typ: Any,
                        },
                    ],
                },
            },
        },

To Reproduce

Run the contract

Bytecode

0x6080604052600436106104315760003560e01c80638b10cc7c11610229578063b6b55f251161012e578063e16fdbd5116100b6578063f6326fb31161007a578063f6326fb314610f0d578063f656ba5114610f15578063f756fa2114610f4a578063f957a06714610f5f578063fe56e23214610f7f57600080fd5b8063e16fdbd514610e82578063e73c63d514610ea2578063e74b981b14610eb8578063ea00b1ca14610ed8578063f2fde38b14610eed57600080fd5b8063d164cc15116100fd578063d164cc1514610db2578063d5f2638214610dd2578063db006a7514610de8578063db43e86214610e08578063dd62ed3e14610e3c57600080fd5b8063b6b55f2514610d3d578063b9f8092b14610d5d578063ce7c2ac214610d72578063d13f1b3e14610d9257600080fd5b8063a457c2d7116101b1578063aced166111610180578063aced166114610c9d578063ad5c464814610cbd578063ad7a672f14610cf1578063afa6626414610d06578063b4d1d79514610d2657600080fd5b8063a457c2d714610c27578063a497e67414610c47578063a6f7f5d614610c67578063a9059cbb14610c7d57600080fd5b80639be43daa116101f85780639be43daa14610ab85780639fcc2d7514610ad8578063a083ff1714610b84578063a285c9e814610be7578063a2db9d8314610c0957600080fd5b80638b10cc7c14610a525780638da5cb5b14610a7057806395d89b4114610a8e57806399530b0614610aa357600080fd5b8063469048401161033a5780636f31ab34116102c25780637e108d52116102865780637e108d52146109a557806383536ff3146109c557806387153eb1146109db5780638778878214610a0857806389a3027114610a1e57600080fd5b80636f31ab34146108c157806370897b23146108d657806370a08231146108f6578063715018a61461092c5780637a9262a21461094157600080fd5b8063650cce8a11610309578063650cce8a146107aa5780636719b2ee146107de57806369b41170146108625780636b64c769146108785780636c10f66c1461088d57600080fd5b8063469048401461073557806347786d371461075557806355489bb214610775578063600a2cfb1461079557600080fd5b8063313ce567116103bd5780633ec143d31161038c5780633ec143d3146106935780633f23bb73146106c15780633f90916a146106e1578063432833a6146106ff5780634603c0aa1461071557600080fd5b8063313ce5671461060b578063355274ea1461063557806336efd16f14610653578063395093511461067357600080fd5b80631a92f6c2116104045780631a92f6c2146104ca57806323b872dd146105165780632728f333146105365780632775d01c146105c957806330630da4146105eb57600080fd5b806306fdde0314610436578063095ea7b3146104615780630cbf54c81461049157806318160ddd146104b5575b600080fd5b34801561044257600080fd5b5061044b610f9f565b6040516104589190615005565b60405180910390f35b34801561046d57600080fd5b5061048161047c366004614d96565b611031565b6040519015158152602001610458565b34801561049d57600080fd5b506104a760fb5481565b604051908152602001610458565b3480156104c157600080fd5b506099546104a7565b3480156104d657600080fd5b506104fe7f0000000000000000000000004ccc2339f87f6c59c6893e1a678c2266ca58dc7281565b6040516001600160a01b039091168152602001610458565b34801561052257600080fd5b50610481610531366004614d56565b611048565b34801561054257600080fd5b5060cf5460d0546105849161ffff8116916001600160681b03620100008304811692600160781b900416906001600160801b0380821691600160801b90041685565b6040805161ffff90961686526001600160681b03948516602087015293909216928401929092526001600160801b03918216606084015216608082015260a001610458565b3480156105d557600080fd5b506105e96105e4366004614e42565b6110f9565b005b3480156105f757600080fd5b506105e9610606366004614c03565b61129c565b34801561061757600080fd5b5060cc54610100900460ff1660405160ff9091168152602001610458565b34801561064157600080fd5b5060ce546001600160681b03166104a7565b34801561065f57600080fd5b506105e961066e366004614e72565b611334565b34801561067f57600080fd5b5061048161068e366004614d96565b6113bc565b34801561069f57600080fd5b5060f9546106ae9061ffff1681565b60405161ffff9091168152602001610458565b3480156106cd57600080fd5b506104a76106dc366004614c03565b6113f8565b3480156106ed57600080fd5b5060d0546001600160801b03166104a7565b34801561070b57600080fd5b506104a760fc5481565b34801561072157600080fd5b506105e9610730366004614c03565b61144b565b34801561074157600080fd5b5060d3546104fe906001600160a01b031681565b34801561076157600080fd5b506105e9610770366004614e42565b6114ed565b34801561078157600080fd5b506105e9610790366004614e1b565b611582565b3480156107a157600080fd5b506105e9611643565b3480156107b657600080fd5b506104fe7f0000000000000000000000005934807cc0654d46755ebd2848840b616256c6ef81565b3480156107ea57600080fd5b506108316107f9366004614c03565b60c96020526000908152604090205461ffff8116906201000081046001600160681b031690600160781b90046001600160801b031683565b6040805161ffff90941684526001600160681b0390921660208401526001600160801b031690820152606001610458565b34801561086e57600080fd5b506104a7610e1081565b34801561088457600080fd5b506105e9611853565b34801561089957600080fd5b506104fe7f0000000000000000000000000b7ffc1f4ad541a4ed16b40d8c37f0929158d10181565b3480156108cd57600080fd5b506105e96118b3565b3480156108e257600080fd5b506105e96108f1366004614e42565b6118ea565b34801561090257600080fd5b506104a7610911366004614c03565b6001600160a01b031660009081526097602052604090205490565b34801561093857600080fd5b506105e96119b1565b34801561094d57600080fd5b5061098361095c366004614c03565b60cb6020526000908152604090205461ffff8116906201000090046001600160801b031682565b6040805161ffff90931683526001600160801b03909116602083015201610458565b3480156109b157600080fd5b506105e96109c0366004614e42565b6119e7565b3480156109d157600080fd5b506104a760f75481565b3480156109e757600080fd5b506104a76109f6366004614e42565b60ca6020526000908152604090205481565b348015610a1457600080fd5b506104a760d55481565b348015610a2a57600080fd5b506104fe7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b348015610a5e57600080fd5b5060d2546001600160a01b03166104fe565b348015610a7c57600080fd5b506065546001600160a01b03166104fe565b348015610a9a57600080fd5b5061044b611c22565b348015610aaf57600080fd5b506104a7611c31565b348015610ac457600080fd5b506105e9610ad3366004614e42565b611c6b565b348015610ae457600080fd5b5060cc5460cd5460ce54610b349260ff808216936101008304909116926001600160a01b036201000090930483169282169166ffffffffffffff600160a01b90910416906001600160681b031686565b60408051961515875260ff90951660208701526001600160a01b03938416948601949094529116606084015266ffffffffffffff1660808301526001600160681b031660a082015260c001610458565b348015610b9057600080fd5b5060d15460d254610bbb916001600160a01b039081169190811690600160a01b900463ffffffff1683565b604080516001600160a01b03948516815293909216602084015263ffffffff1690820152606001610458565b348015610bf357600080fd5b5060d254600160a01b900463ffffffff166104a7565b348015610c1557600080fd5b5060d1546001600160a01b03166104fe565b348015610c3357600080fd5b50610481610c42366004614d96565b611d9f565b348015610c5357600080fd5b506105e9610c62366004614e42565b611e38565b348015610c7357600080fd5b506104a760d65481565b348015610c8957600080fd5b50610481610c98366004614d96565b611ef5565b348015610ca957600080fd5b5060d4546104fe906001600160a01b031681565b348015610cc957600080fd5b506104fe7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b348015610cfd57600080fd5b506104a7611f02565b348015610d1257600080fd5b5060f5546104fe906001600160a01b031681565b348015610d3257600080fd5b506104a762093a8081565b348015610d4957600080fd5b506105e9610d58366004614e42565b611fa1565b348015610d6957600080fd5b506105e9612015565b348015610d7e57600080fd5b506104a7610d8d366004614c03565b6121cc565b348015610d9e57600080fd5b506105e9610dad366004614e42565b6121e9565b348015610dbe57600080fd5b506105e9610dcd366004614c03565b6122ad565b348015610dde57600080fd5b506104a760f85481565b348015610df457600080fd5b506105e9610e03366004614e42565b61233c565b348015610e1457600080fd5b506104fe7f0000000000000000000000007c06792af1632e77cb27a558dc0885338f4bdf8e81565b348015610e4857600080fd5b506104a7610e57366004614c1f565b6001600160a01b03918216600090815260986020908152604080832093909416825291909152205490565b348015610e8e57600080fd5b506105e9610e9d366004614c57565b6123a9565b348015610eae57600080fd5b506104a760fa5481565b348015610ec457600080fd5b506105e9610ed3366004614c03565b6125b5565b348015610ee457600080fd5b506105e96126a8565b348015610ef957600080fd5b506105e9610f08366004614c03565b612950565b6105e96129eb565b348015610f2157600080fd5b50610f35610f30366004614c03565b612b3c565b60408051928352602083019190915201610458565b348015610f5657600080fd5b506105e9612c1f565b348015610f6b57600080fd5b5060f6546104fe906001600160a01b031681565b348015610f8b57600080fd5b506105e9610f9a366004614e42565b612e04565b6060609a8054610fae90615299565b80601f0160208091040260200160405190810160405280929190818152602001828054610fda90615299565b80156110275780601f10610ffc57610100808354040283529160200191611027565b820191906000526020600020905b81548152906001019060200180831161100a57829003601f168201915b5050505050905090565b600061103e338484612ea4565b5060015b92915050565b6000611055848484612fc9565b6001600160a01b0384166000908152609860209081526040808320338452909152902054828110156110df5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6110ec8533858403612ea4565b60019150505b9392505050565b6002600154141561111c5760405162461bcd60e51b81526004016110d6906150dd565b600260015533600090815260c96020526040902060cf5461ffff16826111545760405162461bcd60e51b81526004016110d6906150bc565b815461ffff1681146111985760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c9bdd5b99609a1b60448201526064016110d6565b81546201000090046001600160681b0316838110156111e95760405162461bcd60e51b815260206004820152600d60248201526c115e18d9595908185b5bdd5b9d609a1b60448201526064016110d6565b6111f38185613199565b83546001600160681b0391909116620100000262010000600160781b031990911617835560d05461122d906001600160801b031685613199565b60d080546001600160801b0319166001600160801b0392909216919091179055604080518581526020810184905233917fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96910160405180910390a261129233856131a5565b5050600180555050565b6065546001600160a01b031633146112c65760405162461bcd60e51b81526004016110d690615087565b6001600160a01b0381166113125760405162461bcd60e51b815260206004820152601360248201527210b732bba9ba3934b5b2a9b2b632b1ba34b7b760691b60448201526064016110d6565b60f680546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156113575760405162461bcd60e51b81526004016110d6906150dd565b6002600155816113795760405162461bcd60e51b81526004016110d6906150bc565b6001600160a01b03811661138c57600080fd5b611396828261330b565b60cc546113b4906201000090046001600160a01b031633308561359d565b505060018055565b3360008181526098602090815260408083206001600160a01b0387168452909152812054909161103e9185906113f3908690615114565b612ea4565b60cc5460009060ff610100909104168161142e61141460995490565b61141c611f02565b60d0546001600160801b031685613608565b905061144361143c856121cc565b8284613648565b949350505050565b6065546001600160a01b031633146114755760405162461bcd60e51b81526004016110d690615087565b6001600160a01b0381166114cb5760405162461bcd60e51b815260206004820152601860248201527f216e65774f7074696f6e735072656d69756d507269636572000000000000000060448201526064016110d6565b60f580546001600160a01b0319166001600160a01b0392909216919091179055565b6065546001600160a01b031633146115175760405162461bcd60e51b81526004016110d690615087565b600081116115515760405162461bcd60e51b81526020600482015260076024820152660216e65774361760cc1b60448201526064016110d6565b61155a816136aa565b60ce80546cffffffffffffffffffffffffff19166001600160681b0392909216919091179055565b6065546001600160a01b031633146115ac5760405162461bcd60e51b81526004016110d690615087565b600260015414156115cf5760405162461bcd60e51b81526004016110d6906150dd565b60026001556001600160801b0381166116195760405162461bcd60e51b815260206004820152600c60248201526b21737472696b65507269636560a01b60448201526064016110d6565b6001600160801b031660fa5560cf5460f9805461ffff191661ffff90921691909117905560018055565b60d4546001600160a01b0316331461166d5760405162461bcd60e51b81526004016110d690615018565b600260015414156116905760405162461bcd60e51b81526004016110d6906150dd565b600260015560d2546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b1580156116d957600080fd5b505afa1580156116ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117119190614e5a565b90506000811161174e5760405162461bcd60e51b8152602060048201526008602482015267216f746f6b656e7360c01b60448201526064016110d6565b60405163f60c4fc760e01b81526001600160a01b037f0000000000000000000000004ccc2339f87f6c59c6893e1a678c2266ca58dc721660048201526024810182905260009073e248f69df96b0d397e8b81a592da8766b857d6c79063f60c4fc79060440160206040518083038186803b1580156117cb57600080fd5b505af41580156117df573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118039190614e5a565b60cf54909150611822906201000090046001600160681b031682613199565b60cf80546001600160681b0392909216620100000262010000600160781b0319909216919091179055505060018055565b60d4546001600160a01b0316331461187d5760405162461bcd60e51b81526004016110d690615018565b600260015414156118a05760405162461bcd60e51b81526004016110d6906150dd565b60026001556118ad6136f4565b60018055565b600260015414156118d65760405162461bcd60e51b81526004016110d6906150dd565b60026001819055506118ad6000600161388f565b6065546001600160a01b031633146119145760405162461bcd60e51b81526004016110d690615087565b611922620f42406064615237565b81106119705760405162461bcd60e51b815260206004820152601760248201527f496e76616c696420706572666f726d616e63652066656500000000000000000060448201526064016110d6565b60d55460408051918252602082018390527f24867dfb6fcb9970a07be21024956524abe7a1837faa903ff0e99aaa40cf893e910160405180910390a160d555565b6065546001600160a01b031633146119db5760405162461bcd60e51b81526004016110d690615087565b6119e56000613a60565b565b60026001541415611a0a5760405162461bcd60e51b81526004016110d6906150dd565b600260015580611a495760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b60448201526064016110d6565b33600090815260c960205260409020546201000090046001600160681b0316151580611a93575033600090815260c96020526040902054600160781b90046001600160801b031615155b15611aa457611aa46000600161388f565b60cf5433600081815260cb60209081526040918290208054835187815261ffff96871693810184905292959194911685149290917f0c53c82ad07e2d592d88ece3b066777dd60f1118e2a081b380efc4358f0d9e2a910160405180910390a281546201000090046001600160801b031660008215611b2d57611b268287613ab2565b9050611b90565b8115611b6f5760405162461bcd60e51b81526020600482015260116024820152704578697374696e6720776974686472617760781b60448201526064016110d6565b5033600090815260cb60205260409020805461ffff191661ffff8616179055845b611b9981613abe565b33600090815260cb6020526040812080546001600160801b03808516620100000262010000600160901b03199092169190911790915560d054611be591600160801b9091041688613ab2565b9050611bf081613abe565b60d080546001600160801b03808416600160801b029116179055611c15333089612fc9565b5050600180555050505050565b6060609b8054610fae90615299565b6000611c66611c3f60995490565b611c47611f02565b60d05460cc546001600160801b0390911690610100900460ff16613608565b905090565b60026001541415611c8e5760405162461bcd60e51b81526004016110d6906150dd565b600260015580611ccd5760405162461bcd60e51b815260206004820152600a602482015269216e756d526f756e647360b01b60448201526064016110d6565b60cf5461ffff1660005b82811015611d96576000611ceb8284615114565b905082811015611d285760405162461bcd60e51b81526020600482015260086024820152674f766572666c6f7760c01b60448201526064016110d6565b600081815260ca602052604090205415611d725760405162461bcd60e51b815260206004820152600b60248201526a125b9a5d1a585b1a5e995960aa1b60448201526064016110d6565b600090815260ca602052604090206001905580611d8e816152ce565b915050611cd7565b50506001805550565b3360009081526098602090815260408083206001600160a01b038616845290915281205482811015611e215760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016110d6565b611e2e3385858403612ea4565b5060019392505050565b6065546001600160a01b03163314611e625760405162461bcd60e51b81526004016110d690615087565b610e10811015611eb45760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642061756374696f6e206475726174696f6e000000000000000060448201526064016110d6565b60fb5460408051918252602082018390527f5acd982e2240ed224a69aa03dab039d3797c108e4b5f288cd7dd6ca181b275f3910160405180910390a160fb55565b600061103e338484612fc9565b60cc546040516370a0823160e01b8152306004820152600091611c6691620100009091046001600160a01b0316906370a082319060240160206040518083038186803b158015611f5157600080fd5b505afa158015611f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f899190614e5a565b60cf546201000090046001600160681b031690613ab2565b60026001541415611fc45760405162461bcd60e51b81526004016110d6906150dd565b600260015580611fe65760405162461bcd60e51b81526004016110d6906150bc565b611ff0813361330b565b60cc5461200e906201000090046001600160a01b031633308461359d565b5060018055565b60d4546001600160a01b0316331461203f5760405162461bcd60e51b81526004016110d690615018565b600260015414156120625760405162461bcd60e51b81526004016110d6906150dd565b6002600155600080612072613b08565b9150915061207f816136aa565b60cf805462010000600160781b031916620100006001600160681b0384160217905560405181815233906001600160a01b038416907f045c558fdce4714c5816d53820d27420f4cd860892df203fe636384d8d19aa019060200160405180910390a3604051632904c23960e01b81526001600160a01b037f0000000000000000000000004ccc2339f87f6c59c6893e1a678c2266ca58dc72811660048301527f0000000000000000000000005934807cc0654d46755ebd2848840b616256c6ef81166024830152831660448201526064810182905273e248f69df96b0d397e8b81a592da8766b857d6c790632904c2399060840160206040518083038186803b15801561218b57600080fd5b505af415801561219f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c39190614e5a565b506113b46136f4565b60008060006121da84612b3c565b90925090506114438282613ab2565b6065546001600160a01b031633146122135760405162461bcd60e51b81526004016110d690615087565b60008111801561222d575061222a600a6064615237565b81105b61226c5760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a5908191a5cd8dbdd5b9d60821b60448201526064016110d6565b60f75460408051918252602082018390527f4cd657fde404967d63a338fb06c5c98751a9df57dfae6dc333a432faf8a5f656910160405180910390a160f755565b6065546001600160a01b031633146122d75760405162461bcd60e51b81526004016110d690615087565b6001600160a01b03811661231a5760405162461bcd60e51b815260206004820152600a60248201526910b732bba5b2b2b832b960b11b60448201526064016110d6565b60d480546001600160a01b0319166001600160a01b0392909216919091179055565b6002600154141561235f5760405162461bcd60e51b81526004016110d6906150dd565b60026001558061239e5760405162461bcd60e51b815260206004820152600a602482015269216e756d53686172657360b01b60448201526064016110d6565b61200e81600061388f565b600054610100900460ff16806123c2575060005460ff16155b6123de5760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff16158015612400576000805461ffff19166101011790555b6124108d8d8d8d8d8d8d89613d1a565b6001600160a01b03861661245f5760405162461bcd60e51b815260206004820152601660248201527510afb7b83a34b7b739a83932b6b4bab6a83934b1b2b960511b60448201526064016110d6565b6001600160a01b0385166124a95760405162461bcd60e51b815260206004820152601160248201527010afb9ba3934b5b2a9b2b632b1ba34b7b760791b60448201526064016110d6565b60008463ffffffff161180156124cf57506124c6600a6064615237565b8463ffffffff16105b61250f5760405162461bcd60e51b81526020600482015260116024820152700857dc1c995b5a5d5b511a5cd8dbdd5b9d607a1b60448201526064016110d6565b610e108310156125555760405162461bcd60e51b815260206004820152601160248201527010afb0bab1ba34b7b7223ab930ba34b7b760791b60448201526064016110d6565b60f580546001600160a01b038089166001600160a01b03199283161790925560f680549288169290911691909117905563ffffffff841660f75560fb83905580156125a6576000805461ff00191690555b50505050505050505050505050565b6065546001600160a01b031633146125df5760405162461bcd60e51b81526004016110d690615087565b6001600160a01b0381166126285760405162461bcd60e51b815260206004820152601060248201526f085b995dd19959549958da5c1a595b9d60821b60448201526064016110d6565b60d3546001600160a01b03828116911614156126865760405162461bcd60e51b815260206004820152601860248201527f4d757374206265206e657720666565526563697069656e74000000000000000060448201526064016110d6565b60d380546001600160a01b0319166001600160a01b0392909216919091179055565b600260015414156126cb5760405162461bcd60e51b81526004016110d6906150dd565b600260015560d2546040805160c0810182526001600160a01b037f0000000000000000000000007c06792af1632e77cb27a558dc0885338f4bdf8e811682527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48811660208301908152938116828401818152610e106060850190815260f95461ffff9081166080870190815260fa5460a0880190815260f65460f55460f7549a516334d0abdd60e21b815291891660048301528816602482015260448101999099528751871660648a0152985186166084890152925190941660a48701525160c48601525190911660e4840152925161010483015260cc61012483015260cf6101448301529060009081908190819073e248f69df96b0d397e8b81a592da8766b857d6c79063d342af74906101640160806040518083038186803b15801561281257600080fd5b505af4158015612826573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284a9190614dc1565b93509350935093507fa217999b1c125c2a996f712c5f26a28addad7167bd8a67d5bd5b2a751148abb0828260405161288c929190918252602082015260400190565b60405180910390a161289d836136aa565b6001600160681b03831660f85560d180546001600160a01b0319166001600160a01b03861617905560006128d342610e10613ab2565b905063ffffffff8111156129295760405162461bcd60e51b815260206004820152601860248201527f4f766572666c6f77206e6578744f7074696f6e5265616479000000000000000060448201526064016110d6565b60d2805463ffffffff60a01b1916600160a01b63ffffffff841602179055611c1587613f59565b6065546001600160a01b0316331461297a5760405162461bcd60e51b81526004016110d690615087565b6001600160a01b0381166129df5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016110d6565b6129e881613a60565b50565b60026001541415612a0e5760405162461bcd60e51b81526004016110d6906150dd565b600260015560cc547f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03908116620100009092041614612a7f5760405162461bcd60e51b8152602060048201526005602482015264042ae8aa8960db1b60448201526064016110d6565b60003411612ab85760405162461bcd60e51b81526020600482015260066024820152652176616c756560d01b60448201526064016110d6565b612ac2343361330b565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612b1d57600080fd5b505af1158015612b31573d6000803e3d6000fd5b505060018055505050565b6001600160a01b038116600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031694830194909452600160781b90046001600160801b031691810191909152829160011115612bbe575050506001600160a01b031660009081526097602052604081205491565b60cf54815161ffff908116600090815260ca602052604081205460cc549193612bf493869391169190610100900460ff166140ac565b9050612c15856001600160a01b031660009081526097602052604090205490565b9590945092505050565b60026001541415612c425760405162461bcd60e51b81526004016110d6906150dd565b600260015533600090815260cb6020526040902080546001600160801b03620100008204169061ffff1681612ca95760405162461bcd60e51b815260206004820152600d60248201526c139bdd081a5b9a5d1a585d1959609a1b60448201526064016110d6565b60cf5461ffff168110612cf15760405162461bcd60e51b815260206004820152601060248201526f149bdd5b99081b9bdd0818db1bdcd95960821b60448201526064016110d6565b33600090815260cb60205260409020805462010000600160901b031916905560d054612d2d90600160801b90046001600160801b031683613199565b60d080546001600160801b03928316600160801b029216919091179055600081815260ca602052604081205460cc54612d7091859160ff61010090910416613648565b604080518281526020810186905291925033917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568910160405180910390a2612db8308461411d565b60008111612dfa5760405162461bcd60e51b815260206004820152600f60248201526e085dda5d1a191c985dd05b5bdd5b9d608a1b60448201526064016110d6565b61129233826131a5565b6065546001600160a01b03163314612e2e5760405162461bcd60e51b81526004016110d690615087565b612e3c620f42406064615237565b8110612e835760405162461bcd60e51b8152602060048201526016602482015275496e76616c6964206d616e6167656d656e742066656560501b60448201526064016110d6565b612e9e63031ba309612e9883620f424061426b565b90614277565b60d65550565b6001600160a01b038316612f065760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016110d6565b6001600160a01b038216612f675760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016110d6565b6001600160a01b0383811660008181526098602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b03831661302d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016110d6565b6001600160a01b03821661308f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016110d6565b6001600160a01b038316600090815260976020526040902054818110156131075760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016110d6565b6001600160a01b0380851660009081526097602052604080822085850390559185168152908120805484929061313e908490615114565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161318a91815260200190565b60405180910390a35b50505050565b60006110f28284615256565b60cc546001600160a01b03620100009091048116907f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168114156132f257604051632e1a7d4d60e01b8152600481018390527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561324557600080fd5b505af1158015613259573d6000803e3d6000fd5b505050506000836001600160a01b03168360405160006040518083038185875af1925050503d80600081146132aa576040519150601f19603f3d011682016040523d82523d6000602084013e6132af565b606091505b50509050806131935760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b60448201526064016110d6565b6133066001600160a01b0382168484614283565b505050565b60cf5461ffff16600061332684613320611f02565b90613ab2565b60ce549091506001600160681b03168111156133715760405162461bcd60e51b815260206004820152600a6024820152690457863656564206361760b41b60448201526064016110d6565b60cd54600160a01b900466ffffffffffffff168110156133ca5760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b60448201526064016110d6565b60408051858152602081018490526001600160a01b038516917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15910160405180910390a26001600160a01b038316600090815260c9602090815260408083208151606081018352905461ffff81168083526201000082046001600160681b031683860152600160781b9091046001600160801b031682840152845260ca90925282205460cc54919291613489918491879190610100900460ff166140ac565b8251909150869061ffff168514156134ba5760208301516000906134b6906001600160681b031689613ab2565b9150505b6134c3816136aa565b6040805160608101825261ffff80881682526001600160681b0380851660208085019182526001600160801b038089168688019081526001600160a01b038e16600090815260c990935296822095518654935197518216600160781b02600160781b600160f81b03199890951662010000026effffffffffffffffffffffffffffff1990941695169490941791909117949094161790915560d054613569911689613ab2565b905061357481613abe565b60d080546001600160801b0319166001600160801b039290921691909117905550505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526131939085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526142b3565b60008061361683600a61518f565b905060008611613626578061363e565b61363e86612e986136378888613199565b849061426b565b9695505050505050565b6000600183116136925760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b60448201526064016110d6565b6114436136a083600a61518f565b612e98868661426b565b6001600160681b038111156129e85760405162461bcd60e51b815260206004820152601060248201526f13dd995c999b1bddc81d5a5b9d0c4c0d60821b60448201526064016110d6565b6040805160c081018252600080825260208201819052918101829052606081018290526080810182905260a081019190915260f8548061376e5760405162461bcd60e51b81526020600482015260156024820152742163757272656e744f746f6b656e5072656d69756d60581b60448201526064016110d6565b60d2546001600160a01b0390811683527f0000000000000000000000000b7ffc1f4ad541a4ed16b40d8c37f0929158d10181166020840190815260cc546201000081048316604080870191825261010090920460ff16606087019081526080870186815260fb5460a089019081529351633baf17fd60e21b8152885187166004820152945186166024860152915190941660448401529251606483015291516084820152905160a482015273e248f69df96b0d397e8b81a592da8766b857d6c79063eebc5ff49060c40160206040518083038186803b15801561385057600080fd5b505af4158015613864573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138889190614e5a565b60fc555050565b33600090815260c9602090815260408083208151606081018352905461ffff8082168084526201000083046001600160681b031684870152600160781b9092046001600160801b03168385015260cf5491865260ca9094529184205460cc549194929093169261390a9185918591610100900460ff166140ac565b9050836139175784613919565b805b945084613927575050505050565b8085111561396b5760405162461bcd60e51b81526020600482015260116024820152704578636565647320617661696c61626c6560781b60448201526064016110d6565b825161ffff168211613981578260200151613984565b60005b33600090815260c96020526040902080546001600160681b0392909216620100000262010000600160781b03199092169190911790556139c385613abe565b6139cd8186613199565b33600081815260c960205260409081902080546001600160801b0394909416600160781b02600160781b600160f81b0319909416939093179092558451915190917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a92991613a469189825261ffff16602082015260400190565b60405180910390a2613a59303387612fc9565b5050505050565b606580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006110f28284615114565b6001600160801b038111156129e85760405162461bcd60e51b815260206004820152601060248201526f09eeccae4ccd8deee40ead2dce86264760831b60448201526064016110d6565b60d2546000908190600160a01b900463ffffffff16421015613b555760405162461bcd60e51b815260206004820152600660248201526521726561647960d01b60448201526064016110d6565b60d1546001600160a01b0316915081613b9e5760405162461bcd60e51b815260206004820152600b60248201526a10b732bc3a27b83a34b7b760a91b60448201526064016110d6565b600080600073e248f69df96b0d397e8b81a592da8766b857d6c763d7975f15613bc660995490565b60cc5460d05460405160e085901b6001600160e01b031916815260048101939093526201000082046001600160a01b0316602484015261010090910460ff1660448301526001600160801b038082166064840152600160801b90910416608482015260a40160606040518083038186803b158015613c4357600080fd5b505af4158015613c57573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c7b9190614e96565b60d280546001600160a01b038a166001600160a01b03199182161790915560d18054909116905560cf5461ffff16600081815260ca602052604090208390559295509093509150613cd5613cce85614385565b8590613199565b60d080546001600160801b03191690559450613cf2816001615114565b60cf805461ffff191661ffff92909216919091179055613d1230836144b9565b505050509091565b600054610100900460ff1680613d33575060005460ff16155b613d4f5760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff16158015613d71576000805461ffff19166101011790555b60405163c72733f760e01b815273e248f69df96b0d397e8b81a592da8766b857d6c79063c72733f790613db6908c908c908c908b908d908c908c908c90600401614f0b565b60006040518083038186803b158015613dce57600080fd5b505af4158015613de2573d6000803e3d6000fd5b50505050613dee614598565b613df8848461460b565b613e0061468a565b613e0989612950565b60d480546001600160a01b03808b166001600160a01b03199283161790925560d38054928a169290911691909117905560d5859055613e5363031ba309612e9888620f424061426b565b60d6558160cc613e63828261533c565b505060cc546040516370a0823160e01b81523060048201526000916201000090046001600160a01b0316906370a082319060240160206040518083038186803b158015613eaf57600080fd5b505afa158015613ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613ee79190614e5a565b9050613ef2816136aa565b60cf805461ffff196001600160681b03909316600160781b02929092167fffffffff00000000000000000000000000ffffffffffffffffffffffffff00009092169190911760011790558015613f4e576000805461ff00191690555b505050505050505050565b60d280546001600160a01b031916905560cf805462010000600160e01b03198116620100009091046001600160681b0316600160781b810262010000600160781b031916919091179091556001600160a01b038216156140a857604051636c6fe87f60e11b81526001600160a01b037f0000000000000000000000004ccc2339f87f6c59c6893e1a678c2266ca58dc7216600482015260009073e248f69df96b0d397e8b81a592da8766b857d6c79063d8dfd0fe9060240160206040518083038186803b15801561402957600080fd5b505af415801561403d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906140619190614e5a565b9050336001600160a01b0316836001600160a01b03167f7e830f7c1771deb1bdb35c4a7e6051bbac32b376f7f4e4976b8618b0b11997f783604051612fbc91815260200190565b5050565b835160009061ffff16158015906140c75750845161ffff1684115b156141095760006140e686602001516001600160681b031685856146f1565b6040870151909150614101906001600160801b031682613ab2565b915050611443565b50505050604001516001600160801b031690565b6001600160a01b03821661417d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016110d6565b6001600160a01b038216600090815260976020526040902054818110156141f15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016110d6565b6001600160a01b0383166000908152609760205260408120838303905560998054849290614220908490615256565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60006110f28284615237565b60006110f2828461512c565b6040516001600160a01b03831660248201526044810182905261330690849063a9059cbb60e01b906064016135d1565b6000614308826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166147549092919063ffffffff16565b80519091501561330657808060200190518101906143269190614dff565b6133065760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016110d6565b60cf5460d054600091600160781b90046001600160681b03169082906143b59085906001600160801b0316613199565b90506000808383111561443e57600060d554116143d35760006143fb565b6143fb6143e4620f42406064615237565b60d554612e98906143f58789613199565b9061426b565b905060008060d6541161440f57600061442e565b61442e614420620f42406064615237565b60d654612e98908a9061426b565b905061443a8282613ab2565b9250505b81156144b05760d35461445a906001600160a01b0316836131a5565b60d35460cf54604080518481526020810186905261ffff90921682820152516001600160a01b03909216917f0a242f7ecaf711036ca770774ceffae28e60ef042ac113ddd187f2631db0c0069181900360600190a25b50949350505050565b6001600160a01b03821661450f5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016110d6565b80609960008282546145219190615114565b90915550506001600160a01b0382166000908152609760205260408120805483929061454e908490615114565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600054610100900460ff16806145b1575060005460ff16155b6145cd5760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff161580156145ef576000805461ffff19166101011790555b6145f7614763565b80156129e8576000805461ff001916905550565b600054610100900460ff1680614624575060005460ff16155b6146405760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff16158015614662576000805461ffff19166101011790555b61466a6147d2565b614674838361483c565b8015613306576000805461ff0019169055505050565b600054610100900460ff16806146a3575060005460ff16155b6146bf5760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff161580156146e1576000805461ffff19166101011790555b6146e96147d2565b6145f76148d1565b60006001831161473b5760405162461bcd60e51b8152602060048201526015602482015274496e76616c6964206173736574506572536861726560581b60448201526064016110d6565b61144383612e9861474d85600a61518f565b879061426b565b60606114438484600085614931565b600054610100900460ff168061477c575060005460ff16155b6147985760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff161580156147ba576000805461ffff19166101011790555b6001805580156129e8576000805461ff001916905550565b600054610100900460ff16806147eb575060005460ff16155b6148075760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff161580156145f7576000805461ffff191661010117905580156129e8576000805461ff001916905550565b600054610100900460ff1680614855575060005460ff16155b6148715760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff16158015614893576000805461ffff19166101011790555b82516148a690609a906020860190614a92565b5081516148ba90609b906020850190614a92565b508015613306576000805461ff0019169055505050565b600054610100900460ff16806148ea575060005460ff16155b6149065760405162461bcd60e51b81526004016110d690615039565b600054610100900460ff16158015614928576000805461ffff19166101011790555b6145f733613a60565b6060824710156149925760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016110d6565b843b6149e05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016110d6565b600080866001600160a01b031685876040516149fc9190614eef565b60006040518083038185875af1925050503d8060008114614a39576040519150601f19603f3d011682016040523d82523d6000602084013e614a3e565b606091505b5091509150614a4e828286614a59565b979650505050505050565b60608315614a685750816110f2565b825115614a785782518084602001fd5b8160405162461bcd60e51b81526004016110d69190615005565b828054614a9e90615299565b90600052602060002090601f016020900481019282614ac05760008555614b06565b82601f10614ad957805160ff1916838001178555614b06565b82800160010185558215614b06579182015b82811115614b06578251825591602001919060010190614aeb565b50614b12929150614b16565b5090565b5b80821115614b125760008155600101614b17565b8035614b368161544d565b919050565b600082601f830112614b4b578081fd5b813567ffffffffffffffff80821115614b6657614b666152ff565b604051601f8301601f19908116603f01168101908282118183101715614b8e57614b8e6152ff565b81604052838152866020858801011115614ba6578485fd5b8360208701602083013792830160200193909352509392505050565b600060c08284031215614bd3578081fd5b50919050565b8035614b3681615470565b803563ffffffff81168114614b3657600080fd5b8035614b3681615485565b600060208284031215614c14578081fd5b81356110f28161544d565b60008060408385031215614c31578081fd5b8235614c3c8161544d565b91506020830135614c4c8161544d565b809150509250929050565b6000806000806000806000806000806000806102208d8f031215614c79578788fd5b614c828d614b2b565b9b50614c9060208e01614b2b565b9a50614c9e60408e01614b2b565b995060608d0135985060808d0135975067ffffffffffffffff60a08e01351115614cc6578687fd5b614cd68e60a08f01358f01614b3b565b965067ffffffffffffffff60c08e01351115614cf0578586fd5b614d008e60c08f01358f01614b3b565b9550614d0e60e08e01614b2b565b9450614d1d6101008e01614b2b565b9350614d2c6101208e01614be4565b92506101408d01359150614d448e6101608f01614bc2565b90509295989b509295989b509295989b565b600080600060608486031215614d6a578283fd5b8335614d758161544d565b92506020840135614d858161544d565b929592945050506040919091013590565b60008060408385031215614da8578182fd5b8235614db38161544d565b946020939093013593505050565b60008060008060808587031215614dd6578384fd5b8451614de18161544d565b60208601516040870151606090970151919890975090945092505050565b600060208284031215614e10578081fd5b81516110f281615462565b600060208284031215614e2c578081fd5b81356001600160801b03811681146110f2578182fd5b600060208284031215614e53578081fd5b5035919050565b600060208284031215614e6b578081fd5b5051919050565b60008060408385031215614e84578182fd5b823591506020830135614c4c8161544d565b600080600060608486031215614eaa578081fd5b8351925060208401519150604084015190509250925092565b60008151808452614edb81602086016020860161526d565b601f01601f19169290920160200192915050565b60008251614f0181846020870161526d565b9190910192915050565b60006101a060018060a01b03808c168452808b166020850152808a1660408501528860608501528760808501528160a0850152614f4a82850188614ec3565b915083820360c0850152614f5e8287614ec3565b925084359150614f6d82615462565b90151560e0840152602084013590614f848261549a565b60ff821661010085015260408501359150614f9e8261544d565b16610120830152614fb160608401614b2b565b6001600160a01b0316610140830152614fcc60808401614bf8565b66ffffffffffffff16610160830152614fe760a08401614bd9565b6001600160681b038116610180840152509998505050505050505050565b6020815260006110f26020830184614ec3565b60208082526007908201526610b5b2b2b832b960c91b604082015260600190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526007908201526608585b5bdd5b9d60ca1b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115615127576151276152e9565b500190565b60008261514757634e487b7160e01b81526012600452602481fd5b500490565b600181815b8085111561518757816000190482111561516d5761516d6152e9565b8085161561517a57918102915b93841c9390800290615151565b509250929050565b60006110f283836000826151a557506001611042565b816151b257506000611042565b81600181146151c857600281146151d2576151ee565b6001915050611042565b60ff8411156151e3576151e36152e9565b50506001821b611042565b5060208310610133831016604e8410600b8410161715615211575081810a611042565b61521b838361514c565b806000190482111561522f5761522f6152e9565b029392505050565b6000816000190483118215151615615251576152516152e9565b500290565b600082821015615268576152686152e9565b500390565b60005b83811015615288578181015183820152602001615270565b838111156131935750506000910152565b600181811c908216806152ad57607f821691505b60208210811415614bd357634e487b7160e01b600052602260045260246000fd5b60006000198214156152e2576152e26152e9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600081356110428161544d565b6000813561104281615470565b6000813561104281615485565b813561534781615462565b815460ff19811691151560ff16918217835560208401356153678161549a565b61ff008160081b169050808361ffff19841617178455604085013561538b8161544d565b6001600160b01b0319929092169092179190911760109190911b62010000600160b01b0316178155600181016153e36153c660608501615315565b82546001600160a01b0319166001600160a01b0391909116178255565b61541c6153f26080850161532f565b82805466ffffffffffffff60a01b191660a09290921b66ffffffffffffff60a01b16919091179055565b506140a861542c60a08401615322565b600283016001600160681b0382166001600160681b03198254161781555050565b6001600160a01b03811681146129e857600080fd5b80151581146129e857600080fd5b6001600160681b03811681146129e857600080fd5b66ffffffffffffff811681146129e857600080fd5b60ff811681146129e857600080fdfea26469706673582212203dec1ad85ffc67ac9044d1b850ca6fc58789f18e749164f6d8d2f8e872f9928664736f6c63430008040033

Expected Behaviour

Offset 16 should only show up ones (and in order)

iamrecursion commented 1 year ago

Duplicate of #94. Please post the repro in that thread.