MCPcopy Create free account
hub / github.com/ControlCplusControlV/Yul-Log / yulLogFetch

Function yulLogFetch

transpile.js:34–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34function yulLogFetch() {
35 var args = process.argv.slice(2);
36 if (args[1] == "bytecode") {
37 var contract = args[0];
38 fs.readFile(
39 path.join(OUT_DIR, contract + ".json"),
40 "utf8",
41 function (err, data) {
42 var artifact = JSON.parse(data);
43 process.stdout.write(
44 ethers.utils.defaultAbiCoder.encode(["bytes"], [artifact.bytecode])
45 );
46 }
47 );
48 }
49
50 if (args[1] == "abi") {
51 var contract = args[0];
52 fs.readFile(
53 path.join(OUT_DIR, contract + ".json"),
54 "utf8",
55 function (err, data) {
56 var artifact = JSON.parse(data);
57 process.stdout.write(JSON.stringify(artifact.abi));
58 }
59 );
60 }
61}
62
63//initialize the yul-log environment
64function yulLogInit() {

Callers 1

transpile.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected