Postr – 邮政区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,Postr – 邮政区块链毕设代写 是一篇很好的国外资料

Postr

Postr - 邮政 Postr - 邮政 Postr - 邮政 Postr - 邮政 Postr - 邮政

Postr - 邮政

Postr showcases a Twitter-like decentralized app (dApp) where Tweets are stored anonymously on the blockchain.

Abstract

Social media platforms are said to be the “town square of the 21st century”. Millions of people rely on news and opinion from these platforms every day, which introduces a new problem of consolidated power over information. Ethereum Co-founder, Vitalik Buterin, proposed that the blockchain could be used to create a censorship-free platform. Postr demonstrates this idea with the ability to send, store, and read a message entirely on the blockchain by using smart contracts.

Demo

Postr - 邮政

How does it work?

Postr - 邮政

Where’s the Blockchain?

The blockchain for Postr was setup and tested in a local Ethereum Testnet using Ganache. It communicates over an RPC Server at http://127.0.0.1:7545. The gif below shows the accounts, blocks, transactions and contracts associated with the Testnet. The Post contract is what initiates the “tweet” and stores the message on the blockchain. For example, you can see the hex stored is 0x746573742061626320313233 which translates to test abc 123 in UTF-8.

Postr - 邮政

What’s a Smart Contract?

The smart contract is the primary mechanism for interacting with the Ethereum blockchain. A smart contract can store information, compute business logic, communicate with external applications, or even chain smart contracts together to create robust end products. Postr has only one smart contract called Post where it stores a message as a type string and emits an event. This is as simple as it gets.

contract Post {     event StorageSet(string _message);     string public storedData;          function post(string memory x) public {         storedData = x;         emit StorageSet("Posted!");     } }

Ethereum smart contracts are written in Solidity, a high-level Object-Oriented language which is statically typed. This means that contracts are first written, compiled, then deployed to the blockchain. Web3.js allows the Vue.js app to communicate to the Testnet and invoke the smart contract’s post() method. By doing so, it creates a Transaction Hash which can be used to query the blockchain for the transaction.

Considerations

Postr was created as an exhibition to show the potential of a decentralized social media platform. Currently, Ethereum 1.0 requires a small gas fee in order to submit smart contracts to the blockchain. This gas fee is used to compensate the miner with a reward when the block is processed. This system is called “Proof of Work,” but Ethereum 2.0 will move to a staking model. The new staking system should bring the barrier-to-entry to a minimum, where currently paying a fee to post a message is not a viable model.

Upgrades

Future upgrades to Postr may include:

  • Integrate InterPlanetary File System (IPFS) to post decentralized media content, such as images or videos
  • Add the ability to post multiple messages, dynamically creating a list of posts
  • Create a NoSQL database to store Transaction Hashes, which can be used to dynamically populate posts
  • Provide Gravatar option for users to help recognize each other
  • And much more

A separate ReadMe file will be created with a complete tutorial on how to setup Postr for local development.

Update README.md


Postr

Postr展示了一个类似Twitter的去中心化应用程序(dApp),Tweets以匿名方式存储在区块链blockchain上。社交媒体平台被称为“21世纪的城市广场”。每天有数百万人依赖这些平台上的新闻和观点,这就带来了一个新的问题,即整合对信息的权力。以太坊eth联合创始人维塔利克·巴特林(Vitalik Buterin)提出,区块链blockchain可以用来创建一个无审查的平台。Postr通过使用智能合约完全在区块链blockchain上发送、存储和读取消息的能力来证明这一想法。

Postr - 邮政

Postr - 邮政

摘要

使用Ganache在本地以太坊eth测试网中设置和测试Postr区块链blockchain。它通过RPC服务器进行通信http://127.0.0.1:7545. 下面的gif显示了与Testnet相关联的帐户、块、事务和契约。后契约是启动“推特”并将消息存储在区块链blockchain上的东西。例如,您可以看到存储的十六进制是0x746573742061626320313233,它转换为UTF-8中的testabc123。智能合约是与以太坊eth区块链blockchain交互的主要机制。智能合约可以存储信息、计算业务逻辑、与外部应用程序通信,甚至可以将智能合约链接在一起,以创建健壮的最终产品。Postr只有一个名为Post的智能合约,它将消息存储为类型字符串并发出事件。这很简单。

演示

以太坊eth智能合约是用Solidity编写的,Solidity是一种静态类型的高级面向对象语言。这意味着契约首先被编写、编译,然后被部署到区块链blockchain。Web3.js允许虚拟用户.js应用程序与Testnet通信并调用智能合约的post()方法。通过这样做,它创建了一个事务哈希,可以用来查询区块链blockchain中的事务。

它是如何工作的?

Postr是一个展示分散式社交媒体平台潜力的展览。目前,以太坊eth1.0需要少量的汽油费,才能向区块链blockchain提交智能合约。这一天然气费用用于在处理区块时向矿工提供报酬。这个系统被称为“工作证明”,但以太坊eth2.0将转向一个立桩模型。新的立桩制度应该将进入门槛降到最低,因为目前付费发布信息是不可行的模式。

区块链blockchain在哪里?什么是智能合约?

将来对Postr的升级可能包括:

将创建一个单独的自述文件,其中包含如何为本地开发设置Postr的完整教程。

注意事项

The smart contract is the primary mechanism for interacting with the Ethereum blockchain. A smart contract can store information, compute business logic, communicate with external applications, or even chain smart contracts together to create robust end products. Postr has only one smart contract called Post where it stores a message as a type string and emits an event. This is as simple as it gets.

contract Post {     event StorageSet(string _message);     string public storedData;          function post(string memory x) public {         storedData = x;         emit StorageSet("Posted!");     } }

Ethereum smart contracts are written in Solidity, a high-level Object-Oriented language which is statically typed. This means that contracts are first written, compiled, then deployed to the blockchain. Web3.js allows the Vue.js app to communicate to the Testnet and invoke the smart contract’s post() method. By doing so, it creates a Transaction Hash which can be used to query the blockchain for the transaction.

升级

Postr was created as an exhibition to show the potential of a decentralized social media platform. Currently, Ethereum 1.0 requires a small gas fee in order to submit smart contracts to the blockchain. This gas fee is used to compensate the miner with a reward when the block is processed. This system is called “Proof of Work,” but Ethereum 2.0 will move to a staking model. The new staking system should bring the barrier-to-entry to a minimum, where currently paying a fee to post a message is not a viable model.

Upgrades

Future upgrades to Postr may include:

  • 集成星际文件系统(IPFS)以发布分散的媒体内容,如图像或视频
  • 添加发布多条消息的功能,动态创建一个发布列表
  • 创建一个NoSQL数据库以存储事务哈希,它可以用来动态填充帖子,为用户提供Gravatar选项,帮助他们互相识别,等等
  • Provide Gravatar option for users to help recognize each other
  • And much more

A separate ReadMe file will be created with a complete tutorial on how to setup Postr for local development.

Update README.md

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/20054.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » Postr – 邮政区块链毕设代写

提供最优质的资源集合

立即查看 了解详情