Skip to main content

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)
  • 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)

Source distribution for deropy 0.3.0
File Size Uploaded
deropy-0.3.0.tar.gz 41.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for deropy 0.3.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page