mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-12 16:21:05 +00:00
Move @parity/resolc from js-revive (#296)
- Move npm package from paritytech/js-revive - Rename package to `@parity/resolc`
This commit is contained in:
Vendored
+95
@@ -0,0 +1,95 @@
|
||||
declare module 'solc/soljson' {}
|
||||
|
||||
declare module 'solc' {
|
||||
// Basic types for input/output handling
|
||||
export interface CompileInput {
|
||||
language: string
|
||||
sources: {
|
||||
[fileName: string]: {
|
||||
content: string
|
||||
}
|
||||
}
|
||||
settings?: {
|
||||
optimizer?: {
|
||||
enabled: boolean
|
||||
runs: number
|
||||
}
|
||||
outputSelection: {
|
||||
[fileName: string]: {
|
||||
[contractName: string]: string[]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface CompileOutput {
|
||||
errors?: Array<{
|
||||
component: string
|
||||
errorCode: string
|
||||
formattedMessage: string
|
||||
message: string
|
||||
severity: string
|
||||
sourceLocation?: {
|
||||
file: string
|
||||
start: number
|
||||
end: number
|
||||
}
|
||||
type: string
|
||||
}>
|
||||
sources?: {
|
||||
[fileName: string]: {
|
||||
id: number
|
||||
ast: object
|
||||
}
|
||||
}
|
||||
contracts?: {
|
||||
[fileName: string]: {
|
||||
[contractName: string]: {
|
||||
abi: object[]
|
||||
evm: {
|
||||
bytecode: {
|
||||
object: string
|
||||
sourceMap: string
|
||||
linkReferences: {
|
||||
[fileName: string]: {
|
||||
[libraryName: string]: Array<{
|
||||
start: number
|
||||
length: number
|
||||
}>
|
||||
}
|
||||
}
|
||||
}
|
||||
deployedBytecode: {
|
||||
object: string
|
||||
sourceMap: string
|
||||
linkReferences: {
|
||||
[fileName: string]: {
|
||||
[libraryName: string]: Array<{
|
||||
start: number
|
||||
length: number
|
||||
}>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Main exported functions
|
||||
export function compile(
|
||||
input: string | CompileInput,
|
||||
options?: {
|
||||
import: (path: string) =>
|
||||
| {
|
||||
contents: string
|
||||
error?: undefined
|
||||
}
|
||||
| {
|
||||
error: string
|
||||
contents?: undefined
|
||||
}
|
||||
}
|
||||
): string
|
||||
}
|
||||
Reference in New Issue
Block a user