-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #604 from stephensli/types/linker
Provide type support to linker.ts
- Loading branch information
Showing
2 changed files
with
31 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* A mapping between libraries and the addresses to which they were deployed. | ||
* | ||
* Containing support for two level configuration, These two level | ||
* configurations can be seen below. | ||
* | ||
* { | ||
* "lib.sol:L1": "0x...", | ||
* "lib.sol:L2": "0x...", | ||
* "lib.sol": {"L3": "0x..."} | ||
* } | ||
*/ | ||
export interface LibraryAddresses { | ||
[qualifiedNameOrSourceUnit: string]: string | { [unqualifiedLibraryName: string]: string }; | ||
} | ||
|
||
/** | ||
* A mapping between libraries and lists of placeholder instances present in their hex-encoded bytecode. | ||
* For each placeholder its length and the position of the first character is stored. | ||
* | ||
* Each start and length entry will always directly refer to the position in | ||
* binary and not hex-encoded bytecode. | ||
*/ | ||
export interface LinkReferences { | ||
[libraryLabel: string]: Array<{ start: number, length: number }>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters