File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ See [solc-js README](https://github.com/ethereum/solc-js#readme) and [Deno doc](
19
19
## Example
20
20
21
21
``` ts
22
- import { setupSolc } from ' https://deno.land/x/solc/mod.ts'
22
+ import { wrapper } from ' https://deno.land/x/solc/mod.ts'
23
23
import { Input } from ' https://deno.land/x/solc/types.ts'
24
24
import { download } from ' https://deno.land/x/solc/download.ts'
25
+ import {
createRequire }
from ' https://deno.land/[email protected] /node/module.ts'
25
26
26
27
const exists = async (filename : string ): Promise <boolean > => {
27
28
try {
@@ -40,7 +41,8 @@ if (!(await exists('./soljson.js'))) await download('./soljson.js')
40
41
41
42
const dec = new TextDecoder ()
42
43
43
- const solc = setupSolc (' ./soljson.js' )
44
+ const require = createRequire (import .meta .url )
45
+ const solc = wrapper (require (' ./soljson.js' ))
44
46
45
47
const readFile = async (path : string ) => {
46
48
const file = await Deno .readFile (path )
You can’t perform that action at this time.
0 commit comments