From f1a9a0744db4e0dd30083094f28a8a4f9ed34356 Mon Sep 17 00:00:00 2001 From: Craig Everett Date: Wed, 22 Jan 2025 13:21:26 +0900 Subject: [PATCH] WIP --- LICENSE | 1 + README.md | 4 ++-- rebar.config | 18 +++++++++--------- rebar.lock | 14 +++++++------- test/aeb_data_test.erl | 1 + test/aeb_fate_asm_test.erl | 1 + test/aeb_serialize_test.erl | 1 + zomp.meta | 19 +++++++++++++++++++ zomp_prep | 20 ++++++++++++++++++++ 9 files changed, 61 insertions(+), 18 deletions(-) create mode 100644 zomp.meta create mode 100755 zomp_prep diff --git a/LICENSE b/LICENSE index 142825a..ab34bb2 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,6 @@ ISC License +Copyright (c) 2025, QPQ AG Copyright (c) 2017, aeternity developers Permission to use, copy, modify, and/or distribute this software for any diff --git a/README.md b/README.md index d4dbab9..9b4d728 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# aebytecode -A library and stand alone assembler for aeternity bytecode. +# gmbytecode +A library and stand alone assembler for Gajumaru bytecode. This version supports AEVM bytecode and FATE bytecode. diff --git a/rebar.config b/rebar.config index 7caf807..8278ee8 100644 --- a/rebar.config +++ b/rebar.config @@ -5,14 +5,14 @@ {erl_opts, [debug_info]}. {deps, [ {eblake2, "1.0.0"} - , {aeserialization, {git, "https://github.com/aeternity/aeserialization.git", - {tag, "v1.0.0"}}} + , {gmserialization, {git, "4b5cfcb67a3cf47649149f07e57fc25f09e3f36e", + {ref, "4b5cfcb67a3cf47649149f07e57fc25f09e3f36e"}}} , {getopt, "1.0.1"} ]}. -{escript_incl_apps, [aebytecode, eblake2, aeserialization, getopt]}. -{escript_main_app, aebytecode}. -{escript_name, aefateasm}. +{escript_incl_apps, [gmbytecode, eblake2, gmserialization, getopt]}. +{escript_main_app, gmbytecode}. +{escript_name, gmfateasm}. {escript_emu_args, "%%!"}. {pre_hooks, @@ -29,8 +29,8 @@ ]}. -{relx, [{release, {aebytecode, "3.4.0"}, - [aebytecode, eblake2, getopt]}, +{relx, [{release, {gmbytecode, "3.4.1"}, + [gmbytecode, eblake2, getopt]}, {dev_mode, true}, {include_erts, false}, @@ -39,8 +39,8 @@ {profiles, [{binary, [ {deps, [ {eblake2, "1.0.0"} - , {aeserialization, {git, "https://github.com/aeternity/aeserialization.git", - {tag, "v1.0.0"}}} + , {gmserialization, {git, "https://git.qpq.swiss/QPQ-AG/gmserialization.git", + {ref, "4b5cfcb67a3cf47649149f07e57fc25f09e3f36e"}}} , {getopt, "1.0.1"} ]}, diff --git a/rebar.lock b/rebar.lock index 2eb30ee..b97f975 100644 --- a/rebar.lock +++ b/rebar.lock @@ -1,16 +1,16 @@ {"1.2.0", -[{<<"aeserialization">>, - {git,"https://github.com/aeternity/aeserialization.git", - {ref,"177bf604b2a05e940f92cf00e96e6e269e708245"}}, +[{<<"gmserialization">>, + {git,"https://git.qpq.swiss/QPQ-AG/gmserialization.git", + {ref,"4b5cfcb67a3cf47649149f07e57fc25f09e3f36e"}}, 0}, {<<"base58">>, - {git,"https://github.com/aeternity/erl-base58.git", - {ref,"60a335668a60328a29f9731b67c4a0e9e3d50ab6"}}, + {git,"https://git.qpq.swiss/QPQ-AG/erl-base58.git", + {ref,"b6c41ff2f86f679675b95a780bfc6475e973d796"}}, 1}, {<<"eblake2">>,{pkg,<<"eblake2">>,<<"1.0.0">>},0}, {<<"enacl">>, - {git,"https://github.com/aeternity/enacl.git", - {ref,"793ddb502f7fe081302e1c42227dca70b09f8e17"}}, + {git,"https://git.qpq.swiss/QPQ-AG/enacl.git", + {ref,"4eb7ec70084ba7c87b1af8797c4c4e90c84f95a2"}}, 1}, {<<"getopt">>,{pkg,<<"getopt">>,<<"1.0.1">>},0}]}. [ diff --git a/test/aeb_data_test.erl b/test/aeb_data_test.erl index 7c25932..7b20a91 100644 --- a/test/aeb_data_test.erl +++ b/test/aeb_data_test.erl @@ -1,4 +1,5 @@ %%%------------------------------------------------------------------- +%%% @copyright (C) 2025, QPQ AG %%% @copyright (C) 2018, Aeternity Anstalt %%% @doc Basic tests for Fate data %%% @end diff --git a/test/aeb_fate_asm_test.erl b/test/aeb_fate_asm_test.erl index 8c24231..e36df01 100644 --- a/test/aeb_fate_asm_test.erl +++ b/test/aeb_fate_asm_test.erl @@ -1,4 +1,5 @@ %%%------------------------------------------------------------------- +%%% @copyright (C) 2025, QPQ AG %%% @copyright (C) 2018, Aeternity Anstalt %%% @doc Basic tests for Fate serialization %%% diff --git a/test/aeb_serialize_test.erl b/test/aeb_serialize_test.erl index f0dcca7..94e6409 100644 --- a/test/aeb_serialize_test.erl +++ b/test/aeb_serialize_test.erl @@ -1,4 +1,5 @@ %%%------------------------------------------------------------------- +%%% @copyright (C) 2025, QPQ AG %%% @copyright (C) 2018, Aeternity Anstalt %%% @doc Basic tests for Fate serialization %%% diff --git a/zomp.meta b/zomp.meta new file mode 100644 index 0000000..6550af5 --- /dev/null +++ b/zomp.meta @@ -0,0 +1,19 @@ +{a_email,[]}. +{author,""}. +{c_email,[]}. +{copyright,""}. +{deps,[{"otpr","gmserialization",{0,1,0}}, + {"otpr","eblake2",{1,0,0}}, + {"otpr","getopt",{1,0,2}}]}. +{desc,"A library and stand alone assembler for Gajumaru bytecode. This version supports AEVM bytecode and FATE bytecode."}. +{file_exts,[]}. +{key_name,none}. +{license,skip}. +{modules,[]}. +{name,"AE Bytecode"}. +{package_id,{"otpr","gmbytecode",{3,2,1}}}. +{prefix,none}. +{repo_url,"https://git.qpq.swiss/QPQ-AG/gmbytecode"}. +{tags,["gajumaru","blockchain","fate","bytecode","crypto","gm"]}. +{type,lib}. +{ws_url,[]}. diff --git a/zomp_prep b/zomp_prep new file mode 100755 index 0000000..a054d8a --- /dev/null +++ b/zomp_prep @@ -0,0 +1,20 @@ +#! /bin/bash + +# This is a small pre-packaging source generation and include correction script that should be +# run before packaging this project for use with ZX/Zomp. + +rm -rf _build +rm -f src/aeb_fate_opcodes.erl src/aeb_fate_ops.erl include/aeb_fate_opcodes.hrl src/aeb_fate_asm_scan.xrl src/aeb_fate_pp.erl +make sources +cd src +for f in $(ls --ignore=aeb_fate_generate_ops.erl | grep erl) +do + echo "Updating includes in: $f" + sed -i 's/aebytecode\/include\///g' "$f" + sed -i 's/\.\.\/include\///g' "$f" + sed -i 's/include_lib/include/g' "$f" +done +cd .. +rm -f ebin/*.beam +rm -f rebar* +rm -rf quickcheck