smartcontract-codes / play-ed

embeddable solidity editor
https://smartcontract-codes.github.io/play-ed/
MIT License
4 stars 2 forks source link

Input validation for multibyte is off #22

Open gpersoon opened 5 years ago

gpersoon commented 5 years ago

When you have an input field of bytes4, like in the following function:

pragma solidity ^0.5.0;
contract TestInput {  
      function Test(bytes4 x) external view returns(bytes4) {
         return x;
    }  
}

And then you enter "0x12", the input validator shows √ which indicates the input is ok. However when you press the arrow icon nothing happens: image

Only when you enter 8 digits, like "0x12345678" you can use the arrow and the function is called.

serapath commented 5 years ago

interesting, that's weird. I'm actually quite surprised that bytes4 shows up like that. Again something, that @ninabreznik would know a bit better and also what are the plans regarding this :-)

But good catch. thx :-)

alincode commented 5 years ago

@ninabreznik fixed at solidity-validator 0.5.0