Pages:
Author

Topic: 🌱[ANN] SOIL | Environmental | Agriculture | Smart Contracts | Sustainable - page 49. (Read 237604 times)

member
Activity: 95
Merit: 11
post 6

Smart Contract: WeatherForecastAtLocation
WebView on Oracle Database



The oracle is now checking (every 15 minutes) if there is an > 24 hours not updated location
(with money balance left) - and auto-updates those locations with fresh weather data.

go to:   weathercontract.hopto.org/oracle
member
Activity: 95
Merit: 11
Thanks a lot!

here we go:
Code:
statusmessage => ForecastWeatherAtLocationAtTime:
forecasted time => Mon, 25 Jul 2016 17:00:00 CEST
temperature => 302.96 Kelvin
pressure => 1016.79 Hectopascal
humidity => 45 Percent
cloudcover => 64 Percent
windspeed => 3.37 Meter/Second
rain => 0.01 Millimeter in 3 hours
Very good, well done.

We have a 1st prize winner:
Testers wanted, for new Smart Contract
1500 SOIL total for the first 3 people to fully try out the quickstart:
                  700 SOIL for the 1st to finish
                  500 SOIL for the 2nd to finish me
                  300 SOIL for the 3rd to finish
I have sent you the 700 SOIL to your address.


Just tested this on a spare Windows PC. Checked your manual02-preparations.md to get an overview, downloaded the repo using Firefox and followed the manual03-console-quickstart.md step by step without any issues.
Good to read that there were no issues at all in Windows.
I had also tested it myself, on a clean droplet in Linux.

Well documented project. Smiley
Thanks.

Would you recommend it to others? Then perhaps tweet about it.

Had to mine some SOIL for topping up the location, this took some time.
You even mined the money you used. Cool.

Might be an idea to lower the 'fee' from five to one SOIL during the testing period maybe? Anyway, I could have bought the SOIL on an exchange... Wink
Yes.
And whether you buy or mine - if you get 1 SOIL somehow, you'll also be able get 5 SOIL. Or 50. Or 500.

What else? Yes, the addpeers.js is very usefull indeed. This saved some time as I usually have to copy&paste a list of nodes to get the client running...
True. Saves a whole step.

Everyone: If you only include this one aspect into your system, you are already better off.


Great stuff, have played around with the first smart contract this weekend. Thank you! Smiley
That is great. Let us all become makers. Tell us when your the first ideas for novel smart contracts come up in you.

So, who is next, to try out this smart contract? Two rewards are still left.


legendary
Activity: 1045
Merit: 1157
no degradation
...
What to do?
  • Post the contract answer for the weather forecast of a city of your choice, for one day later.
  • Write a sentence or two what you think about it, or suggest an improvement in the manual.
Hi Andreas,

here we go:
Code:
statusmessage => ForecastWeatherAtLocationAtTime:
forecasted time => Mon, 25 Jul 2016 17:00:00 CEST
temperature => 302.96 Kelvin
pressure => 1016.79 Hectopascal
humidity => 45 Percent
cloudcover => 64 Percent
windspeed => 3.37 Meter/Second
rain => 0.01 Millimeter in 3 hours

Just tested this on a spare Windows PC. Checked your manual02-preparations.md to get an overview, downloaded the repo using Firefox and followed the manual03-console-quickstart.md step by step without any issues. Well documented project. Smiley

Had to mine some SOIL for topping up the location, this took some time. Might be an idea to lower the 'fee' from five to one SOIL during the testing period maybe? Anyway, I could have bought the SOIL on an exchange... Wink

What else? Yes, the addpeers.js is very usefull indeed. This saved some time as I usually have to copy&paste a list of nodes to get the client running...

Great stuff, have played around with the first smart contract this weekend. Thank you! Smiley

@altsheets
Sent my remaining SOIL for the ABEESOIL, great project as well! Smiley
legendary
Activity: 902
Merit: 1001
Free trial of #AltFolio = save time, react faster
Your soil block explorer ABEESOIL got an upgrade. ...

If you like this, show it:  
                       [SOIL] 0x8da4fc05ca343e6a41646194e91931d9f413a40c
                              BTC 1M4EaZVprZEmtrS3G78fMFy8yGVgdUJMXv  

Thanks.

legendary
Activity: 902
Merit: 1001
Free trial of #AltFolio = save time, react faster
member
Activity: 95
Merit: 11
... nice project andreas keep up the good work.

Thanks a lot. I will. Please start using it. My oracle is thirsting for queries.

With the latest update "hyperquickstart", it should take you a few minutes only.



legendary
Activity: 1393
Merit: 1001
member
Activity: 95
Merit: 11
Tweet:

