justlend

command
v0.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 21, 2026 License: LGPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Minimal example showing how to rent and return energy via JustLend DAO's energy rental contract using the GoTRON SDK.

The contract exposes two methods:

rentResource(address receiver, uint256 amount, uint32 resourceType)
returnResource(address receiver, uint256 amount, uint32 resourceType)

Resource types: 0 = Bandwidth, 1 = Energy.

For more detailed examples see https://github.com/fbsobreira/gotron-examples

Usage:

go run ./examples/justlend                            # dry-run (simulate only)
JUSTLEND_KEY=<hex> go run ./examples/justlend         # live mode (key from env)
go run ./examples/justlend -key <private-key-hex>     # live mode (key from flag, unsafe: visible in shell history)
go run ./examples/justlend -contract <address>        # override contract address

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL