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
Click to show internal directories.
Click to hide internal directories.