Quote
HyperQuick-Start:
Getting the #SmartContract in a few lines.
https://bitcointalksearch.org/topic/m.15636069
novel #SmartContract on #soil



https://twitter.com/drandreaskruger/status/755419380587098115

member
Activity: 95
Merit: 11
post 5

Smart Contract: WeatherForecastAtLocation
HyperQuick-Start

get the code
Code:
git clone https://github.com/drandreaskrueger/weathercontract_user.git
cd weathercontract_user

Start gsoil & gsoil console. Load scripts:
Code:
gsoil
gsoil attach

loadScript('useful/addpeers.js')
loadScript("contract/contract.js")
loadScript("contract/tools.js")

TOP UP LOCATION --> wait your and oracle's TX --> ASK FORECAST

Code:
city =   "q=Nanjing,China"
getForecast_message(city)

PRICE
tx = topUpLocation(city, 3); txReceipt = waitForTxReceipt(tx)

admin.sleepBlocks(1); getForecast_message(city)

getForecast(city)
getForecast(city, timestamp_now_plus_hours(24))
getForecast(city, timestamp_now_plus_hours(24 * 3.5))

getForecast_message(city, timestamp_now_plus_hours(24 * 4.5))

Step-by-step explanations in the quickstart manual.
member
Activity: 95
Merit: 11
post 4
Smart Contract: WeatherForecastAtLocation

Contract deployed. Oracle online.
Quickstart manual.

  • Contract ( v0.5.8 ) is deployed, at address 0xe904c0a8eb49f2fc7185eefde394c42caca028c6
  • Contract ( v0.5.9 ) is deployed, at address 0x0c5c4bc449808eee712b1d0858e2b12e71410c8e
  • Oracle eventlogloop is listening to its events, and will upload weather data as requested.
  • Contract ABI is published as contract.js for easy import into console.
  • Contract tools.js help you to interact with it, on the JavaScript console  gsoil attach.
  • and most importantly:

    YOU CAN TRY OUT THE QUICKSTART MANUAL NOW.


Perhaps this is even your first interaction with a real, live, working, innovative SMART CONTRACT ever?  Exciting times ...

I have fully tested the preparations and the quickstart manual on a fresh droplet, but please report any issue.



--> "Text01 Introduction" in post 1.
--> "Manual02 Prepare your system" in post 2.
--> "Website Preview: Oracle & DB" in post 3
member
Activity: 95
Merit: 11
Tweet:
Quote
SmartContract WeatherForecastAtLocation
Oracle Website Preview
https://bitcointalksearch.org/topic/m.15606390
#soil #crypto #smartcontracts

https://twitter.com/drandreaskruger/status/754370606225817600
member
Activity: 95
Merit: 11
(Please someone quote this whole post, then the image is shown)
post 3
Smart Contract: WeatherForecastAtLocation

Website Preview: Oracle & DB





--> "Text01 Introduction" in post 1.
--> "Manual02 Prepare your system" in post 2.
--> "Manual03 Console - Quickstart" in post 4.
newbie
Activity: 1
Merit: 0
Help

SOIL possible with Claymore mine?

I would like to mining dual Soil + Saicoin
member
Activity: 95
Merit: 11
Tweet:
Quote
Smart Contract: WeatherForecastAtLocation
New project - oracle delivers data into #Blockchain #SmartContract
https://bitcointalksearch.org/topic/m.15571365
#soil
https://twitter.com/drandreaskruger/status/753711936173375488
member
Activity: 95
Merit: 11
post 2
Smart Contract: WeatherForecastAtLocation

Second step:

  • Prepare your system

    • Windows vs Linux, VPS
    • Install Soil
    • Clone/download repo
    • Correct folder
    • Add peers
    • JavaScript console, with examples
    • Languages: Solidity + JavaScript/Python
    • Python via RPC, with examples & starterscripts



--> "Text01 Introduction" in post 1.

Has anyone tried the Python part? Does it work for you? Feedback?
hero member
Activity: 742
Merit: 505
dev hasnt been online in over 2 weeks now

Have u read the posts on this and previous page?
hero member
Activity: 686
Merit: 500
dev hasnt been online in over 2 weeks now
member
Activity: 95
Merit: 11
post 2
Smart Contract: WeatherForecastAtLocation

Second step:

  • Prepare your system

    • Windows vs Linux, VPS
    • Install Soil
    • Clone/download repo
    • Correct folder
    • Add peers
    • JavaScript console, with examples
    • Languages: Solidity + JavaScript/Python
    • Python via RPC, with examples & starterscripts




--> "Text01 Introduction" in post 1.
--> post 3
Pages:
Jump to: