Replace release 0.1.0-dev.15 with 0.1.0-dev.16 (#314)

add missing patch and rename release
This commit is contained in:
PG Herveou
2025-05-08 15:26:10 +02:00
committed by GitHub
parent 32f55b976c
commit 0421869e4b
6 changed files with 49 additions and 39 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "@parity/resolc",
"license": "Apache-2.0",
"version": "0.0.0-updated-via-gh-releases",
"version": "0.1.0-dev.16",
"author": "Parity <admin@parity.io> (https://parity.io)",
"module": "index.ts",
"types": "./dist/index.d.ts",
+17 -4
View File
@@ -93,13 +93,26 @@ export function version(): string {
export async function compile(
sources: SolcInput,
option: { bin?: string } = {}
option: {
optimizer?: Record<string, unknown>
bin?: string
} = {}
): Promise<SolcOutput> {
const {
optimizer = {
mode: 'z',
fallback_to_optimizing_for_size: true,
enabled: true,
runs: 200,
},
bin,
} = option
const input = JSON.stringify({
language: 'Solidity',
sources: resolveInputs(sources),
settings: {
optimizer: { enabled: true, runs: 200 },
optimizer,
outputSelection: {
'*': {
'*': ['abi'],
@@ -108,8 +121,8 @@ export async function compile(
},
})
if (option.bin) {
return compileWithBin(input, option.bin)
if (bin) {
return compileWithBin(input, bin)
}
return resolc(input)