EVM File Uploader is a program that allows you to upload files to any EVM compatible chain. It provides a command-line interface and supports various options to customize the upload process.
Chain Name | Status | Note |
---|---|---|
BNB Testnet | Fully work | To hight fee use opBNB |
opBNB | Fully work | The best option |
Mumbai Testnet | Work | It works but often gives problems with the fees and the transactions take a long time, more tests are needed |
OP Goerli | Work | Due to lack of faucets and funds, all the tests have not been carried out, initial tests seem to work |
Goerli | Fully work | Slow, putting a different and higher gasfee speeds up the process |
Sepolia | Fully work | Fast and Low fee |
BitTorrent Donau | Not Working | Gas problem |
Scroll Sepolia | Fully work | Slow upload but Super Low fee |
Base Goerli | Fully work | Slow upload but Super Low fee |
Chaos SKALE Testnet | Work | Encountered errors when loading large files over 2mb. Currently investigating. Fast upload and faucet available: here |
Python 3.7.2+ support
BFY File Uploader provides pre-compiled binaries for both Windows and Linux platforms, allowing you to run the program without the need for additional installations.
- Download the Windows executable file from the Releases page.
- Unzip all files and put them into a folder.
- Double-click on the downloaded file to run the main.exe executable.
- Download the Linux executable file from the Releases page. 2.Unzip all files and put them into a folder.
- Open the terminal and navigate to the directory where the downloaded file is located.
- Run the following command to make the file executable:
chmod +x main
- Execute the program by running:
./main
Please note that the pre-compiled binaries are available in the "Releases" section of the GitHub repository.
Before running the program, make sure to configure the .env
file. Follow the steps below:
- Rename the
.env.example
file to.env
. - Open the
.env
file and enter your eth address and private key. To retrieve the private key from MetaMask, follow these steps:- Open MetaMask and click on the account icon in the top right corner.
- Select "Account Details".
- Click on the "Export Private Key" button.
- Copy the private key and paste it into the
.env
file.
To run the program, you need to install the required dependencies using the following command:
pip3 install -r requirements.txt
After installing the dependencies, you can execute the program using the following command:
python main.py
Please note that Python 3.7.2+ is required.
The program can be executed with the following flags:
-t
,--time_out
: Timeout time with RPC (default: 1200)-e
,--encoding_type
: Encoding Type of the file. Valid options: base64, base64withpassword (default: base64)-g
,--gui
: Enable/Disable GUI. Valid options: True, False (default: True)-i
,--input
: Path of the file to upload (works only with--gui False
)-rpc
: RPC URL of the BlockChain (default: https://opbnb-testnet-rpc.bnbchain.org/)-p
,--password
: Password for base64withpassword encoding (default: Password)-gasprice
: GasPrice for transactionchainid
: ChainID of the BlockChainconvalidate
: Convalidate file after upload False/True (default: False)
For Windows, you may need to install the following package: vc_redist.x64.exe.
The api.py
file located in the tool
directory can be used to run the API server for BlockyFile. Follow the instructions below to execute the script and set the memory limit for contract size:
-
Make sure you have Python installed on your system.
-
Open a terminal or command prompt.
-
Navigate to the
tool
directory of the EVM-Data-Uploader project. -
Run the following command to execute the
api.py
script:python api.py
or
python3 api.py
Note: Use
python
orpython3
depending on your Python installation. -
If you want to set the memory limit for contract size, use the
-m
flag followed by the desired memory limit. For example:python api.py -m 256
This command sets the memory limit to 256 MB for contract size.
-
You can also use the
-s
flag to enable or disable statistics for future analysis. To enable statistics, use-s True
, and to disable them, use-s False
. For example:python api.py -s True # Enable statistics python api.py -s False # Disable statistics
This allows you to control whether statistics are collected and displayed in future analyses.
This program implements a simple API to retrieve files stored on the Ethereum Virtual Machine (EVM) using Flask as the web framework and Web3 to interact with the Ethereum network. The files are stored in smart contracts on the Ethereum blockchain, and this API allows you to fetch the data from the smart contracts using their contract address and the chain ID of the network.
- Install the required Python packages using pip:
pip install Flask web3 pycryptodome
python api.py
The API will be accessible at http://127.0.0.1:8080
.
-
To retrieve file data in JSON format:
- Endpoint:
/json/
- Query Parameters:
contract_address
: The address of the smart contract containing the file.chainid
: The chain ID of the Ethereum network (e.g., 5611 for Binance Smart Chain testnet).
- Example URL:
http://127.0.0.1:8080/json/?contract_address=0x441122800E236D9b8eC34742D350CFD482D9607f&chainid=5611
- Endpoint:
-
To retrieve a file (in base64 format) directly:
- Endpoint:
/v1/
- Query Parameters:
contract_address
: The address of the smart contract containing the file.chainid
: The chain ID of the Ethereum network (e.g., 5611 for Binance Smart Chain testnet).
- Example URL:
http://127.0.0.1:8080/v1/?contract_address=0x441122800E236D9b8eC34742D350CFD482D9607f&chainid=5611
- Endpoint:
-
To retrieve a password-protected file (in base64 format):
- Endpoint:
/password/
- Query Parameters:
contract_address
: The address of the smart contract containing the file.chainid
: The chain ID of the Ethereum network (e.g., 5611 for Binance Smart Chain testnet).password
: The password to decrypt the file data.
- Example URL:
http://127.0.0.1:8080/password/?contract_address=0x441122800E236D9b8eC34742D350CFD482D9607f&chainid=5611&password=mysecretpassword
- Endpoint:
- The API uses the specified chain ID to connect to different Ethereum networks.
- The API requires the contract address to be provided in lowercase hexadecimal format. It will automatically convert it to a checksum address if necessary.
- The API returns the file data in base64 format. It can also handle password-protected files if the password is provided in the URL.
Please note that this is just a basic implementation and should not be used in production without proper security measures. In a real-world scenario, consider implementing proper authentication, rate limiting, and other security practices to secure the API.
python statistic.py --gui True/False
--gui True
: Enable the graphical user interface.--gui False
: Disable the graphical user interface.
To run the program enabling the GUI, execute the following command:
python statistic.py --gui True
To run the program without the GUI, execute the following command:
python statistic.py --gui False
The following features are planned for future releases:
- Urgent: Fix SetOwner vulnerability
- Addition of base85 encoding for reduced cost.
- Integration with third-party web platforms for easier usage in DApps.
- Code optimization for improved performance.
Fix bugs with python v3.10 and highter.Addition stats to api.
Please note that these features are not yet available in the current version of the program but they will all be added.