DEROPY
Deropy is a toolbox for creating, managing and testing DERO smart contracts.
Roadmap
As I am actively using deropy to work on my own smart contracts, I will be adding features as I need them. If you have any suggestions or requests, feel free to open an issue.
Info: I am also open to suggestion regarding the repo itself, if you have any suggestion on how to improve the repo, feel free to open an issue.
Version 0.0.x
-
Generate python class for smart contract
- Each public function have a corresponding
scinvokerequest - Each public function have a corresponding
transfer2request (to manually specify the fee)
- Each public function have a corresponding
-
Deploy the smart contract to:
- The simulator
- The testnet
- The mainnet
Version 0.1.x
- (30%) Full DVM simulator in pure python
- Implement all the DVM standard functions
- Add compute gaz and storage gaz calculation
Version 1.0
- (50%) Full python to DVM Transpiler :rocket:
- Function definition
- Fuction call
- Variable declaration
- Variable assignement
- Mathematic operator
- Comparison operator
- If block
- While loop :fire:
- For loop ?
future version
- template support for standard smart-contract
- NFT collection builder
- g45-c + g45-nft automatic deployment
- API builder for any SC already deployed on chain
Installation
Directly from the python public repositry
pip install deropy
deropy configure
From sources
git clone https://github.com/dero-hyperbolic/deropy.git
cd deropy
pip install .
deropy configure
Quick Start
deropy deploy -g path/to/sc.bas
this command will:
If the simulator is running
- Deploy your smart contract to the simulator
- Create a new SC.py file in the current directory with the correct SCID.
- A new tests/test_sc.py file in the current directory.
If the simulator is not running the Smart Contract will not be deployed
SC.py will contain a class that allow you to call every function implemented in your smart contract test_sc.py will contain a test class that provide you with a basic test skeleton for every function implemented in your smart contract
Usage in a python script or terminal
from SC import SC
sc = SC()
sc.function_to_invoke(param1, param2)
>>> {'jsonrpc': '2.0', 'id': '1', 'result': {'txid': '861fbb04b475fb94de9ba...'}}
Commands
| Command | Description |
|---|---|
deropy configure |
Install the autocomplete script |
deropy deploy |
deploy a DERO smart contract |
deropy generate |
Convert a DERO smart contract into a python API |
Release files for deropy 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| deropy-0.3.0.tar.gz | 41.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deropy-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 113.2 kB
Release files / deropy-0.3.0.tar.gz
| Download URL | deropy-0.3.0.tar.gz |
|---|---|
| Size | 41.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c6f445ca96c588da0869da990afdd12ae936503c23370b9f60121e5e93184ef4
|
|
BLAKE2b-256 checksum How to use checksums |
fe451985a25cf2267ff5c686b491d4c992d9754b15ded5cd25047ec4735ff03e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / deropy-0.3.0-py3-none-any.whl
| Download URL | deropy-0.3.0-py3-none-any.whl |
|---|---|
| Size | 71.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7a5cdfe938d7a3508539f8136bb9ed83c5056fcfbfdecdca7cbbc346c2f58cc6
|
|
BLAKE2b-256 checksum How to use checksums |
bb01608cc239918eb5be161e46c344bf913160a4eac226829727c929d0aa1f7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|