A set of tool to help of DERO smart contract development
Project description
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
scinvoke
request - Each public function have a corresponding
transfer2
request (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 |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file deropy-0.3.0.tar.gz
.
File metadata
- Download URL: deropy-0.3.0.tar.gz
- Upload date:
- Size: 41.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
c6f445ca96c588da0869da990afdd12ae936503c23370b9f60121e5e93184ef4
|
|
MD5 |
af03f3259bc9c1527943ae5ee8bea07c
|
|
BLAKE2b-256 |
fe451985a25cf2267ff5c686b491d4c992d9754b15ded5cd25047ec4735ff03e
|
File details
Details for the file deropy-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: deropy-0.3.0-py3-none-any.whl
- Upload date:
- Size: 71.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7a5cdfe938d7a3508539f8136bb9ed83c5056fcfbfdecdca7cbbc346c2f58cc6
|
|
MD5 |
10f39946b830c60a404de588a9f01e56
|
|
BLAKE2b-256 |
bb01608cc239918eb5be161e46c344bf913160a4eac226829727c929d0aa1f7f
|