* Removed pluginType "hack" * Fix some ERC 721 & 1155 function signature hashes * Fix UI for ERC721 operations * Explicit Batch Transfer UI with ERC1155 * Unified some ERC721 & 1155 non-static functions naming * Fix UI for ERC1155 operations * Added missing pin-lock check when signing transactions * Fix the shell script that builds the elf files for testing * Add tests dependency ethers * Removed the space in the test filename * Tests build script refactoring * Now works when called from anywhere (not just the script's directory) * Now handles LNS & LNX builds together (less duplicated code) * Temporarily disable Nano X tests Until Zemu supports Nano X 2.0 SDK * Tests now start with blind signing disabled Makes it closer to reality & very few of them requires it * Update to the latest sdk version * make eth_plugin_perform_init() readable Introduce 2 functions. * Now properly parses the apdu and displays the total quantity of NFT IDs transferred in ERC1155 batch transfer * Add NFT prod public keys * Added extra checks for the chain ID handling Following the security review * NFTs now only supported by LNS * Version bump Co-authored-by: Alexandre Paillier <alexandre.paillier@ledger.fr> Co-authored-by: greenknot <greenknot@users.noreply.github.com>
45 lines
1.2 KiB
Bash
Executable File
45 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
TESTS_FULL_PATH=$(dirname "$(realpath "$0")")
|
|
|
|
# FILL THESE WITH YOUR OWN SDKs PATHS
|
|
# NANOS_SDK=
|
|
# NANOX_SDK=
|
|
|
|
# list of apps required by tests that we want to build here
|
|
APPS=("ethereum" "ethereum_classic")
|
|
|
|
# list of SDKS
|
|
NANO_SDKS=("$NANOS_SDK" "$NANOX_SDK")
|
|
# list of target elf file name suffix
|
|
FILE_SUFFIXES=("nanos" "nanox")
|
|
|
|
# move to the tests directory
|
|
cd "$TESTS_FULL_PATH" || exit 1
|
|
|
|
# Do it only now since before the cd command, we might not have been inside the repository
|
|
GIT_REPO_ROOT=$(git rev-parse --show-toplevel)
|
|
TESTS_REL_PATH=$(realpath --relative-to="$GIT_REPO_ROOT" "$TESTS_FULL_PATH")
|
|
|
|
# create elfs directory if it doesn't exist
|
|
mkdir -p elfs
|
|
|
|
# move to repo's root to build apps
|
|
cd "$GIT_REPO_ROOT" || exit 1
|
|
|
|
for ((sdk_idx=0; sdk_idx < "${#NANO_SDKS[@]}"; sdk_idx++))
|
|
do
|
|
nano_sdk="${NANO_SDKS[$sdk_idx]}"
|
|
elf_suffix="${FILE_SUFFIXES[$sdk_idx]}"
|
|
echo "* Building elfs for $(basename "$nano_sdk")..."
|
|
for appname in "${APPS[@]}"
|
|
do
|
|
echo "** Building app $appname..."
|
|
make clean BOLOS_SDK="$nano_sdk"
|
|
make -j DEBUG=1 NFT_TESTING_KEY=1 BOLOS_SDK="$nano_sdk" CHAIN="$appname"
|
|
cp bin/app.elf "$TESTS_REL_PATH/elfs/${appname}_${elf_suffix}.elf"
|
|
done
|
|
done
|
|
|
|
echo "done"
|