Skip to content

Commit fc32e8b

Browse files
committed
Update README with link references
1 parent f7c22b3 commit fc32e8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,9 @@ The `linkBytecode` method provides a simple helper for linking:
152152
bytecode = solc.linkBytecode(bytecode, { 'MyLibrary': '0x123456...' })
153153
```
154154

155-
Note: in future versions of Solidity a more sophisticated linker architecture will be introduced. Once that changes, this method will still be usable for output created by old versions of Solidity.
155+
As of Solidity 0.4.11 the compiler supports [standard JSON input and output](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#compiler-input-and-output-json-description) which outputs a *link references* map. This gives a map of library names to offsets in the bytecode to replace the addresses at.
156+
157+
There is a method available in the `linker` module (`require('solc/linker')`) called `findLinkReferences` which can find such link references in bytecode produced by an older compiler.
156158

157159
### Updating the ABI
158160

0 commit comments

Comments
 (0)