Skip to content

lilo console test

zhaojun.sh edited this page Dec 28, 2018 · 2 revisions

LILO console test

Run the dcrm client gdcrm --networkid 40410 console first, creat new account, get some test coin from faucet, then user can test the lockin and lockout as follows.

1. lilo.dcrmReqAddr

Request dcrm address with cointype.

lilo.dcrmReqAddr("0x3a1b3b81ed061581558a81f11d63e03129347437","ETH")

Return:

{"FusionAccount":"0x3a1b3b81ed061581558a81f11d63e03129347437","DcrmAddr":"0xcCF305c633C128613b11F3022301C9243cCBDBf5","Type":"ETH"}

2. lilo.dcrmConfirmAddr

Confirm dcrm address store into block.

lilo.dcrmConfirmAddr("0xcCF305c633C128613b11F3022301C9243cCBDBf5","ETH")

Return TXhash:

"0x944e3e5e9847ba3835d7ab3bf058e0a2d44df8a5b2dae3748546e79ab5c222f0"

3. lilo.dcrmGetAddr

Get dcrm address from block.

lilo.dcrmGetAddr("0x3a1b3b81ed061581558a81f11d63e03129347437","ETH")

Return dcrm address:

"0xcCF305c633C128613b11F3022301C9243cCBDBf5"

4. lilo.dcrmLockin

先完成充值,eth测试网从帐号0x0520e8e5E08169c4dbc1580Dc9bF56638532773A 往0xcCF305c633C128613b11F3022301C9243cCBDBf5充值0.123456789 eth,交易hash:0x8db24195597d23ace7d0db3b761d1b325ca6c8b1db823f6d51aa4472d1bb7cb4

lilo.dcrmLockin("0x8db24195597d23ace7d0db3b761d1b325ca6c8b1db823f6d51aa4472d1bb7cb4",web3.toWei(0.123456789, "ether"),"ETH")

Return TXhash:

"0x8673ea319a9044bfd8093d6db1ba0ffa8bf566922120e0e949838b994f925cab"

5. lilo.dcrmGetBalance

Get account balance from block.

lilo.dcrmGetBalance("0x3A1b3B81Ed061581558a81F11d63E03129347437","ETH")

Return balance:

"160000000000000000"

6. lilo.dcrmSendTransaction

Send transaction to another address which have

lilo.dcrmSendTransaction("0x3c3A2D4327C6FB20dC1561A42B7f03042b7a815e","20000000000000000","ETH")

Return TXhash:

"0x08356d433d0362f5bb5d5af6877842bcae450ed85ecdc4a26db07b0c795e1ce3"

7. lilo.dcrmLockout

Lockout eth to another ether account.

lilo.dcrmLockout("0x0520e8e5E08169c4dbc1580Dc9bF56638532773A","1000000000","ETH")

Return TXhash:

"0x02fc4a7bed53f56d07fd0d67fdcb5d59ef96ee7fd886b4bfe2ef85aa88d2ed49"