The Seth project is bringing a semantic data layer to the Ethereum blockchain.
We are using smart contracts to build gas cost efficient terminology databases that
will be used to link and browse decentralized applications.
In today's video, you will see how a simple market place can be built on top of Seth.
We are going to create an on-chain database table which leverages other already deployed
terminologies and uses them as field types.
We are creating a new table.
Let's name it "product or service" and give it an id of 200.
Let's add some fields for the records that we will insert.
For example, the products that we will put in this table will have a name, a location,
a category, a contact and the price.
This is where the interesting part comes.
Choosing the field types.
We can have simple types like "Name English" for example - for the name and a "Chain
Address" for the contact . But we can also have types like "geo point"
for the location, which is actually defined in another, already deployed table.
And "product category" for the actual product.
We will see this in more detail when we actually insert some records.
Now we can see our table here.
We don't have any inserted records at this point.
Let's give an ID of 5 for our first product.
This is the "Geo Point" table from which we are getting data.
So this data is actually already existent on the blockchain.
And we have made it so that we can browse through this data.
Let's choose the center of Berlin as our product location and now we can use the products and
services table that we already have deployed in a smart contract.
And now, for example here, we can put an Ethereum address which can be the vendor's address
at which he will receive the payment.
And the price.
A record has been inserted and if we go to the same table we can see that the number
of inserted records is now one.
And if we put the same id of 5, this is what we get.
It is the actual product that we have on chain now.
Thank you for watching and be sure to check out our other demos about Seth!
Không có nhận xét nào:
Đăng nhận xét