mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
docs: Add information about metadata difference resulting from manual linking
This commit is contained in:
parent
aba04c7afa
commit
1ff00488bb
@ -196,10 +196,14 @@ manually by replacing all those 40 symbols by the hex
|
||||
encoding of the address of the library contract.
|
||||
|
||||
.. note::
|
||||
You should ask the compiler to link the libraries at the time
|
||||
a contract is compiled by either using
|
||||
the ``--libraries`` option of ``solc`` or the ``libraries`` key if you use
|
||||
the standard-JSON interface to the compiler.
|
||||
Manually linking libraries on the generated bytecode is discouraged because it does not update
|
||||
contract metadata. Since metadata contains a list of libraries specified at the time of
|
||||
compilation and bytecode contains a metadata hash, you will get different binaries, depending
|
||||
on when linking is performed.
|
||||
|
||||
You should ask the compiler to link the libraries at the time a contract is compiled by either
|
||||
using the ``--libraries`` option of ``solc`` or the ``libraries`` key if you use the
|
||||
standard-JSON interface to the compiler.
|
||||
|
||||
In comparison to contracts, libraries are restricted in the following ways:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user