mirror of
https://github.com/autistic-symposium/web3-starter-py.git
synced 2025-05-17 06:02:12 -04:00
1 KiB
1 KiB
Enconding decimals
This program:
i) converts and encodes a 14-bit decimal input value to a 2-byte hexadecimal, ii) decodes hexadecimal representations to 14-bit decimal
Installing
Create and source virtual enviroment. You can use virtualenv or conda:
virtualenv venv
source venv/bin/activate
Install dependencies:
make setup
Install Efun:
make install
Usage
Encoding
To enconde a integer, run:
efun -e <integer>
Note that the value must be in the range [-8192, 8191]
.
Decoding
To decode an integer, run:
efun -d <integer>
Note that the value must be in the range [0x0000, 0x7F7F]
.
Developer
Running tests
You can run tests with:
make test
Linting
You can lint your code with:
make lint
Cleaning up
Clean residual compilation and installation files with:
make clean
Thank you for reading my code!