diff options
author | chriseth <chris@ethereum.org> | 2018-10-04 20:55:02 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-10-12 21:15:01 +0800 |
commit | 6daeb39ecc7ffd0e834e63f6495442c4211c5c1c (patch) | |
tree | 670349dc15db2f9be5210f4ad2c99a386c079168 /libevmasm/LinkerObject.h | |
parent | 5f5dc8956d39ab19c5408aa4c39a3cd10d3a2dec (diff) | |
download | dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.gz dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.tar.zst dexon-solidity-6daeb39ecc7ffd0e834e63f6495442c4211c5c1c.zip |
Use hash for library placeholders.
Diffstat (limited to 'libevmasm/LinkerObject.h')
-rw-r--r-- | libevmasm/LinkerObject.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libevmasm/LinkerObject.h b/libevmasm/LinkerObject.h index 152487b4..92890803 100644 --- a/libevmasm/LinkerObject.h +++ b/libevmasm/LinkerObject.h @@ -50,6 +50,11 @@ struct LinkerObject /// addresses by placeholders. std::string toHex() const; + /// @returns a 36 character string that is used as a placeholder for the library + /// address (enclosed by `__` on both sides). The placeholder is the hex representation + /// of the first 18 bytes of the keccak-256 hash of @a _libraryName. + static std::string libraryPlaceholder(std::string const& _libraryName); + private: static h160 const* matchLibrary( std::string const& _linkRefName, |