Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ABI: 'byte' as an alias to 'bytes1' #60

Closed
axic opened this issue Jan 21, 2016 · 5 comments
Closed

ABI: 'byte' as an alias to 'bytes1' #60

axic opened this issue Jan 21, 2016 · 5 comments

Comments

@axic
Copy link
Member

axic commented Jan 21, 2016

Latest Solidity has now an alias from byte to bytes1 ( https://solidity.readthedocs.org/en/latest/types.html ).

It would make sense including this alias in the ABI too, similarly how int and uint are an alias to int256 and uint256, respectively.

It seems logical and there are some demands for having it available too.

@VoR0220
Copy link
Member

VoR0220 commented Jan 25, 2016

I support this.

@chriseth
Copy link
Contributor

chriseth commented Feb 2, 2016

uint does not exist as far as the ABI is concerned, it only knows about uint256.

@axic
Copy link
Member Author

axic commented Feb 2, 2016

@chriseth it is an alias (e.g. uint is rewritten to uint256 before using in the ABI hashing):

uint, int: synonyms for uint256, int256 respectively (not to be used for computing the function selector).

@chriseth
Copy link
Contributor

chriseth commented Feb 3, 2016

Perhaps we should clarify what we mean when we say ABI. For me this is the way to encode and decode abstract mathematical objects (numbers, strings, ...) to sequences of bytes for use in contracts and a way to address a function of a contract given its name and type. The type of a function is again an abstract mathematical object. Both uint and uint256 are string representations of the 256-bit unsigned integer type, where the latter is its canonical representation, which has to be used when computing the hash of a named function type for means of addressing the function.

@axic
Copy link
Member Author

axic commented Mar 1, 2019

Closing this as it seems to be well outdated.

@axic axic closed this as completed Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants