neodix42 / MyLocalTon

Personal local TON blockchain
GNU General Public License v3.0
105 stars 17 forks source link

Add web app #14

Closed Hid-K closed 1 year ago

Hid-K commented 1 year ago

I want to run this application in docker container and use it to test my smart-contracts and it would be cool if i would have ao access to UI via web.

neodix42 commented 1 year ago

In "Settings -> UI interface" you can enable Native blockchain explorer and then access it via browser at http://127.0.0.1:8000/last Also, hopefully one day I will add ton-http-api https://github.com/neodiX42/MyLocalTon/issues/3

Hid-K commented 1 year ago

can i do it in some config to staticly enable this option?

neodix42 commented 1 year ago

Try to set "enableBlockchainExplorer": true in ./myLocalTon/settings.json

Hid-K commented 1 year ago

it didn't worked. browser can't connect to server. Scan with NMAP also said there is no port 8000 opened on 127.0.0.1

neodix42 commented 1 year ago

did you try to specify docker parameters --network host or port-mapping (-p 8000:8000)?

Hid-K commented 1 year ago

i did not runned it in docker yet. currently it is running on my machine

neodix42 commented 1 year ago

ok, do one test, please. Start MyLocalTon, wait till it starts the blockchain, go to the UI settings and enable Native blockchain explorer. Now restart MyLocalTon and on start check, if you see the explorer in the newly appeared menu "Explorer". If you see the explorer, then the same will work from the browser.

image

Hid-K commented 1 year ago

explorer page is blank

neodix42 commented 1 year ago

I believe you have waited till the blocks started appearing in Blocks page. What OS you are running on? It would be good if you could attach the logfile, mylocalton.log here.

Hid-K commented 1 year ago

myLocalTon.log

neodix42 commented 1 year ago

Thanks! I see the error.

14:59:51.605 [JavaFX Application Thread] ERROR o.t.e.b.BlockchainExplorerExecutor - Cannot run program "/Users/hidk/Documents/Projects/MyLocalTonWEB/myLocalTon/genesis/bin/blockchain-explorer" (in directory "/Users/hidk/Documents/Projects/MyLocalTonWEB/myLocalTon/genesis/bin"): error=2, No such file or directory

I will cross check if binaries are fine. Actually it is time to sync binaries with the TON master branch, will do that as well.

neodix42 commented 1 year ago

please try this version https://github.com/neodiX42/MyLocalTon/releases/tag/v67-main

Hid-K commented 1 year ago

The same. Explorer page is just blank. myLocalTon.log

neodix42 commented 1 year ago

It seems you have not deleted previous installation. Please delete myLocalTon folder next to jar file.