![]() |
2 years ago | |
---|---|---|
config | 2 years ago | |
debugger | 2 years ago | |
examples | 2 years ago | |
log | 2 years ago | |
prompt | 2 years ago | |
unit | 2 years ago | |
vm | 2 years ago | |
.gitignore | 2 years ago | |
LICENSE | 2 years ago | |
README.md | 2 years ago | |
VERSION | 2 years ago | |
build_all.sh | 2 years ago | |
build_package.sh | 2 years ago | |
dvm.patch | 2 years ago | |
main.go | 2 years ago | |
patch.sh | 2 years ago |
DVM Light is a standalone version of Dero Stargate Testnet Virtual Machine designed for accelerate the development of Smart Contract on the DERO Network in an offline environement. ( See more: https://git.dero.io/DeroProject/dvm_doc )
go get git.dero.io/b9ron/dvml
run
or compile
with: go run dvml.go
or go build
Linux:
./dvml --help
Windows:
dvml.exe --help
Initialize() Uint64
that return a Uint64 0
.LOAD(
data)
instruction, data need to be initialized in Initialize()
function with STORE(
data,
value)
instruction.String value
10 STORE(name, "Alice")
Uint64 value
10 STORE(balance, 0)
Minimalistic Initialize function
Function Initialize() Uint64
20 RETURN 0
End Function
For the signature: Function TuneLotteryParameters(input Uint64, lotteryeveryXdeposit Uint64, lotterygiveback Uint64) Uint64
(dvml) run TuneLotteryParameters 10000 5 8800
For the signature: Function TransferOwnership(newowner String) Uint64
(dvml) run TransferOwnership dEToNFYEXufYzcs64qnfocZ48nvmbxbKR1x2MZBqbrHn5dULSfRRdN3d4EsbwKLGeHE5k3Vrh77BWFufe2gBcrDF57PqDCaJoc
0.0.8a:
0.0.8:
Stargate rc2
DVMburn
will deposit Token
and Dero
on the SC.reset
set smart contract and the Dvml with initial value.SEND_DERO_TO_ADDRESS
allow to sendback to the owner and updates balances correctly (Never sendback more Dero than what is in the SC balance)Live Debugger
. (Allow breakpoints, runing step by step, display local variables and more…)
br
or break
Display the list of all breakpoint enabled.br InitX 50
Enable a breakpoint in the function InitX at the line 50.br InitX 50 0
Disable the breakpoint in the function InitX at the line 50.r
or run
command to run the function where you add breackpoints.-mainnet
allow to generate dero address
instead of deto address
for the generated account.** KNOWN BUG : SEND_DERO_TO_ADDRESS will not work properly if used multiple times. **
0.0.7:
ExpectedStates
(SC states) in the JSON test file allow to check the SC states modified with STORE(
key)
DVM function. (see the examples folder)generate file
will generate a JSON test file_generated.json
based on the current SC loaded. (Only ExpectedResult
(function output) are generated)balance
will show the SC balance and current user balance.SEND_DERO_TO_ADDRESS
allow to sendback to the owner the correct ammount of Dero without crash.0.0.6b:
-colors
to enable the color mode.sc
et test
flags.0.0.6:
dvml file.bas file.json
0.0.5:
Unit Testing
for Dero Smart Contracts with the command tests file
that load a JSON file with unit tests parameters. (see the examples folder)dvml
a new SCID BLID and TXID will be generated (They are seeds for the RANDOM()
function).0.0.4:
value
and an amount in uint64
.0.0.3:
help
display Help and Usage information.account
display 10 generated accounts (0 to 9), with the command account 9
you can select the account number 9. (usefuf for the DVM SIGNER() instruction.)signer
or whoami
display the current address of the SIGNER().storage
show the data stored with the DVM STORE() instruction.** KNOWN BUG : SEND_DERO_TO_ADDRESS doesn’t work yet! **
0.0.2:
run
.list
.q
or quit
for exit.)0.0.1:
dERoNFYEXufYzcs64qnfocZ48nvmbxbKR1x2MZBqbrHn5dULSfRRdN3d4EsbwKLGeHE5k3Vrh77BWFufe2gBcrDF57PqDCaJoc