trailofbits/manticore

research/consider matching solidity abi api

Open

#1.069 geöffnet am 22. Aug. 2018

Auf GitHub ansehen
 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (481 Forks)batch import
ethereumhelp wanted

Repository-Metriken

Stars
 (3.469 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#abi-encoding-and-decoding-functions

abi.decode(bytes encodedData, (...)) returns (...): ABI-decodes the given data, while the types are given in parentheses as second argument. Example: (uint a, uint[2] memory b, bytes memory c) = abi.decode(data, (uint, uint[2], bytes)) abi.encode(...) returns (bytes): ABI-encodes the given arguments abi.encodePacked(...) returns (bytes): Performs packed encoding of the given arguments abi.encodeWithSelector(bytes4 selector, ...) returns (bytes): ABI-encodes the given arguments starting from the second and prepends the given four-byte selector abi.encodeWithSignature(string signature, ...) returns (bytes): Equivalent to abi.encodeWithSelector(bytes4(keccak256(bytes(signature))), ...)`

Contributor Guide