Skip to content

Commit

Permalink
Add yul-eof compiler in config
Browse files Browse the repository at this point in the history
  • Loading branch information
hugo-dc committed Mar 2, 2024
1 parent 2b5ebbc commit fbcb5fd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions retesteth/configs/Options.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace retesteth::options
{
extern dataobject::DataObject map_configs;
extern std::string const yul_compiler_sh;
extern std::string const yul_eof_compiler_sh;
extern std::string const t8ntool_start;

#define REGISTER(X) \
Expand Down
20 changes: 20 additions & 0 deletions retesteth/configs/clientconfigs/t8ntool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,26 @@ else
fi
)";

string const yul_eof_compiler_sh = R"(#!/bin/sh
solc=$(which solc)
if [ -z $solc ]; then
>&2 echo "yul-eof.sh \"Yul (EOF) compilation error: 'solc' not found!\""
echo "0x"
else
eof_gen=$(which eof_gen)
if [ -z $eof_gen ]; then
>&2 echo "yul-eof.sh \"Yul (EOF) compilation error: 'eof_gen' not found!\""
echo "0x"
fi
# eof_gen command from https://github.com/hugo-dc/eofscripts
# Install:
# go install github.com/hugo-dc/eofscripts/cmd/eof_gen
evm=$(solc --assemble $1 | grep -i "^[0-9]")
echo 0x$(eof_gen c:$evm | tail -n1)
fi
)";


string const t8ntool_start = R"(#!/bin/sh
wevm=$(which evm)
Expand Down

0 comments on commit fbcb5fd

Please sign in to comment.