mirror of
https://github.com/zama-ai/fhevm-solidity.git
synced 2026-04-17 03:00:47 -04:00
26 lines
940 B
Bash
Executable File
26 lines
940 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script execute a python script within a ready-to-use docker image with all the required python modules.
|
|
# The script takes two arguments:
|
|
# 1. The private key of the main account which has already funds.
|
|
# 2. (Optional) The node address (default: http://host.docker.internal:8545)
|
|
#
|
|
# Example usage: ./run_ERC20.sh <private_key> http://host.docker.internal:8545
|
|
|
|
if [ "$#" -lt 2 ]; then
|
|
echo "Please give the private key of the main account and optionnaly the node @:port"
|
|
echo "Example: `basename "$0"` CB99CAA34343 http://host.docker.internal:8545"
|
|
exit
|
|
fi
|
|
|
|
PRIVATE_KEY=$1
|
|
NODE_ADDRESS=${2:-http://host.docker.internal:8545}
|
|
|
|
# Create the keys directory if it doesn't exist
|
|
mkdir -p keys
|
|
|
|
echo "Exported private key: $PRIVATE_KEY"
|
|
|
|
# Run the Python script with the exported private key as an argument
|
|
docker compose -f ci/docker-compose.yml run app python ci/tests/ERC20.py $PRIVATE_KEY $NODE_ADDRESS
|