@@ -12,10 +12,9 @@ import { basename, join } from '@std/path'
1212type CompileInput = Parameters < typeof compile > [ 0 ]
1313
1414const args = Deno . args
15- const filter =
16- args . includes ( '-f' ) || args . includes ( '--filter' )
17- ? args [ args . indexOf ( '-f' ) + 1 ] || args [ args . indexOf ( '--filter' ) + 1 ]
18- : undefined
15+ const filter = args . includes ( '-f' ) || args . includes ( '--filter' )
16+ ? args [ args . indexOf ( '-f' ) + 1 ] || args [ args . indexOf ( '--filter' ) + 1 ]
17+ : undefined
1918const solcOnly = args . includes ( '-s' ) || args . includes ( '--solcOnly' )
2019
2120function evmCompile ( sources : CompileInput ) {
@@ -73,12 +72,14 @@ for (const file of input) {
7372 args : [ '--version' ] ,
7473 stdout : 'piped' ,
7574 } ) . output ( )
76- ) . stdout
75+ ) . stdout ,
7776 )
7877 console . log (
79- `Compiling with revive (using ${ Deno . env . get (
80- 'REVIVE_BIN'
81- ) } - ${ output } )...`
78+ `Compiling with revive (using ${
79+ Deno . env . get (
80+ 'REVIVE_BIN' ,
81+ )
82+ } - ${ output } )...`,
8283 )
8384 }
8485 const reviveOut = await compile ( inputSources , {
@@ -92,11 +93,11 @@ for (const file of input) {
9293 const bytecode = new Uint8Array (
9394 contract . evm . bytecode . object
9495 . match ( / .{ 1 , 2 } / g) !
95- . map ( ( byte ) => parseInt ( byte , 16 ) )
96+ . map ( ( byte ) => parseInt ( byte , 16 ) ) ,
9697 )
9798 Deno . writeFileSync (
9899 join ( pvmDir , `${ name } .polkavm` ) ,
99- bytecode
100+ bytecode ,
100101 )
101102 }
102103 }
@@ -127,19 +128,21 @@ for (const file of input) {
127128 const bytecode = new Uint8Array (
128129 bytecodeHex
129130 . match ( / .{ 1 , 2 } / g) !
130- . map ( ( byte ) => parseInt ( byte , 16 ) )
131+ . map ( ( byte ) => parseInt ( byte , 16 ) ) ,
131132 )
132133 Deno . writeFileSync ( join ( evmDir , `${ name } .bin` ) , bytecode )
133134 }
134135 }
135136
136137 const abi = contract . abi
137138 const abiName = `${ name } Abi`
138- const tsContent = `export const ${ abiName } = ${ JSON . stringify (
139- abi ,
140- null ,
141- 2
142- ) } as const\n`
139+ const tsContent = `export const ${ abiName } = ${
140+ JSON . stringify (
141+ abi ,
142+ null ,
143+ 2 ,
144+ )
145+ } as const\n`
143146 Deno . writeTextFileSync ( join ( abiDir , `${ name } .ts` ) , tsContent )
144147 }
145148 }
0 commit comments