diff options
author | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
---|---|---|
committer | Hsuan Lee <hsuan@cobinhood.com> | 2019-01-19 18:42:04 +0800 |
commit | 7ae38906926dc09bc10670c361af0d2bf0050426 (patch) | |
tree | 5fb10ae366b987db09e4ddb4bc3ba0f75404ad08 /packages/typescript-typings/types/dsolc/index.d.ts | |
parent | b5fd3c72a08aaa6957917d74c333387a16edf66b (diff) | |
download | dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2 dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip |
Update dependency packages
Diffstat (limited to 'packages/typescript-typings/types/dsolc/index.d.ts')
-rw-r--r-- | packages/typescript-typings/types/dsolc/index.d.ts | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/packages/typescript-typings/types/dsolc/index.d.ts b/packages/typescript-typings/types/dsolc/index.d.ts new file mode 100644 index 000000000..8e39da99a --- /dev/null +++ b/packages/typescript-typings/types/dsolc/index.d.ts @@ -0,0 +1,105 @@ +declare module '@dexon-foundation/dsolc' { + export { ErrorType, ErrorSeverity, SolcError, StandardContractOutput, StandardOutput } from 'ethereum-types'; + import { SolcError } from 'ethereum-types'; + export interface ContractCompilationResult { + srcmap: string; + srcmapRuntime: string; + bytecode: string; + runtimeBytecode: string; + interface: string; + } + export interface CompilationResult { + errors: string[]; + contracts: { + [contractIdentifier: string]: ContractCompilationResult; + }; + sources: { + [sourceName: string]: { + AST: any; + }; + }; + sourceList: string[]; + } + export interface ImportContents { + contents: string; + } + export interface InputSources { + sources: { + [fileName: string]: string; + }; + } + export interface BaseSource { + keccak256?: string; + } + export interface InMemorySource extends BaseSource { + content: string; + } + export interface UrlSource extends BaseSource { + urls: string[]; + } + export type Source = UrlSource | InMemorySource; + export type OutputField = + | '*' + | 'ast' + | 'legacyAST' + | 'abi' + | 'devdoc' + | 'userdoc' + | 'metadata' + | 'ir' + | 'evm.assembly' + | 'evm.legacyAssembly' + | 'evm.bytecode.object' + | 'evm.bytecode.opcodes' + | 'evm.bytecode.sourceMap' + | 'evm.bytecode.linkReferences' + | 'evm.deployedBytecode.object' + | 'evm.deployedBytecode.opcodes' + | 'evm.deployedBytecode.sourceMap' + | 'evm.deployedBytecode.linkReferences' + | 'evm.methodIdentifiers' + | 'evm.gasEstimates' + | 'ewasm.wast' + | 'ewasm.wasm'; + export interface CompilerSettings { + remappings?: string[]; + optimizer?: { + enabled: boolean; + runs?: number; + }; + evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople'; + metadata?: { + useLiteralContent: true; + }; + libraries?: { + [fileName: string]: { + [libName: string]: string; + }; + }; + outputSelection: { + [fileName: string]: { + [contractName: string]: OutputField[]; + }; + }; + } + export interface StandardInput { + language: 'Solidity' | 'serpent' | 'lll' | 'assembly'; + sources: { + [fileName: string]: Source; + }; + settings: CompilerSettings; + } + export interface SolcInstance { + compile( + sources: InputSources, + optimizerEnabled: number, + findImports: (importPath: string) => ImportContents, + ): CompilationResult; + compileStandardWrapper(input: string, findImports: (importPath: string) => ImportContents): string; + } + export function loadRemoteVersion( + versionName: string, + cb: (err: SolcError | null, res?: SolcInstance) => void, + ): void; + export function setupMethods(solcBin: any): SolcInstance; +} |